@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700;800&family=Sora:wght@300;400;500;600;700;800&display=swap');

/* --- CUSTOM VARIABLES --- */
:root {
    /* Color Palette */
    --primary: #0A2A66;
    --primary-light: #164095;
    --primary-dark: #051636;
    --accent: #FF7A00;
    --accent-hover: #E06B00;
    --accent-light: rgba(255, 122, 0, 0.1);
    
    /* Product Sub-Themes */
    --school-theme: #0A2A66;
    --hospital-theme: #00A896;
    --rankready-theme: #8A2BE2;
    --algo-theme: #00FF66;
    --algo-bg: #0D131F;
    
    /* Neutral Colors */
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --text-light: #F1F5F9;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-light: rgba(255, 255, 255, 0.2);
    
    /* Glassmorphism Defaults */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-dark: rgba(13, 19, 31, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(10, 42, 102, 0.06);
    
    /* Fonts */
    --font-primary: 'Inter', sans-serif;
    --font-title: 'Sora', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    
    /* Layout */
    --nav-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    
    /* Transitions */
    --transition-fast: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transform: none !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-family: var(--font-title);
    font-weight: 800;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

/* --- UTILITIES & LAYOUT --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-bg-gradient {
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 50%, #F5F3FF 100%);
}

.section-bg-dark {
    background-color: var(--primary-dark);
    color: var(--text-light);
}

.section-bg-dark h2, 
.section-bg-dark h3, 
.section-bg-dark h4 {
    color: var(--text-light);
}

.section-bg-dark p {
    color: #94A3B8;
}

.text-center { text-align: center; }
.text-accent { color: var(--accent); }

.section-header {
    max-width: 700px;
    margin: 0 auto 60px auto;
    text-align: center;
}

.section-header .badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(10, 42, 102, 0.05);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    border: 1px solid rgba(10, 42, 102, 0.1);
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.section-header p {
    font-size: 1.125rem;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--bg-white);
    box-shadow: 0 4px 14px rgba(10, 42, 102, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 42, 102, 0.3);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #FF9933 100%);
    color: var(--bg-white);
    box-shadow: 0 4px 14px rgba(255, 122, 0, 0.2);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 122, 0, 0.3);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--primary-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: rgba(10, 42, 102, 0.2);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.btn-outline-white {
    background: transparent;
    color: var(--bg-white);
    border: 2px solid var(--bg-white);
}

.btn-outline-white:hover {
    background-color: var(--bg-white);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* --- GLASSMORPHISM CARDS --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-md);
    padding: 30px;
    transition: var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(10, 42, 102, 0.1);
    border-color: rgba(255, 122, 0, 0.2);
}

/* --- STICKY NAVIGATION --- */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-normal);
}

.header-scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* For inner pages overlaying dark header sections */
.header-dark-nav .logo {
    color: var(--bg-white);
}

.header-dark-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
}

.header-dark-nav .nav-link:hover,
.header-dark-nav .nav-link.active {
    color: var(--bg-white);
}

.header-dark-nav .mobile-toggle span {
    background-color: var(--bg-white);
}

/* Scrolled state for dark nav header */
.header-dark-nav.header-scrolled .logo {
    color: var(--primary-dark);
}

.header-dark-nav.header-scrolled .nav-link {
    color: var(--text-dark);
}

.header-dark-nav.header-scrolled .nav-link:hover {
    color: var(--accent);
}

.header-dark-nav.header-scrolled .nav-link.active {
    color: var(--primary);
}

.header-dark-nav.header-scrolled .mobile-toggle span,
.header-dark-nav .mobile-toggle.active span {
    background-color: var(--primary-dark) !important;
}

.navbar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-dark);
    transition: color var(--transition-fast);
}

.logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
    transition: filter var(--transition-fast);
    vertical-align: middle;
}

/* Logo visibility rules for dual-logo setup (light and color) */
.logo img.logo-light {
    display: none;
}
.logo img.logo-color {
    display: inline-block;
}

/* On transparent dark navigation header, show light logo and hide color logo */
.header-dark-nav:not(.header-scrolled) .logo img.logo-light {
    display: inline-block;
}
.header-dark-nav:not(.header-scrolled) .logo img.logo-color {
    display: none;
}

.logo-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.6vw, 24px);
}

.nav-item {
    position: relative;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 8px 0;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    padding: 20px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 100;
    display: grid;
    gap: 15px;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.dropdown-item {
    display: flex;
    align-items: start;
    gap: 12px;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--bg-light);
}

.dropdown-icon {
    font-size: 1.25rem;
    margin-top: 2px;
}

.dropdown-details h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
    font-weight: 600;
}

.dropdown-details p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1010;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary-dark);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* --- FOOTER --- */
.footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 80px 0 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer h3, .footer h4 {
    color: var(--bg-white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-info .logo {
    color: var(--bg-white);
    margin-bottom: 20px;
}

.footer-info p {
    color: #94A3B8;
    margin-bottom: 24px;
    font-size: 0.95rem;
    max-width: 320px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--text-light);
    transition: var(--transition-normal);
}

.social-icon:hover {
    background-color: var(--accent);
    color: var(--bg-white);
    transform: translateY(-3px);
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent);
}

.footer-links ul {
    display: grid;
    gap: 12px;
}

.footer-links a {
    color: #94A3B8;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-newsletter h4 {
    font-size: 1.1rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}

.footer-newsletter h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent);
}

.footer-newsletter p {
    color: #94A3B8;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--bg-white);
    font-family: var(--font-primary);
    font-size: 0.9rem;
}

.newsletter-form input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.1);
}

.newsletter-form button {
    background-color: var(--accent);
    color: var(--bg-white);
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
}

.newsletter-form button:hover {
    background-color: var(--accent-hover);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: #64748B;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

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

/* --- WHATSAPP FLOATING BUTTON --- */
.whatsapp-float {
    position: fixed !important;
    bottom: 30px !important;
    left: 30px !important;
    z-index: 99999 !important;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: var(--bg-white);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-slow);
    position: relative;
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

.whatsapp-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--accent);
    color: var(--bg-white);
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid var(--bg-white);
    animation: pulse 2s infinite;
}

.whatsapp-chat-box {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 320px;
    background-color: var(--bg-white);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-slow);
}

.whatsapp-chat-box.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-chat-header {
    background-color: #0A2A66;
    color: var(--bg-white);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
}

.whatsapp-chat-header-info h4 {
    font-size: 0.95rem;
    color: var(--bg-white);
}

.whatsapp-chat-header-info p {
    font-size: 0.75rem;
    color: #94A3B8;
}

.whatsapp-chat-body {
    background-color: #ECE5DD;
    padding: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.whatsapp-msg {
    background-color: var(--bg-white);
    padding: 10px 14px;
    border-radius: 0 10px 10px 10px;
    font-size: 0.85rem;
    max-width: 85%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.whatsapp-msg-time {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.whatsapp-chat-footer {
    padding: 12px;
    background-color: #F0F0F0;
    display: flex;
    gap: 10px;
}

.whatsapp-chat-footer input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 20px;
    border: none;
    font-family: var(--font-primary);
    font-size: 0.85rem;
}

.whatsapp-chat-footer input:focus {
    outline: none;
}

.whatsapp-chat-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #25D366;
    color: var(--bg-white);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.whatsapp-chat-send:hover {
    background-color: #128C7E;
}

/* --- SCROLL PROGRESS INDICATOR --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--accent);
    z-index: 1050;
    width: 0;
    transition: width 0.1s ease-out;
}

/* --- DEMO BOOKING POPUP --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 22, 54, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-white);
    width: 100%;
    max-width: 600px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 50px rgba(10, 42, 102, 0.25);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    transform: translateY(40px);
    transition: var(--transition-slow);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--accent);
}

.modal-header-section {
    background-color: var(--primary);
    padding: 30px;
    color: var(--bg-white);
}

.modal-header-section h3 {
    color: var(--bg-white);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.modal-header-section p {
    color: #94A3B8;
    font-size: 0.9rem;
}

.modal-body-section {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition-fast);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(22, 64, 149, 0.15);
}

.booking-success-msg {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.booking-success-msg i {
    font-size: 4rem;
    color: #25D366;
    margin-bottom: 20px;
}

.booking-success-msg h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

/* --- ANIMATIONS AND SCROLL EFFECTS --- */
body {
    animation: pageEnter 0.5s ease-out;
}

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

.fade-in {
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.scale-in {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1) !important;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 122, 0, 0.45); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(255, 122, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 122, 0, 0); }
}

.floating-element {
    animation: float 5s ease-in-out infinite;
}

/* Hover Micro-Animations */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100% !important;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 122, 0, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(10, 42, 102, 0.25);
}

.btn-nav:hover {
    box-shadow: 0 4px 15px rgba(10, 42, 102, 0.15);
}


/* Responsive Overrides */
.mobile-nav-cta {
    display: none !important;
}

@media (max-width: 1024px) {
    .nav-links {
        gap: 12px;
    }
    .nav-link {
        font-size: 0.88rem;
    }
    .btn-nav {
        padding: 8px 14px;
        font-size: 0.82rem;
        white-space: nowrap;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .footer-info {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 70px;
    }
    .section {
        padding: 50px 0 !important;
    }
    .section-header h2 {
        font-size: 1.75rem !important;
    }

    /* --- MOBILE NAVIGATION DRAWER --- */
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-white) !important;
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px 80px 20px;
        gap: 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 15px 35px rgba(0,0,0,0.15);
        z-index: 99998;
    }
    .nav-links.active {
        display: flex;
    }

    /* Enforce dark, high-contrast links inside drawer even on dark-header pages */
    .nav-links .nav-link,
    .header-dark-nav .nav-links .nav-link,
    .header-dark-nav:not(.header-scrolled) .nav-links .nav-link,
    .header-dark-nav.header-scrolled .nav-links .nav-link {
        color: var(--text-dark) !important;
        font-size: 1.05rem;
        font-weight: 600;
        padding: 10px 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    .nav-links .nav-link:hover,
    .nav-links .nav-link.active,
    .header-dark-nav .nav-links .nav-link:hover,
    .header-dark-nav .nav-links .nav-link.active {
        color: var(--accent) !important;
    }

    /* Mobile Dropdown Menu */
    .nav-item {
        width: 100%;
    }
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--border-radius-sm) !important;
        background: var(--bg-light) !important;
        padding: 10px !important;
        margin-top: 6px !important;
        min-width: 100% !important;
        display: none !important;
        gap: 8px !important;
    }
    .nav-item.dropdown-open .dropdown-menu {
        display: grid !important;
    }
    .dropdown-item {
        padding: 8px 10px;
        background: #fff;
        border-radius: 6px;
        border: 1px solid rgba(0,0,0,0.04);
    }
    .dropdown-details h4 {
        font-size: 0.9rem;
        color: var(--primary-dark);
    }
    .dropdown-details p {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .mobile-toggle {
        display: flex;
    }
    .navbar .btn-nav {
        display: none;
    }

    /* Footer adjustments */
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-info {
        grid-column: span 1;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    /* --- UNIVERSAL MOBILE GRID COLLAPSE --- */
    /* Automatically stack any inline or styled multi-column grids on mobile */
    [style*="display: grid"],
    [style*="display:grid"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Container & Spacing Polish */
    .container {
        padding: 0 16px !important;
    }

    /* --- RESPONSIVE TYPOGRAPHY ON MOBILE --- */
    h1,
    [style*="font-size: 2.75rem"],
    [style*="font-size: 3rem"] {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
    }
    h2,
    [style*="font-size: 1.75rem"],
    [style*="font-size: 1.95rem"],
    [style*="font-size: 2rem"] {
        font-size: 1.35rem !important;
        line-height: 1.3 !important;
    }
    h3,
    [style*="font-size: 1.25rem"],
    [style*="font-size: 1.3rem"] {
        font-size: 1.15rem !important;
    }

    /* Word breaking & text safety */
    h1, h2, h3, h4, h5, h6, p, span, a, td, th {
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }

    /* Cards with large inline padding scaled down */
    [style*="padding: 36px 42px"],
    [style*="padding: 42px"],
    [style*="padding: 32px 36px"],
    [style*="padding: 28px 32px"] {
        padding: 20px 16px !important;
    }

    /* Hero Action Bars stack vertically on mobile */
    [style*="display: flex; justify-content: space-between; align-items: center;"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    [style*="display: flex; justify-content: space-between; align-items: center;"] a.btn,
    [style*="display: flex; justify-content: space-between; align-items: center;"] button {
        width: 100% !important;
        text-align: center !important;
    }

    /* Visual hero cards */
    img[style*="height: 420px"],
    img[style*="height: 380px"] {
        height: 220px !important;
        object-fit: cover !important;
    }

    /* Form Inputs on mobile: 16px font-size prevents iOS Safari zoom */
    .form-group input, 
    .form-group select, 
    .form-group textarea,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Floating Action Buttons on mobile */
    .floating-whatsapp,
    .whatsapp-float {
        bottom: 16px !important;
        left: 16px !important;
        right: auto !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 26px !important;
        z-index: 99999 !important;
    }
    .back-to-top,
    #backToTop {
        bottom: 16px !important;
        right: 16px !important;
        left: auto !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 16px !important;
        z-index: 99999 !important;
    }
}

/* Extra Small Phones (< 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 14px !important;
    }
    h1,
    [style*="font-size: 2.75rem"],
    [style*="font-size: 3rem"] {
        font-size: 1.6rem !important;
        line-height: 1.25 !important;
    }
    h2,
    [style*="font-size: 1.75rem"],
    [style*="font-size: 1.95rem"],
    [style*="font-size: 2rem"] {
        font-size: 1.25rem !important;
    }
    .btn {
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
    }
}

/* --- BACK TO TOP BUTTON (Desktop Defaults) --- */
.back-to-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(10, 42, 102, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 20px, 0);
    transition: opacity var(--transition-normal), transform var(--transition-normal), background var(--transition-fast), visibility var(--transition-normal), box-shadow var(--transition-normal);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--accent) 0%, #FF9933 100%);
    transform: translate3d(0, -8px, 0) scale(1.08) !important;
    box-shadow: 0 8px 25px rgba(255, 122, 0, 0.4);
    color: var(--bg-white);
    animation: none !important;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
    animation: float-btn 3s ease-in-out infinite;
}

@keyframes float-btn {
    0% { transform: translate3d(0, 0, 0); box-shadow: 0 4px 20px rgba(10, 42, 102, 0.25); }
    50% { transform: translate3d(0, -6px, 0); box-shadow: 0 8px 25px rgba(255, 122, 0, 0.35); }
    100% { transform: translate3d(0, 0, 0); box-shadow: 0 4px 20px rgba(10, 42, 102, 0.25); }
}

