/* =============================================
   MI HABANA CV - Premium CSS
   ============================================= */

/* CSS Variables */
:root {
    --primary: #002A8F;
    --primary-light: #1a45a8;
    --primary-dark: #001f6b;
    --secondary: #CF142B;
    --secondary-light: #e8293f;
    --secondary-dark: #a50e22;
    --accent: #F7C948;
    --success: #25D366;
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --dark-bg: #0A0F1E;
    --dark-surface: #141929;
    --dark-border: #1E2D4A;

    --font-primary: 'Inter', 'Roboto', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--mud-palette-background, var(--white));
    color: var(--mud-palette-text-primary, var(--gray-900));
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* =============================================
   CUSTOM SCROLLBAR
   ============================================= */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--mud-palette-background-gray, var(--gray-100));
}

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

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

/* =============================================
   PAGE WRAPPER
   ============================================= */

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =============================================
   NAVBAR
   ============================================= */

.navbar-main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 42, 143, 0.1);
    transition: var(--transition);
}

.navbar-main.dark {
    background: rgba(10, 15, 30, 0.95);
    border-bottom-color: rgba(74, 114, 255, 0.15);
}

.navbar-main.navbar-scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo */
.navbar-logo-img {
    height: 42px;
    width: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-mi {
    color: var(--primary);
}

.logo-habana {
    color: var(--secondary);
    margin: 0 2px;
}

.logo-cv {
    background: var(--primary);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    font-size: 1.1rem;
    font-weight: 700;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.navbar-main.dark .logo-text {
    color: #fff;
}

/* Nav Links */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.navbar-links .nav-link {
    padding: 0.5rem 0.875rem;
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.navbar-links .nav-link:hover {
    color: var(--primary);
    background: rgba(0, 42, 143, 0.06);
}

.navbar-main.dark .navbar-links .nav-link {
    color: #94A3B8;
}

.navbar-main.dark .navbar-links .nav-link:hover {
    color: #4A72FF;
    background: rgba(74, 114, 255, 0.1);
}

/* Navbar Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-whatsapp-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.875rem;
    background: var(--success);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-whatsapp-nav:hover {
    background: #1da851;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-login-nav {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.2s;
}
.btn-login-nav:hover { color: var(--primary); }

.btn-demo-nav {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gray-300);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-demo-nav:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0,42,143,0.04);
}

.btn-trial-nav {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    background: var(--secondary);
    color: white !important;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-trial-nav:hover {
    background: var(--secondary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(207,20,43,0.35);
}

.mobile-nav-demo {
    border: 1.5px solid var(--gray-300);
    margin-top: 0.25rem;
}

.mobile-nav-trial {
    background: var(--secondary);
    color: white !important;
    font-weight: 700;
    text-align: center;
    border-radius: var(--radius-sm);
}

.mobile-menu-btn {
    display: none !important;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid var(--gray-200);
    gap: 0.25rem;
}

.mobile-nav-link {
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

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

/* =============================================
   HERO SECTION
   ============================================= */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, #1a45a8 70%, #0d3b8f 100%);
    padding-top: 70px;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 120px;
    background: white;
    clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 1.5rem 8rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-title .highlight {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 0.875rem 2rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(207, 20, 43, 0.4);
}

.btn-outline {
    padding: 0.875rem 2rem;
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* =============================================
   SECTIONS
   ============================================= */

.section {
    padding: 5rem 1.5rem;
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* =============================================
   CARDS
   ============================================= */

.card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: white;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.card-text {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
    background: var(--gray-900);
    color: white;
    padding: 4rem 0 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-img {
    height: 28px;
    width: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-heading {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: white;
    padding-left: 4px;
}

.footer-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact-list li {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-contact-list a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
}

.footer-contact-list a:hover {
    color: white;
}

.footer-bottom {
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.admin-link {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
    transition: var(--transition-fast);
}

.admin-link:hover {
    color: rgba(255, 255, 255, 0.5);
}

/* =============================================
   WHATSAPP FLOATING BUTTON
   ============================================= */

.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    transition: var(--transition);
    position: relative;
    animation: pulse-whatsapp 2.5s infinite;
}

.whatsapp-btn:hover {
    background: #1da851;
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
    animation: none;
}

.whatsapp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.whatsapp-btn:hover .whatsapp-tooltip {
    opacity: 1;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
}

/* =============================================
   ANIMATIONS
   ============================================= */

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.7s ease forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.7s ease forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.7s ease forwards;
}

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

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* =============================================
   GRID UTILITIES
   ============================================= */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* =============================================
   BADGES
   ============================================= */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(0, 42, 143, 0.1);
    color: var(--primary);
}

.badge-secondary {
    background: rgba(207, 20, 43, 0.1);
    color: var(--secondary);
}

.badge-success {
    background: rgba(37, 211, 102, 0.12);
    color: #0e9b44;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    .mobile-menu {
        display: flex;
    }

    .btn-whatsapp-nav span {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .whatsapp-float {
        bottom: 1.25rem;
        right: 1.25rem;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 1rem;
        height: 60px;
    }

    .navbar-logo {
        font-size: 1.25rem;
    }
}

/* =============================================
   BLAZOR ERROR UI
   ============================================= */

#blazor-error-ui {
    background: #CF142B;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 10000;
    color: white;
    font-size: 0.9rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary::after {
    content: "Ha ocurrido un error.";
}

/* =============================================
   LANDING PAGE — SHARED UTILITIES
   ============================================= */

.lp-section-padding {
    padding: 80px 0;
}

.lp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.lp-section-header {
    margin-bottom: 48px;
}

.lp-section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--secondary);
    margin-bottom: 0.6rem;
}

.lp-section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.lp-section-subtitle {
    font-size: 1.05rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Animate float keyframe (shared across hero cards) */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

.animate-float.delay-200 { animation-delay: 0.4s; }
.animate-float.delay-300 { animation-delay: 0.8s; }
.animate-float.delay-400 { animation-delay: 1.2s; }

@media (max-width: 768px) {
    .lp-section-padding {
        padding: 56px 0;
    }

    .lp-container {
        padding: 0 16px;
    }
}

/* =============================================
   ADMIN PAGES
   ============================================= */

/* Aligns full-width outlined buttons (Limpiar) with labeled inputs in filter rows */
.mud-grid-item:has(> button.mud-button-outlined.mud-width-full) {
    display: flex !important;
    align-items: center;
}

.stat-card {
    padding: 24px;
    border-radius: 16px;
}

.stat-card-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-number {
    font-weight: 700;
    font-size: 2rem;
}

.stat-label {
    color: var(--mud-palette-text-secondary);
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #001A5C 0%, #002A8F 50%, #0037B8 100%);
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #002A8F;
}

.login-subtitle {
    color: #6B7280;
    margin-top: 4px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
}

/* Hero illustration: move rating badge to left side to avoid overlap with map card */
.hero-rating-badge {
    right: auto !important;
    left: 0 !important;
}

/* Blazor adds tabindex="-1" to headings for navigation focus management — suppress the browser outline */
[tabindex="-1"]:focus {
    outline: none !important;
}

/* =============================================
   Legal pages (Privacy Policy, Terms of Service)
   ============================================= */
.legal-hero {
    padding: 4rem 1.5rem 3rem;
    background: linear-gradient(135deg, #001A5C 0%, #002A8F 60%, #1a45a8 100%);
    text-align: center;
}
.legal-hero-inner { max-width: 680px; margin: 0 auto; }
.legal-hero-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 800; color: white; margin: 0 0 0.5rem; }
.legal-hero-sub { font-size: 0.9rem; color: rgba(255,255,255,0.6); }

.legal-body { padding: 4rem 1.5rem 5rem; background: var(--gray-100); }

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    align-items: start;
}

.legal-toc {
    background: white;
    border-radius: 14px;
    padding: 1.5rem;
    position: sticky;
    top: 90px;
    box-shadow: 0 2px 12px rgba(0,42,143,0.04);
    font-size: 0.85rem;
}
.legal-toc strong { display: block; color: var(--gray-900); margin-bottom: 0.75rem; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; }
.legal-toc ol { padding-left: 1.25rem; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.legal-toc a { color: var(--primary); text-decoration: none; line-height: 1.5; }
.legal-toc a:hover { text-decoration: underline; }

.legal-content {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 16px rgba(0,42,143,0.05);
}
.legal-content h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 2rem 0 0.75rem;
    padding-top: 0.5rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.75;
    margin-bottom: 1rem;
}
.legal-content ul, .legal-content ol {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.75;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.legal-content a { color: var(--primary); text-decoration: none; }
.legal-content a:hover { text-decoration: underline; }

.legal-notice {
    background: rgba(207, 20, 43, 0.07);
    border-left: 3px solid var(--secondary);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #7a0012;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.legal-content ul ul {
    margin-top: 0.4rem;
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.legal-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 1.4rem 0 0.5rem;
}

.legal-review {
    background: rgba(217,119,6,0.07);
    border-left: 3px solid #d97706;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
    color: #78350f;
    line-height: 1.6;
    margin: 0.75rem 0 1rem;
}

.legal-table-wrap {
    overflow-x: auto;
    margin: 0.75rem 0 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.legal-table th {
    background: var(--primary);
    color: white;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.legal-table td {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
    color: var(--gray-600);
    line-height: 1.5;
}

.legal-table tr:last-child td { border-bottom: none; }
.legal-table tr:nth-child(even) td { background: rgba(0,42,143,0.025); }

@media (max-width: 768px) {
    .legal-container { grid-template-columns: 1fr; }
    .legal-toc { position: static; }
    .legal-body { padding: 3rem 1rem; }
    .legal-content { padding: 1.75rem 1.25rem; }
}

