*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

:root,
:root[data-theme="light"] {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #1f2937;
    --text-dark: #111827;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --accent-soft: #dbeafe;
    --accent-soft-text: var(--primary-color);
    --card-muted: #f3f4f6;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --form-input-border: #ddd;
    --form-label-color: #333;

    color-scheme: light;
}

:root[data-theme="dark"] {
    --primary-color: #60a5fa;
    --primary-dark: #3b82f6;
    --secondary-color: #e5e7eb;
    --text-dark: #f3f4f6;
    --text-gray: #9ca3af;
    --bg-light: #111827;
    --bg-white: #0b1220;
    --border-color: #1f2937;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8);

    --accent-soft: rgba(59, 130, 246, 0.18);
    --accent-soft-text: #93c5fd;
    --card-muted: #1f2937;
    --surface: #111827;
    --surface-elevated: #1f2937;
    --navbar-bg: rgba(11, 18, 32, 0.85);
    --form-input-border: #374151;
    --form-label-color: #e5e7eb;

    color-scheme: dark;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.25rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-gray);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    padding: 0 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    line-height: 0;
}

.logo-img {
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.logo-img-full {
    height: 1.85rem;
    width: auto;
    max-width: 11rem;
}

.logo-img-mark {
    height: 2rem;
    width: 2rem;
}

/* All four logo variants hidden by default — exactly one is re-enabled below */
.logo .logo-img-light,
.logo .logo-img-dark { display: none; }

/* Always show the full wordmark for the current theme */
html[data-theme="light"] .logo .logo-img-light.logo-img-full { display: block; }
html[data-theme="dark"]  .logo .logo-img-dark.logo-img-full  { display: block; }

/* Tiny phones: bump max-width down so logo doesn't push into the menu button */
@media (max-width: 360px) {
    .logo-img-full {
        height: 1.6rem;
        max-width: 9rem;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Enhanced Professional Dropdown Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown > .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dropdown > .nav-link::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

.nav-dropdown:hover > .nav-link::after {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-dropdown > .nav-link:hover {
    background-color: rgba(37, 99, 235, 0.05);
    color: var(--primary-color);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 280px;
    border-radius: 1rem;
    padding: 0.75rem 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1));
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 0;
    margin: 0 0.5rem;
    border-radius: 0.5rem;
}

.dropdown-content a::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0);
}

.dropdown-content a:hover::before {
    opacity: 1;
    transform: scale(1);
}

.dropdown-content a:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: var(--primary-color);
    transform: translateX(4px);
    padding-left: 2rem;
}

.dropdown-content a:active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    transform: translateX(2px);
}

.dropdown-content a {
    animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.nav-dropdown:hover .dropdown-content a:nth-child(1) { animation-delay: 0.1s; }
.nav-dropdown:hover .dropdown-content a:nth-child(2) { animation-delay: 0.15s; }
.nav-dropdown:hover .dropdown-content a:nth-child(3) { animation-delay: 0.2s; }
.nav-dropdown:hover .dropdown-content a:nth-child(4) { animation-delay: 0.25s; }
.nav-dropdown:hover .dropdown-content a:nth-child(5) { animation-delay: 0.3s; }
.nav-dropdown:hover .dropdown-content a:nth-child(6) { animation-delay: 0.35s; }

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.mobile-menu-btn:hover {
    background-color: var(--bg-light);
}

.mobile-menu-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--text-dark);
}

/* Mobile Menu Base Styles */
.mobile-menu {
    display: none;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
}

.mobile-menu.active {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

.mobile-nav-link {
    display: block;
    padding: 0.875rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.75rem;
    transition: all 0.2s;
    margin: 0.25rem 0;
}

.mobile-nav-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Enhanced Mobile Dropdown Styles */
.mobile-dropdown {
    position: relative;
    margin: 0.25rem 0;
    width: 100%;
}

.mobile-dropdown-trigger {
    display: flex !important; /* Force visibility */
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.875rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    font-family: inherit;
    /* Make sure it's visible and clickable */
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.mobile-dropdown-trigger:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.03) 100%);
    color: var(--primary-color);
}

.mobile-dropdown-trigger:focus {
    outline: none;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.03) 100%);
}

.dropdown-icon {
    width: 1.25rem;
    height: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
    flex-shrink: 0;
}

.mobile-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--primary-color);
}

.mobile-dropdown.active .mobile-dropdown-trigger {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.mobile-dropdown-content {
    display: none !important;
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.8) 0%, rgba(243, 244, 246, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 0.5rem 0 0.75rem 0;
    border-radius: 0.75rem;
    padding: 0.5rem;
    border: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    opacity: 0;
    max-height: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dropdown.active .mobile-dropdown-content {
    display: block !important;
    opacity: 1;
    max-height: 500px;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0.125rem 0;
}

.mobile-dropdown-link::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0);
}

.mobile-dropdown-link:hover::before {
    opacity: 1;
    transform: scale(1);
}

.mobile-dropdown-link:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(6px);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.mobile-dropdown-link:active {
    background: rgba(255, 255, 255, 1);
    transform: translateX(3px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6rem 1rem 2rem;
    background-color: #0b1220;
    background-image: url("poster-image.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    padding: 2rem 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    max-width: 100%;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: #ffffff;
    max-width: 48rem;
    margin: 0 auto 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Enhanced Professional Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-height: 3rem;
    text-align: center;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    color: white;
    border: 2px solid transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px -3px rgba(37, 99, 235, 0.3), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    color: #1d4ed8;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
    border-color: rgba(37, 99, 235, 0.2);
}

.btn-secondary:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.1);
}

.btn-white {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: var(--primary-color);
    border: 2px solid rgba(37, 99, 235, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-white:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--primary-dark);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: rgba(37, 99, 235, 0.2);
}

.btn-white:active {
    transform: translateY(0) scale(1);
}

.btn i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 1.25rem;
    height: 1.25rem;
}

.btn:hover i {
    transform: translateX(4px);
}

.btn-primary:hover i {
    animation: arrowBounce 0.6s ease-in-out;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading i {
    animation: spin 1s linear infinite;
}

.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    min-height: 2.75rem;
    border-radius: 0.5rem;
}

.btn-lg {
    padding: 1.5rem 3rem;
    font-size: 1.125rem;
    min-height: 4rem;
    border-radius: 1rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-buttons .btn {
    min-width: 180px;
    font-size: 1rem;
    padding: 1.125rem 2.25rem;
    border-radius: 0.875rem;
}

.hero-buttons .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 25%, #1d4ed8 75%, #1e40af 100%);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4), 0 10px 10px -5px rgba(37, 99, 235, 0.04);
    position: relative;
}

.hero-buttons .btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent, rgba(255, 255, 255, 0.1));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
}

.hero-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 25%, #3b82f6 75%, #2563eb 100%);
    box-shadow: 0 15px 35px -5px rgba(37, 99, 235, 0.5), 0 15px 15px -5px rgba(37, 99, 235, 0.1);
    transform: translateY(-3px) scale(1.03);
}

.hero-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    box-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.1);
}

.hero-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    box-shadow: 0 12px 40px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-3px) scale(1.03);
}

.btn:focus {
    outline: none;
    ring: 3px;
    ring-color: rgba(37, 99, 235, 0.3);
    ring-offset: 2px;
}

.btn-primary:focus {
    ring-color: rgba(37, 99, 235, 0.5);
}

.btn-secondary:focus {
    ring-color: rgba(107, 114, 128, 0.5);
}

.btn-white:focus {
    ring-color: rgba(37, 99, 235, 0.3);
}

/* Sections */
section {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.section-header h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 48rem;
    margin: 0 auto;
}

.motto {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    color: var(--text-gray);
}

/* Features Section */
.features {
    background-color: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 1rem;
    transition: box-shadow 0.3s;
}

.feature-card:hover {
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    background-color: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary-color);
}

/* About Section */
.about {
    background-color: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    text-align: justify;
    text-justify: inter-word;
    padding: 0 1rem;
}

.about-features {
    margin-top: 1.5rem;
}

.about-feature {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.check-icon {
    color: #22c55e;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.values-card {
    background-color: #f3f4f6;
    border-radius: 1rem;
    padding: 1.5rem;
}

.values-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.value-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Services Section */
.services {
    background-color: var(--bg-light);
}

.services-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.service-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 1rem;
    height: 250px;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: scale(1.02);
}

.service-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.service-item:hover .service-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

.service-overlay h3 {
    color: white;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    text-align: center;
    padding: 1rem;
}

/* Service Modal */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.service-modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    margin: auto;
    padding: 1rem;
    z-index: 1;
    animation: modalSlideIn 0.4s ease;
    overflow-y: auto;
}

.modal-image {
    width: 100%;
    height: 250px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: imageExpand 0.5s ease;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-detail {
    flex: 1;
    background-color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: detailSlideIn 0.5s ease 0.1s both;
}

.back-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    color: var(--text-gray);
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.back-button:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border-color: var(--text-dark);
}

.modal-detail .service-icon {
    width: 3rem;
    height: 3rem;
    background-color: #dbeafe;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.modal-detail h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1rem;
    padding-right: 3rem;
}

.modal-detail p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.modal-detail ul {
    list-style: none;
    margin: 1.5rem 0;
}

.modal-detail li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.modal-detail li::before {
    content: "→";
    color: var(--primary-color);
    font-weight: bold;
}

.modal-detail .service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s;
    margin-top: 1rem;
}

.modal-detail .service-link:hover {
    gap: 0.75rem;
}

.service-icon {
    width: 3.5rem;
    height: 3.5rem;
    background-color: #dbeafe;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.service-card h3 {
    margin-bottom: 1rem;
}

.service-card ul {
    list-style: none;
    margin: 1rem 0;
}

.service-card li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

.service-card li::before {
    content: "→";
    color: var(--primary-color);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s;
}

.service-link:hover {
    gap: 0.75rem;
}

.cta-section {
    margin-top: 3rem;
    background-color: var(--primary-color);
    border-radius: 1rem;
    padding: 2rem 1rem;
    text-align: center;
    color: white;
}

.cta-section h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: #ffffff;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
}

/* Service Categories */
.service-categories {
    margin-top: 3rem;
    padding: 2rem 1rem;
    background-color: white;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.service-categories h3 {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.category-card {
    background-color: var(--bg-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.category-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.category-card h4 i {
    width: 1.25rem;
    height: 1.25rem;
}

.category-card ul {
    list-style: none;
}

.category-card li {
    padding: 0.5rem 0;
    color: var(--text-gray);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.category-card li:last-child {
    border-bottom: none;
}

/* Resources Section */
.resources {
    background-color: white;
}

.resources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.resource-card {
    background-color: var(--bg-light);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.resource-content {
    flex-grow: 1;
}

.resource-card:hover {
    box-shadow: var(--shadow-lg);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resource-type {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    background-color: #dbeafe;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 1rem;
    padding: 2rem 1rem;
    text-align: center;
    color: white;
    margin: 0 1rem;
}

.newsletter-section h3 {
    color: white;
}

.newsletter-section p {
    color: #ffffff;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 28rem;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 1rem;
}

/* Contact Section */
.contact {
    background-color: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-item h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-item span {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.emergency-box {
    background-color: #dbeafe;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.emergency-number {
    font-weight: 600;
    color: var(--primary-color);
}

.contact-form-container {
    background-color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Final CTA */
.final-cta {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 3rem 1rem;
}

.final-cta h2 {
    color: white;
    margin-bottom: 1rem;
}

.final-cta p {
    color: #ffffff;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background-color: #111827;
    color: white;
    padding: 2rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    line-height: 0;
}

.footer-logo-img {
    height: 2.5rem;
    width: auto;
    max-width: 100%;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    font-size: 0.9rem;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-contact i {
    width: 1rem;
    height: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.875rem;
}

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

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

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

@keyframes fadeInDelay {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

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

@keyframes modalSlideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes imageExpand {
    from {
        transform: scale(0.8) translateX(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateX(0);
        opacity: 1;
    }
}

@keyframes detailSlideIn {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(4px);
    }
    50% {
        transform: translateX(8px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.navbar {
    animation: slideDown 0.5s ease-out;
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-up {
    animation: slideUp 1s ease-out 0.3s both;
}

.animate-fade-in-delay {
    animation: fadeInDelay 1.5s ease-out;
}

/* Enhanced Focus States for Accessibility */
.nav-dropdown > .nav-link:focus,
.mobile-dropdown-trigger:focus,
.dropdown-content a:focus,
.mobile-dropdown-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.03) 100%);
}

/* News Feed Section Styles */
.news-section {
    background-color: var(--bg-light);
}

.news-meta-container {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.news-table-container {
    overflow-x: auto;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.news-table {
    width: 100%;
    border-collapse: collapse;
}

.news-table th, .news-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.news-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-table tbody tr:last-child td {
    border-bottom: none;
}

.news-table tbody tr:hover {
    background-color: #f9fafb;
}

.news-table td:nth-child(1) {
    font-weight: 500;
    color: var(--text-dark);
}

.news-table td:nth-child(2) {
    white-space: nowrap;
    color: var(--text-gray);
}

.news-table .news-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.news-table .news-link:hover {
    gap: 0.75rem;
    text-decoration: underline;
}

.news-cta-banner {
    margin-top: 3rem;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

/* News Pagination */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.news-pagination[hidden] {
    display: none;
}

.news-pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    min-height: 2.5rem;
}

.news-pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.news-pagination-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.news-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.news-pagination-btn i {
    width: 1rem;
    height: 1rem;
}

.news-pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.news-pagination-page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.news-pagination-page {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.4rem 0.65rem;
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.news-pagination-page:hover:not(.is-active) {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.news-pagination-page.is-active {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
    cursor: default;
}

.news-pagination-ellipsis {
    min-width: 1.5rem;
    color: var(--text-gray);
    font-weight: 600;
    user-select: none;
}

@media (max-width: 480px) {
    .news-pagination {
        gap: 0.5rem;
    }
    .news-pagination-btn-label {
        display: none;
    }
    .news-pagination-btn {
        padding: 0.55rem 0.75rem;
    }
    .news-pagination-page {
        min-width: 2.25rem;
        min-height: 2.25rem;
        padding: 0.35rem 0.5rem;
        font-size: 0.85rem;
    }
}

.news-cta-banner h3 {
    color: var(--bg-white);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}


/* Media Queries for Enhanced Mobile Experience */
@media (max-width: 1023px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .services-gallery, .features-grid, .category-grid, .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-content, .contact-content {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    .modal-content {
        flex-direction: row;
        max-width: 90%;
    }
    .modal-image {
        flex: 0 0 300px;
        height: 400px;
    }
}

@media (max-width: 767px) {
    .services-gallery, .features-grid, .category-grid, .resources-grid {
        grid-template-columns: 1fr;
    }
    .newsletter-form {
        flex-direction: column;
    }

    /* Responsive News Table Styles */
    .news-table-container {
        border: none;
        box-shadow: none;
        background-color: transparent;
        overflow-x: visible;
    }
    .news-table thead {
        display: none;
    }
    .news-table, .news-table tbody, .news-table tr, .news-table td {
        display: block;
        width: 100%;
    }
    .news-table tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--border-color);
        border-radius: 0.75rem;
        background-color: var(--bg-white);
        box-shadow: var(--shadow);
        overflow: hidden;
    }
    .news-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    .news-table tr td:last-child {
        border-bottom: none;
    }
    .news-table td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-dark);
        text-align: left;
        margin-right: 1rem;
    }
    .news-table td:nth-child(1) {
       flex-direction: column;
       align-items: flex-start;
       gap: 0.5rem;
       padding: 1rem;
       text-align: left;
       font-weight: 600;
    }
    .news-table td:nth-child(1)::before {
        display: none; /* Hide "Title" label as it's obvious */
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .nav-menu {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .nav-content {
        height: 4.25rem;
    }

    .logo-img-full {
        height: 2.5rem;
    }

    .hero {
        padding: 5rem 1rem 2rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .hero-buttons .btn {
        min-width: 200px;
        font-size: 1.125rem;
        padding: 1.25rem 2.75rem;
    }
    
    section {
        padding: 5rem 0;
    }
    
    .section-header {
        margin-bottom: 4rem;
    }
    
    .services-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .service-item {
        height: 300px;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .modal-content {
        flex-direction: row;
        gap: 2rem;
        max-width: 1000px;
    }
    
    .modal-image {
        flex: 0 0 400px;
        height: 500px;
    }
    
    .modal-detail {
        padding: 2.5rem;
    }

    .back-button {
        top: 1.5rem;
        right: 1.5rem;
    }
}

/* ---- Mobile compatibility fixes ---- */
@media (max-width: 767px) {
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .hero {
        padding: 5.5rem 1rem 2.5rem;
        min-height: 100vh;
        min-height: 100svh;
    }

    .hero-content {
        padding: 1rem 0.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 22rem;
        margin: 0 auto;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    section {
        padding: 3rem 0;
    }

    /* Prevent iOS focus zoom (inputs need >=16px) */
    .form-group input,
    .form-group select,
    .form-group textarea,
    .newsletter-form input {
        font-size: 16px;
    }

    .newsletter-section {
        margin: 0;
        padding: 2rem 1.25rem;
    }

    .newsletter-form {
        width: 100%;
    }

    .contact-form-container {
        padding: 1.25rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: left;
    }

    .footer-section h4 {
        margin-bottom: 0.5rem;
    }

    .footer-contact p {
        word-break: break-word;
    }

    .modal-content {
        padding: 1rem 0.5rem;
    }

    .modal-detail {
        padding: 1.25rem;
    }

    .modal-detail h3 {
        padding-right: 2.5rem;
    }

    .back-button {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .service-item {
        height: 220px;
    }

    .category-grid,
    .features-grid,
    .resources-grid,
    .services-gallery {
        padding: 0;
    }

    .news-cta-banner {
        padding: 2rem 1.25rem;
        margin-top: 2rem;
    }

    .news-cta-banner h3 {
        font-size: 1.15rem;
    }

    .emergency-box {
        padding: 1.25rem;
    }

    .emergency-number {
        word-break: break-word;
    }

    .about-content {
        text-align: left;
    }

    /* Mobile devices: don't attempt video playback — show poster image only */
    .hero-video {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: clamp(0.95rem, 4vw, 1.125rem);
    }

    .btn {
        padding: 0.85rem 1.25rem;
        font-size: 0.9rem;
    }

    .logo span {
        font-size: 0.85rem;
    }

    .news-table td {
        padding: 0.65rem 0.9rem;
    }

    .news-pagination-page {
        min-width: 2rem;
        min-height: 2rem;
        padding: 0.3rem 0.45rem;
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .hero-video {
        display: none;
    }
}

/* ============================================================
   Theme Toggle Button
   ============================================================ */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    margin-left: 0.5rem;
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background-color: var(--accent-soft);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.theme-toggle:active {
    transform: scale(0.92);
}

.theme-toggle-icon {
    width: 1.05rem;
    height: 1.05rem;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

/* Light theme: show moon (click to go dark), hide sun */
:root[data-theme="light"] .theme-toggle-sun,
:root:not([data-theme="dark"]) .theme-toggle-sun {
    display: none;
}
:root[data-theme="light"] .theme-toggle-moon,
:root:not([data-theme="dark"]) .theme-toggle-moon {
    display: inline-block;
}

/* Dark theme: show sun (click to go light), hide moon */
:root[data-theme="dark"] .theme-toggle-sun {
    display: inline-block;
}
:root[data-theme="dark"] .theme-toggle-moon {
    display: none;
}

.theme-toggle-mobile {
    display: none;
}

@media (max-width: 1023px) {
    .theme-toggle-mobile {
        display: inline-flex;
        margin-left: auto;
        margin-right: 0.5rem;
    }
    .nav-menu .theme-toggle {
        display: none;
    }
}

/* ============================================================
   Dark Theme Overrides (for hardcoded colors in legacy rules)
   ============================================================ */
:root[data-theme="dark"] body {
    background-color: var(--bg-white);
    color: var(--text-dark);
}

:root[data-theme="dark"] .navbar.scrolled {
    background-color: var(--navbar-bg);
}

:root[data-theme="dark"] .dropdown-content {
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid var(--border-color);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.6),
        0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .dropdown-content::before {
    border-bottom-color: rgba(17, 24, 39, 0.95);
}

:root[data-theme="dark"] .dropdown-content a,
:root[data-theme="dark"] .mobile-dropdown-link,
:root[data-theme="dark"] .mobile-nav-link,
:root[data-theme="dark"] .mobile-dropdown-trigger {
    color: var(--text-dark);
}

:root[data-theme="dark"] .mobile-menu {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

:root[data-theme="dark"] .mobile-dropdown-content {
    background: var(--card-muted);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .mobile-dropdown-trigger:hover,
:root[data-theme="dark"] .mobile-nav-link:hover {
    background: rgba(96, 165, 250, 0.12);
    color: var(--primary-color);
}

:root[data-theme="dark"] .mobile-dropdown.active .mobile-dropdown-trigger {
    background: rgba(96, 165, 250, 0.18);
    color: var(--primary-color);
}

/* Icon chips and small pills — text/icon colour can be light blue safely */
:root[data-theme="dark"] .feature-icon,
:root[data-theme="dark"] .modal-detail .service-icon,
:root[data-theme="dark"] .service-icon,
:root[data-theme="dark"] .resource-type {
    background-color: var(--accent-soft);
    color: var(--accent-soft-text);
}

/* Emergency box has body text — keep accent bg but use readable text colours */
:root[data-theme="dark"] .emergency-box {
    background-color: var(--accent-soft);
    color: var(--text-dark);
    border: 1px solid rgba(96, 165, 250, 0.25);
}

:root[data-theme="dark"] .emergency-box h4 {
    color: var(--text-dark);
}

:root[data-theme="dark"] .emergency-box p {
    color: var(--text-dark);
}

:root[data-theme="dark"] .emergency-box .emergency-number {
    color: var(--accent-soft-text);
    font-weight: 700;
}

:root[data-theme="dark"] .values-card {
    background-color: var(--card-muted);
}

:root[data-theme="dark"] .service-categories,
:root[data-theme="dark"] .modal-detail,
:root[data-theme="dark"] .contact-form-container,
:root[data-theme="dark"] .resource-card,
:root[data-theme="dark"] .feature-card,
:root[data-theme="dark"] .category-card {
    background-color: var(--surface-elevated);
    color: var(--text-dark);
}

:root[data-theme="dark"] .category-card {
    border-color: var(--border-color);
}

:root[data-theme="dark"] .category-card li {
    border-bottom-color: var(--border-color);
}

:root[data-theme="dark"] .resource-card {
    background-color: var(--card-muted);
}

:root[data-theme="dark"] .news-table-container,
:root[data-theme="dark"] .news-table {
    background-color: var(--surface-elevated);
    border-color: var(--border-color);
}

:root[data-theme="dark"] .news-table th {
    background-color: var(--card-muted);
    color: var(--text-dark);
}

:root[data-theme="dark"] .news-table td {
    border-bottom-color: var(--border-color);
    color: var(--text-dark);
}

:root[data-theme="dark"] .news-table tbody tr:hover {
    background-color: rgba(96, 165, 250, 0.08);
}

:root[data-theme="dark"] .news-pagination-btn,
:root[data-theme="dark"] .news-pagination-page {
    background-color: var(--surface-elevated);
    color: var(--text-dark);
    border-color: var(--border-color);
}

:root[data-theme="dark"] .news-pagination-page:hover:not(.is-active) {
    background-color: var(--card-muted);
    color: var(--primary-color);
}

:root[data-theme="dark"] .news-pagination-page.is-active,
:root[data-theme="dark"] .news-pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

:root[data-theme="dark"] .footer {
    background-color: #050a14;
    color: #cbd5e1;
}

:root[data-theme="dark"] .form-group label {
    color: var(--form-label-color);
}

:root[data-theme="dark"] .form-group input,
:root[data-theme="dark"] .form-group select,
:root[data-theme="dark"] .form-group textarea,
:root[data-theme="dark"] .newsletter-form input {
    background-color: var(--surface-elevated);
    color: var(--text-dark);
    border-color: var(--form-input-border);
}

:root[data-theme="dark"] .form-group input::placeholder,
:root[data-theme="dark"] .form-group textarea::placeholder,
:root[data-theme="dark"] .newsletter-form input::placeholder {
    color: var(--text-gray);
}

:root[data-theme="dark"] .form-group input:focus,
:root[data-theme="dark"] .form-group select:focus,
:root[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3);
}

:root[data-theme="dark"] .btn-white {
    background-color: var(--surface-elevated);
    color: var(--primary-color);
}

:root[data-theme="dark"] .success-message {
    background-color: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.3);
}

:root[data-theme="dark"] .error-message {
    background-color: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.3);
}

:root[data-theme="dark"] .about-feature span,
:root[data-theme="dark"] .contact-item span,
:root[data-theme="dark"] .resource-content p,
:root[data-theme="dark"] .feature-card p,
:root[data-theme="dark"] .category-card li {
    color: var(--text-gray);
}

:root[data-theme="dark"] .emergency-number {
    color: var(--primary-color);
}

:root[data-theme="dark"] .modal-overlay {
    background-color: rgba(0, 0, 0, 0.85);
}

:root[data-theme="dark"] .hero {
    background-color: #050a14;
}

/* Section background overrides for hardcoded light backgrounds */
:root[data-theme="dark"] .resources {
    background-color: var(--bg-white);
}

:root[data-theme="dark"] .services,
:root[data-theme="dark"] .contact,
:root[data-theme="dark"] .news-section {
    background-color: var(--bg-light);
}

:root[data-theme="dark"] .features,
:root[data-theme="dark"] .about {
    background-color: var(--bg-white);
}

/* News table row hover (hardcoded #f9fafb) */
:root[data-theme="dark"] .news-table tbody tr:hover {
    background-color: rgba(96, 165, 250, 0.1);
}

/* Inline form-message colours from <style> in index.html */
:root[data-theme="dark"] .form-group input,
:root[data-theme="dark"] .form-group select,
:root[data-theme="dark"] .form-group textarea {
    border: 1px solid var(--form-input-border);
}

:root[data-theme="dark"] .form-group label {
    color: var(--text-dark);
}

/* Final CTA & newsletter banners keep blue gradient — text is already white, but reinforce */
:root[data-theme="dark"] .newsletter-section,
:root[data-theme="dark"] .news-cta-banner,
:root[data-theme="dark"] .cta-section,
:root[data-theme="dark"] .final-cta {
    color: #ffffff;
}

:root[data-theme="dark"] .newsletter-section h3,
:root[data-theme="dark"] .news-cta-banner h3,
:root[data-theme="dark"] .final-cta h2,
:root[data-theme="dark"] .cta-section h3 {
    color: #ffffff;
}

/* Section header (h2 + p) */
:root[data-theme="dark"] .section-header h2 {
    color: var(--text-dark);
}

:root[data-theme="dark"] .section-header p,
:root[data-theme="dark"] .news-meta-container {
    color: var(--text-gray);
}

/* About section text */
:root[data-theme="dark"] .about-text h3,
:root[data-theme="dark"] .about-text p,
:root[data-theme="dark"] .values-card h3,
:root[data-theme="dark"] .value-item h4,
:root[data-theme="dark"] .value-item p,
:root[data-theme="dark"] .motto,
:root[data-theme="dark"] .modal-detail h3,
:root[data-theme="dark"] .modal-detail p,
:root[data-theme="dark"] .feature-card h3,
:root[data-theme="dark"] .category-card h4,
:root[data-theme="dark"] .resource-content h3,
:root[data-theme="dark"] .contact-item h4,
:root[data-theme="dark"] .contact-info h3,
:root[data-theme="dark"] .contact-form-container h3 {
    color: var(--text-dark);
}

:root[data-theme="dark"] .category-card h4 {
    color: var(--primary-color);
}

/* Service overlay (image overlay) stays the same — already dark */

/* Final CTA section bg gradient — readable */
:root[data-theme="dark"] .final-cta {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
}

/* Smooth color transitions when toggling */
body,
.navbar,
.feature-card,
.category-card,
.resource-card,
.values-card,
.news-table-container,
.news-pagination-btn,
.news-pagination-page,
.modal-detail,
.contact-form-container,
.form-group input,
.form-group select,
.form-group textarea,
.newsletter-form input,
.footer {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}