/**
 * Bangladesh Trademark Search System - Custom Styles
 * Department of Patents, Designs & Trademarks (DPDT)
 * Government of Bangladesh Theme
 */

/* CSS Variables - Bangladesh Government Colors */
:root {
    --bd-green: #006a4e;
    --bd-red: #f42a41;
    --bd-green-light: #008c6a;
    --bd-green-dark: #004d3a;
    --bd-red-light: #ff4757;
    --bd-red-dark: #d63031;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-dark: #333333;
    --text-muted: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --secondary: #6c757d;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
    line-height: 1.6;
}

/* White Background Sections */
.hero-section,
.features-section,
.details-section,
.results-header,
.py-5,
.py-4,
.bg-light {
    background-color: #ffffff !important;
}

/* Logo Wrapper Styles */
.dpdt-logo-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.3);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.dpdt-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.1);
    padding: 3px;
}

.admin-logo-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    background: white;
    padding: 2px;
}

.admin-logo-img-mobile {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: white;
    padding: 2px;
}

.login-logo-wrapper {
    width: 90px;
    height: 90px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 4px solid rgba(255,255,255,0.4);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    overflow: hidden;
}

.login-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Admin Direct Link */
.admin-direct-link {
    transition: all 0.3s ease;
    padding: 2px 8px;
    border-radius: 4px;
}

.admin-direct-link:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.footer-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.2);
    margin: 0 auto 15px;
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-dark) 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0;
}

.header-top {
    background-color: var(--bd-green-dark);
    padding: 5px 0;
    font-size: 0.85rem;
}

.header-top a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: color 0.3s;
}

.header-top a:hover {
    color: var(--white);
}

.header-main {
    padding: 15px 0;
}

/* DPDT Logo Styling */
.dpdt-logo {
    max-width: 70px;
    max-height: 70px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 3px solid rgba(255,255,255,0.3);
    background-color: var(--white);
    padding: 3px;
    transition: all 0.3s ease;
}

.dpdt-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    border-color: var(--bd-red);
}

.dpdt-logo-footer {
    max-width: 80px;
    max-height: 80px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 3px solid rgba(255,255,255,0.2);
    background-color: var(--white);
    padding: 4px;
    margin-bottom: 15px;
}

.govt-logo {
    width: 60px;
    height: 60px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--bd-green);
    font-size: 1.5rem;
    border: 3px solid var(--bd-red);
}

.site-title {
    color: var(--white);
    margin: 0;
}

.site-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.site-title p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Navigation */
.navbar-custom {
    background-color: rgba(0,0,0,0.1);
    padding: 0;
}

.navbar-custom .navbar-nav .nav-link {
    color: rgba(255,255,255,0.9);
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.navbar-custom .navbar-nav .nav-link:hover,
.navbar-custom .navbar-nav .nav-link.active {
    color: var(--white);
    background-color: rgba(255,255,255,0.1);
    border-bottom-color: var(--bd-red);
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.3);
    color: var(--white);
}

/* Hero Section - USPTO Style Search */
.hero-section {
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-dark) 100%);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(244,42,65,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-title {
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
}

.hero-subtitle {
    color: rgba(255,255,255,0.9);
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Search Box - USPTO Style */
.search-container {
    max-width: 700px;
    margin: 0 auto;
}

.search-box-wrapper {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.search-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bd-green);
    margin-bottom: 15px;
    display: block;
}

.search-input-group {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--bd-green);
    box-shadow: 0 0 0 4px rgba(0,106,78,0.1);
    outline: none;
}

.search-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    background-color: var(--bd-red);
    border: none;
    border-radius: 8px;
    color: var(--white);
    transition: all 0.3s;
    white-space: nowrap;
}

.search-btn:hover {
    background-color: var(--bd-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244,42,65,0.3);
}

.search-hint {
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Features Section */
.features-section {
    padding: 60px 0;
    background: var(--white);
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s;
    background: var(--white);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--bd-green);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 1.8rem;
}

.feature-card h3 {
    color: var(--bd-green);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-muted);
    margin: 0;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-dark) 100%);
    padding: 60px 0;
    color: var(--white);
}

.stat-box {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Details Page */
.details-section {
    padding: 40px 0;
    background: var(--light-bg);
    min-height: calc(100vh - 300px);
}

.details-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.details-header {
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-dark) 100%);
    color: var(--white);
    padding: 30px;
    text-align: center;
}

.details-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.details-body {
    padding: 40px;
}

.detail-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 200px;
    font-weight: 600;
    color: var(--bd-green);
}

.detail-value {
    flex: 1;
    color: var(--text-dark);
}

.trademark-logo {
    max-width: 200px;
    max-height: 200px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    background: var(--white);
}

.no-logo {
    width: 200px;
    height: 150px;
    background: var(--light-bg);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

/* Status Badges */
.badge {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 20px;
}

/* Buttons */
.btn-custom-green {
    background-color: var(--bd-green);
    border-color: var(--bd-green);
    color: var(--white);
}

.btn-custom-green:hover {
    background-color: var(--bd-green-dark);
    border-color: var(--bd-green-dark);
    color: var(--white);
}

.btn-custom-red {
    background-color: var(--bd-red);
    border-color: var(--bd-red);
    color: var(--white);
}

.btn-custom-red:hover {
    background-color: var(--bd-red-dark);
    border-color: var(--bd-red-dark);
    color: var(--white);
}

/* Search Results Page */
.results-header {
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-dark) 100%);
    padding: 40px 0;
    color: var(--white);
}

.search-filters {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Tables */
.table-custom {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table-custom thead {
    background-color: var(--bd-green);
    color: var(--white);
}

.table-custom th {
    font-weight: 600;
    border: none;
    padding: 15px;
}

.table-custom td {
    padding: 15px;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: rgba(0,106,78,0.05);
}

/* Pagination */
.pagination-custom .page-link {
    color: var(--bd-green);
    border: 1px solid var(--border-color);
    margin: 0 3px;
    border-radius: 5px;
}

.pagination-custom .page-link:hover {
    background-color: var(--bd-green);
    color: var(--white);
    border-color: var(--bd-green);
}

.pagination-custom .page-item.active .page-link {
    background-color: var(--bd-green);
    border-color: var(--bd-green);
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, var(--bd-green-dark) 0%, #003d2f 100%);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-links {
    margin: 20px 0;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 30px;
    padding-top: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Alerts */
.alert-custom {
    border-radius: 8px;
    border: none;
    padding: 20px;
}

/* Admin Panel Styles */
.admin-body {
    background-color: #ffffff;
}

.admin-sidebar {
    background: linear-gradient(180deg, var(--bd-green) 0%, var(--bd-green-dark) 100%);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    z-index: 1000;
    transition: all 0.3s;
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-logo {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 600;
}

.admin-menu {
    padding: 20px 0;
}

.admin-menu-item {
    padding: 12px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.admin-menu-item:hover,
.admin-menu-item.active {
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-left-color: var(--bd-red);
}

.admin-main {
    margin-left: 260px;
    padding: 20px;
    min-height: 100vh;
}

.admin-header {
    background: var(--white);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.stat-card-icon.green {
    background-color: rgba(0,106,78,0.1);
    color: var(--bd-green);
}

.stat-card-icon.red {
    background-color: rgba(244,42,65,0.1);
    color: var(--bd-red);
}

.stat-card-icon.blue {
    background-color: rgba(13,110,253,0.1);
    color: #0d6efd;
}

.stat-card-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-card-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Forms */
.form-custom .form-label {
    font-weight: 500;
    color: var(--text-dark);
}

.form-custom .form-control,
.form-custom .form-select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
}

.form-custom .form-control:focus,
.form-custom .form-select:focus {
    border-color: var(--bd-green);
    box-shadow: 0 0 0 4px rgba(0,106,78,0.1);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
}

.login-header {
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-dark) 100%);
    padding: 40px;
    text-align: center;
    color: var(--white);
}

.login-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.login-header p {
    margin: 10px 0 0;
    opacity: 0.9;
}

.login-body {
    padding: 40px;
}

/* No Result */
.no-result {
    text-align: center;
    padding: 60px 20px;
}

.no-result-icon {
    width: 100px;
    height: 100px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3rem;
    color: var(--bd-red);
}

.no-result h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.no-result p {
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .site-title h1 {
        font-size: 1.2rem;
    }
    
    .govt-logo {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .btn {
        display: none !important;
    }
    
    .details-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Loading Spinner */
.spinner-custom {
    border: 3px solid rgba(0,106,78,0.1);
    border-top: 3px solid var(--bd-green);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =====================================================
   ADVANCED DESIGN ENHANCEMENTS
   ===================================================== */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Glass Morphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced Card Hover Effects */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

/* Animated Gradient Border */
@keyframes borderGradient {
    0% { border-color: var(--bd-green); }
    50% { border-color: var(--bd-red); }
    100% { border-color: var(--bd-green); }
}

.search-box-wrapper {
    animation: borderGradient 4s infinite;
    border: 2px solid var(--bd-green);
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.dpdt-logo {
    animation: float 4s ease-in-out infinite;
}

/* Pulse Effect for Important Elements */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 106, 78, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(0, 106, 78, 0); }
}

.search-btn {
    animation: pulse 2s infinite;
}

/* Enhanced Button Styles */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

/* Shine Effect on Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255,255,255,0.1) 50%,
        transparent 100%
    );
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0;
}

.stat-card:hover::after {
    animation: shine 0.8s ease-in-out;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) rotate(30deg); opacity: 0; }
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated Underline */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bd-red);
    transition: width 0.3s;
}

.animated-underline:hover::after {
    width: 100%;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tooltip Styling */
.custom-tooltip {
    position: relative;
}

.custom-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--bd-green);
    color: white;
    font-size: 0.85rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.custom-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 10px);
}

/* Status Badge Animations */
.badge {
    transition: all 0.3s;
}

.badge:hover {
    transform: scale(1.1);
}

/* Table Row Hover Effect */
.table tbody tr {
    transition: all 0.2s;
}

.table tbody tr:hover {
    background-color: rgba(0, 106, 78, 0.05);
    transform: scale(1.002);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Input Focus Animations */
.form-control, .form-select {
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 106, 78, 0.15);
}

/* Alert Animations */
.alert {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Image Hover Zoom */
.trademark-logo {
    transition: all 0.3s;
}

.trademark-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Sidebar Glow Effect */
.admin-sidebar {
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
}

.admin-menu-item:hover {
    background: linear-gradient(90deg, rgba(244,42,65,0.1) 0%, transparent 100%);
    border-left-color: var(--bd-red);
}

/* Responsive Logo Adjustments */
@media (max-width: 768px) {
    .dpdt-logo {
        max-width: 50px;
        max-height: 50px;
    }
    
    .dpdt-logo-footer {
        max-width: 60px;
        max-height: 60px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1a1a1a;
        --text-dark: #e0e0e0;
        --border-color: #333;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--bd-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bd-green-dark);
}

/* Selection Color */
::selection {
    background: var(--bd-green);
    color: white;
}

/* Focus Visible for Accessibility */
:focus-visible {
    outline: 2px solid var(--bd-red);
    outline-offset: 2px;
}

/* Print Logo Fix */
@media print {
    .dpdt-logo, .dpdt-logo-footer {
        max-width: 60px;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* =====================================================
   MAIN SITE ANIMATIONS
   ===================================================== */

/* Hero Section Entrance Animation */
.hero-section {
    animation: heroEntrance 1s ease-out;
}

@keyframes heroEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animated Gradient Background for Hero */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,106,78,0.05) 0%, rgba(244,42,65,0.05) 100%);
    animation: gradientShift 8s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Search Box Glow Animation */
.search-box-wrapper {
    animation: searchGlow 3s ease-in-out infinite;
}

@keyframes searchGlow {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(0,106,78,0.2);
    }
    50% {
        box-shadow: 0 10px 50px rgba(0,106,78,0.4);
    }
}

/* Feature Cards Float Animation */
.feature-card {
    animation: cardFloat 6s ease-in-out infinite;
    animation-delay: calc(var(--card-index, 0) * 0.5s);
}

.feature-card:nth-child(1) { --card-index: 0; }
.feature-card:nth-child(2) { --card-index: 1; }
.feature-card:nth-child(3) { --card-index: 2; }

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Feature Icon Spin on Hover */
.feature-icon {
    transition: all 0.5s ease;
}

.feature-card:hover .feature-icon {
    transform: rotate(360deg) scale(1.1);
}

/* Stat Counter Animation */
.stat-card {
    animation: statPulse 4s ease-in-out infinite;
    animation-delay: calc(var(--stat-index, 0) * 0.3s);
}

.stat-card:nth-child(1) { --stat-index: 0; }
.stat-card:nth-child(2) { --stat-index: 1; }
.stat-card:nth-child(3) { --stat-index: 2; }
.stat-card:nth-child(4) { --stat-index: 3; }

@keyframes statPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Number Count Up Effect */
.stat-number {
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Bounce Animation */
.dpdt-logo-wrapper {
    animation: logoBounce 2s ease-in-out infinite;
}

@keyframes logoBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Button Ripple Effect */
.btn-custom-green,
.btn-custom-red {
    position: relative;
    overflow: hidden;
}

.btn-custom-green::after,
.btn-custom-red::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-custom-green:active::after,
.btn-custom-red:active::after {
    width: 300px;
    height: 300px;
}

/* Navigation Link Underline Animation */
.navbar-custom .nav-link {
    position: relative;
}

.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--bd-red);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
    width: 80%;
}

/* Footer Wave Animation */
.main-footer::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 20'%3E%3Cpath fill='%23006a4e' d='M0,10 Q360,0 720,10 T1440,10 V20 H0 Z'/%3E%3C/svg%3E");
    background-size: cover;
    animation: waveMove 10s linear infinite;
}

@keyframes waveMove {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1440px;
    }
}

/* Search Input Focus Animation */
.search-input {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(0,106,78,0.1);
}

/* Typing Effect for Hero Title */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--bd-green); }
}

/* Loading Spinner with Bangladesh Colors */
.spinner-bangladesh {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0,106,78,0.1);
    border-top-color: var(--bd-green);
    border-right-color: var(--bd-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Page Load Animation Sequence */
.main-header {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Trademark Card Hover Lift */
.trademark-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trademark-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Certificate Badge Pulse */
.badge.bg-success {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Results Counter Animation */
.results-count {
    animation: countPop 0.5s ease-out;
}

@keyframes countPop {
    0% {
        transform: scale(0);
    }
    80% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Link Hover Color Transition */
a {
    transition: color 0.3s ease;
}

/* Image Loading Blur Effect */
img {
    transition: filter 0.3s ease;
}

img[loading] {
    filter: blur(5px);
}

img:not([loading]) {
    filter: blur(0);
}
