:root {
    --primary: #0062b1;
    --primary-hover: #004e8c;
    --secondary: #73c032;
    --dark: #1a1a1a;
    --light: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-600: #6c757d;
    --gray-800: #343a40;
    
    /* Dynamic Theme Variables */
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #ffffff;
    --footer-bg: #ffffff;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --top-bar-bg: #1a1a1a;
    --hero-overlay: rgba(0, 0, 0, 0.65); /* Dark in dark mode */
    
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --container-width: 1200px;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1e1e1e;
    --footer-bg: #1e1e1e;
    --card-bg: #1e1e1e;
    --border-color: #333333;
    --top-bar-bg: #000000;
    --gray-800: #f8f9fa;
    --gray-600: #b0b0b0;
    --hero-overlay: rgba(0, 0, 0, 0.75); /* Dark in dark mode */
}

body.dark-mode .hero-content h1,
body.dark-mode .hero-content p {
    color: #ffffff;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header Styles --- */

/* Top Bar */
.top-bar {
    background-color: var(--top-bar-bg);
    color: var(--light);
    font-size: 13px;
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-item i {
    color: var(--primary);
}

.top-bar-item a {
    color: inherit;
    text-decoration: none;
}

.top-bar-item a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 10px;
    margin-left: 15px;
}

.social-links a:hover {
    color: var(--primary);
}

/* Main Header */
.main-header {
    background: var(--header-bg);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
    filter: var(--logo-filter, none);
}

/* Hamburger Menu */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    margin-right: 20px;
    align-items: center;
    justify-content: center;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle:hover span {
    background-color: var(--primary-hover);
}

/* Ensure icons and links adapt to theme */
.action-icon, .nav-link {
    color: var(--text-color);
}

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

/* Nav Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-800);
    padding: 5px 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

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

.nav-link i {
    font-size: 10px;
    margin-top: 2px;
}

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

.nav-menu > li.has-submenu {
    position: relative;
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.action-icon {
    font-size: 18px;
    color: var(--gray-800);
}

.action-icon:hover {
    color: var(--primary);
}

/* Buttons */
.btn-afiliate {
    background: var(--primary);
    color: var(--light);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 98, 177, 0.3);
}

.btn-afiliate:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 98, 177, 0.4);
}

/* Phone Info */
.phone-info {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid var(--gray-200);
    padding-left: 20px;
}

.phone-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.phone-text span {
    display: block;
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1;
    transition: color 0.3s;
}

.phone-text strong {
    display: block;
    font-size: 16px;
    color: var(--text-color);
    font-weight: 800;
    transition: color 0.3s;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    color: var(--text-color);
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
    background-color: var(--bg-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('imgs/banner_asistencia.jpeg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 0;
}

body.dark-mode .hero {
    background-color: #050a12;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    text-wrap: balance;
    color: #ffffff;
}

.hero-content p {
    font-size: clamp(16px, 2vw, 20px);
    margin-bottom: 35px;
    opacity: 0.9;
    max-width: 600px;
    color: #ffffff;
}

.hero-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-whatsapp {
    background: #25D366;
    /* WhatsApp Green */
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.btn-form {
    background: #5CB6FF;
    /* Yellow from screenshot */
    color: #000;
}

.btn-form:hover {
    background: #2EA1FF;
    box-shadow: #002747;
}

/* Mobile Menu Drawer */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    visibility: hidden;
    transition: all 0.4s ease;
}

.mobile-menu.active {
    left: 0;
    visibility: visible;
}

.mobile-menu-content {
    --mobile-menu-px: 18px;
    width: min(300px, 88vw);
    height: 100%;
    max-height: 100dvh;
    background: var(--header-bg);
    padding: 16px var(--mobile-menu-px) 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    box-sizing: border-box;
}

.mobile-menu-header-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.mobile-menu-content .dark-mode-toggle {
    flex: 1;
    min-width: 0;
    background: none;
    border: 2px solid var(--primary);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.mobile-menu-content .dark-mode-toggle-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-menu-content .dark-mode-toggle:hover {
    background: var(--primary);
    color: var(--light);
}

.mobile-menu-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: var(--gray-200);
    color: var(--primary);
}

body.dark-mode .mobile-menu-close:hover {
    background: var(--border-color);
}

.mobile-nav-links {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Filas de navegación: misma caja, línea inferior a ancho del panel (borde a borde) */
.mobile-nav-links > li:has(> a),
.mobile-nav-links > li.mobile-nav-group {
    margin: 0 calc(-1 * var(--mobile-menu-px));
    padding: 0 var(--mobile-menu-px);
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
}

.mobile-nav-links a {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-color);
    min-height: 50px;
    box-sizing: border-box;
    padding: 0;
    display: flex;
    align-items: center;
    border-bottom: none;
    width: 100%;
}

.mobile-nav-links a:hover {
    color: var(--primary);
}

.mobile-nav-group {
    padding: 0;
    border: none;
}

.mobile-nav-group-toggle {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-color);
    font-family: inherit;
    transition: color 0.2s;
    text-align: left;
    box-sizing: border-box;
}

.mobile-nav-group-toggle:hover {
    color: var(--primary);
}

.mobile-nav-group-toggle i {
    font-size: 12px;
    transition: transform 0.3s;
}

.mobile-nav-group.is-open .mobile-nav-group-toggle i {
    transform: rotate(180deg);
}

.mobile-nav-sub {
    display: none;
    flex-direction: column;
    gap: 0;
    padding-left: 16px;
}

.mobile-nav-group.is-open .mobile-nav-sub {
    display: flex;
}

.mobile-nav-sub a {
    font-size: 16px;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: none;
    color: var(--text-color);
}

.mobile-nav-sub a:hover {
    color: var(--primary);
}

/* --- Mobile Menu Dark Toggle Switch --- */
.mobile-menu-section-divider {
    height: 0;
    margin: 8px calc(-1 * var(--mobile-menu-px));
    padding: 0;
    border: none;
    border-top: 1px solid var(--border-color);
    background: none;
    list-style: none;
}

.mobile-menu-config-header {
    margin: 8px calc(-1 * var(--mobile-menu-px)) 0;
    padding: 4px var(--mobile-menu-px);
    box-sizing: border-box;
}

.mobile-menu-config-header span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-600);
}

.mobile-menu-dark-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 calc(-1 * var(--mobile-menu-px));
    padding: 8px var(--mobile-menu-px);
    box-sizing: border-box;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--gray-200);
    border-radius: 26px;
    transition: background-color 0.3s;
}

.theme-switch-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.theme-switch input:checked + .theme-switch-slider {
    background-color: var(--primary);
}

.theme-switch input:checked + .theme-switch-slider::before {
    transform: translateX(22px);
}

.theme-switch-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-icon-light {
    display: none;
}

.theme-switch input:checked ~ .theme-switch-slider + .theme-switch-label .theme-icon-light {
    display: inline;
}

.theme-switch input:checked ~ .theme-switch-slider + .theme-switch-label .theme-icon-dark {
    display: none;
}

/* Hamburger Menu - Always visible as per user request for dark mode access */
.menu-toggle {
    display: flex;
}

@media (max-width: 768px) {
    .top-bar {
        font-size: 12px;
        padding: 10px 0;
    }

    .top-bar .container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .top-bar-left,
    .top-bar-right {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 10px 14px;
    }

    .top-bar-right {
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        flex-direction: column;
    }

    .top-bar-item {
        flex: 1 1 100%;
        max-width: 100%;
        align-items: flex-start;
    }

    .top-bar-item span,
    .top-bar-item a {
        line-height: 1.45;
        word-break: break-word;
        hyphens: auto;
    }

    .social-links {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
    }

    .nav-menu {
        display: none;
    }

    .main-header .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 8px 12px;
    }

    .menu-toggle {
        margin-right: 0;
        padding: 8px;
    }

    .logo {
        justify-self: center;
    }

    .logo img {
        height: 48px;
    }

    .header-actions {
        justify-self: end;
    }

    .phone-info {
        border-left: none;
        padding-left: 0;
        gap: 8px;
    }

    .phone-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .phone-text span {
        font-size: 10px;
    }

    .phone-text strong {
        font-size: 13px;
    }

    .hero {
        height: auto;
        min-height: unset; /* no forzar 500px: "cover" recortaba demasiado en panorámica */
        padding: 100px 0;
        text-align: center;
        /* Si el fondo queda con bandas (100% auto), que no choque con el claro */
        background-color: #0a0f1a;
    }

    .hero::before {
        /* Panorámica: ancho completo, alto proporcional = menos "zoom" que cover */
        background-size: 100% auto;
        background-position: center top;
    }

    .hero-content {
        margin: 0 auto;
    }

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

    .hero-overlay {
        background: rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 380px) {
    .phone-text span {
        display: none;
    }

    .phone-text strong {
        font-size: 14px;
    }

    .mobile-menu-content .dark-mode-toggle {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* --- Floating Buttons --- */
.floating-btns {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.float-btn:hover {
    transform: scale(1.1);
}

.float-btn.btn-wa {
    background: #25D366;
}

.float-btn.btn-wa:hover {
    background: #128C7E;
}

.float-btn.btn-form {
    background: #004E8C;
    color: #ffffff;
}

.float-btn.btn-form:hover {
    background: #0073D1;
}

button.float-btn {
    border: none;
    padding: 0;
    cursor: pointer;
}

/* --- Modal formulario --- */
body.form-modal-open {
    overflow: hidden;
}

.form-modal[hidden] {
    display: none !important;
}

.form-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px 32px;
    box-sizing: border-box;
    overflow-y: auto;
}

.form-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
}

.form-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    margin-top: 0;
    margin-bottom: auto;
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
}

#planes-catalog-modal .form-modal-dialog--planes-catalog {
    width: min(980px, 100%);
}

.planes-catalog-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.planes-catalog-modal-footer {
    flex-shrink: 0;
    margin-top: 0;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--border-color);
}

.listado-planes-grid--modal {
    margin-top: 0.75rem;
}

.form-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.form-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}

.form-modal-close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.form-modal-close:hover {
    background: var(--gray-200);
    color: var(--primary);
}

body.dark-mode .form-modal-close:hover {
    background: var(--border-color);
}

.form-modal-body {
    padding: 16px 20px 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.form-modal-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.form-modal-fieldset legend {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-600);
    margin-bottom: 10px;
    padding: 0;
}

.form-type-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-type-option {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.form-type-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(0, 98, 177, 0.08);
    color: var(--primary);
}

body.dark-mode .form-type-option:has(input:checked) {
    background: rgba(0, 98, 177, 0.2);
}

.form-type-option i {
    font-size: 18px;
    margin-right: 4px;
}

.form-type-option input {
    accent-color: var(--primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.form-field-span2 {
    grid-column: 1 / -1;
}

.form-field-motor.is-hidden {
    display: none !important;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.form-label abbr {
    text-decoration: none;
    color: var(--primary);
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input::placeholder {
    color: var(--gray-600);
    opacity: 0.85;
}

.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.date-input-wrapper input {
    padding-right: 36px;
    cursor: pointer;
}

.date-input-icon {
    position: absolute;
    right: 10px;
    color: var(--gray-600);
    pointer-events: none;
    font-size: 14px;
}

/* Hide native date input calendar icon */
.date-input-native::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 98, 177, 0.2);
}

.form-modal-submit-feedback {
    font-size: 14px;
    color: var(--secondary);
    font-weight: 600;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(115, 192, 50, 0.12);
    border: 1px solid rgba(115, 192, 50, 0.35);
}

body.dark-mode .form-modal-submit-feedback {
    color: #9fd65a;
}

.form-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.btn-form-modal-primary,
.btn-form-modal-secondary {
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: var(--transition);
}

.btn-form-modal-primary {
    background: var(--primary);
    color: var(--light);
}

.btn-form-modal-primary:hover {
    background: var(--primary-hover);
}

.btn-form-modal-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-form-modal-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 560px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-span2 {
        grid-column: 1;
    }
}

@supports not selector(:has(*)) {
    .form-type-option input:checked + span {
        font-weight: 800;
    }
}

/* --- Footer --- */
.footer {
    background: var(--footer-bg);
    color: var(--text-color);
    padding: 60px 0 0;
    border-top: 1px solid var(--border-color);
    transition: background 0.3s, color 0.3s;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--gray-800);
}

.footer-brand img {
    height: 50px;
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 14px;
    opacity: 0.7;
}

.footer-links h4,
.footer-social h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 14px;
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary);
}

.footer-links li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.7;
}

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

.footer-social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social-links a:hover {
    background: var(--primary);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    opacity: 0.6;
}

@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* --- Página Política de privacidad --- */
.policy-header-bar {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.policy-header-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.policy-header-bar .logo img {
    height: 44px;
}

.policy-back-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.policy-back-link:hover {
    color: var(--primary-hover);
}

.policy-page {
    padding: 40px 0 60px;
}

.policy-page .policy-content {
    max-width: 800px;
    margin: 0 auto;
}

.policy-page .policy-content h1 {
    font-size: 1.65rem;
    margin-bottom: 0.35rem;
    color: var(--primary);
    line-height: 1.25;
}

.policy-page .policy-content .policy-meta {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.policy-page .policy-content h2 {
    font-size: 1.1rem;
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
    color: var(--dark);
}

body.dark-mode .policy-page .policy-content h2 {
    color: var(--text-color);
}

.policy-page .policy-content p {
    margin-bottom: 1rem;
    font-size: 15px;
}

.policy-page .policy-content ul.policy-list {
    list-style: disc;
    margin: 0.5rem 0 1rem 1.25rem;
    padding-left: 0.5rem;
}

.policy-page .policy-content ul.policy-list li {
    margin-bottom: 0.4rem;
    font-size: 15px;
}

.policy-page .policy-content .policy-block {
    margin-bottom: 1rem;
    font-size: 15px;
}

.policy-page .policy-content a {
    color: var(--primary);
}

.policy-page .policy-content a:hover {
    color: var(--primary-hover);
}

/* Páginas de detalle de servicio (grúa, ambulancia) */
.service-hero {
    width: 100%;
    max-height: min(48vh, 440px);
    min-height: 200px;
    overflow: hidden;
    background: #050a12;
}

.service-hero img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    max-height: min(48vh, 440px);
    object-fit: cover;
    object-position: center;
    display: block;
}

.service-info-page {
    padding: 32px 0 56px;
    background-color: var(--bg-color);
}

.service-info-page .policy-content h1 {
    color: var(--primary);
    font-size: clamp(24px, 5vw, 32px);
    margin-bottom: 16px;
    font-weight: 800;
}

.service-info-page .policy-content p {
    font-size: clamp(15px, 2.5vw, 18px);
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--text-color);
}

.service-info-page .policy-meta {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-info-page .container {
    max-width: 700px;
}

.service-info-page a {
    color: var(--primary);
    font-weight: 600;
}

.service-info-page a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Mejoras para hero section de servicio */
.service-hero {
    position: relative;
    width: 100%;
    max-height: 380px;
    overflow: hidden;
    margin: 0;
    background-color: var(--header-bg);
}

.service-hero img {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
}

.service-hero img:hover {
    opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-hero {
        max-height: 280px;
    }
    
    .service-hero img {
        max-height: 280px;
    }
    
    .service-info-page {
        padding: 24px 0 48px;
    }
}

@media (max-width: 480px) {
    .service-hero {
        max-height: 200px;
    }
    
    .service-hero img {
        max-height: 200px;
    }
}

/* Submenú (Coberturas, etc.) */
.submenu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: var(--header-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    z-index: 1100;
}

.submenu li {
    padding: 0;
    margin: 0;
}

.submenu a {
    display: block;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

.submenu a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

body.dark-mode .submenu a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu,
.has-submenu.is-open .submenu {
    display: block;
}

/* --- Services Carousel --- */
.services-carousel {
    padding: 60px 0;
    background: var(--bg-color);
    transition: background-color 0.3s;
}

.services-carousel-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 32px;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 10px 4px;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    flex: 0 0 calc(50% - 10px);
    min-width: 280px;
    max-width: 420px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    scroll-snap-align: start;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.carousel-slide:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.carousel-slide-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--header-bg);
}

.carousel-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.carousel-slide:hover .carousel-slide-image img {
    transform: scale(1.05);
}

.carousel-slide-content {
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.carousel-slide-icon {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 4px;
}

.carousel-slide-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.carousel-slide-content p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
    flex: 1;
}

.carousel-slide-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.carousel-slide-link i {
    font-size: 11px;
    transition: transform 0.2s;
}

.carousel-slide:hover .carousel-slide-link i {
    transform: translateX(4px);
}

.carousel-btn {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.2s;
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--light);
    transform: scale(1.08);
}

.carousel-indicators {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-200);
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.2s;
}

.carousel-indicator.active {
    background: var(--primary);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .services-carousel {
        padding: 40px 0;
    }

    .carousel-slide {
        flex: 0 0 calc(85% - 10px);
        max-width: none;
    }

    .carousel-btn {
        display: none;
    }

    .carousel-indicators {
        display: flex;
    }
}

@media (max-width: 480px) {
    .carousel-slide {
        flex: 0 0 calc(90% - 10px);
    }

    .carousel-slide-image {
        height: 160px;
    }
}

/* --- Sección Planes --- */
.plans-section {
    padding: 56px 0 64px;
    background: linear-gradient(180deg, var(--gray-100) 0%, var(--bg-color) 48%);
    border-top: 1px solid var(--border-color);
    transition: background 0.3s;
}

body.dark-mode .plans-section {
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.95) 0%, var(--bg-color) 45%);
}

.plans-section-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 12px;
}

.plans-section-error {
    color: #b42318;
    font-weight: 600;
}

body.dark-mode .plans-section-error {
    color: #fca5a5;
}

.plan-cards-empty-msg {
    margin-top: 1rem;
    text-align: center;
}

.plan-card-link-detail {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 0.65rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.plan-card-link-detail:hover {
    text-decoration: underline;
}

body.dark-mode .plan-card-link-detail {
    color: var(--secondary);
}

.plans-section-lead {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 28px;
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.55;
}

.plans-category-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 36px;
}

.plans-select-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.plans-select-wrap {
    position: relative;
    width: min(100%, 320px);
}

.plans-select {
    width: 100%;
    appearance: none;
    padding: 14px 44px 14px 18px;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.plans-select:hover,
.plans-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 98, 177, 0.15);
}

.plans-select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--primary);
    font-size: 13px;
}

.plan-panels {
    position: relative;
    min-height: 200px;
}

.plan-category-panel[hidden] {
    display: none !important;
}

.plan-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: stretch;
}

.plan-cards--two {
    grid-template-columns: repeat(2, 1fr);
    max-width: 820px;
    margin: 0 auto;
}

.plan-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 98, 177, 0.35);
}

.plan-card--featured {
    border-color: var(--primary);
    box-shadow: 0 8px 28px rgba(0, 98, 177, 0.12);
}

body.dark-mode .plan-card--featured {
    box-shadow: 0 8px 28px rgba(115, 192, 50, 0.08);
}

.plan-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--secondary);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
}

.plan-card-header {
    margin-bottom: 16px;
}

.plan-card-icon {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 10px;
}

.plan-card-header h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 4px;
}

.plan-card-tag {
    font-size: 13px;
    color: var(--gray-600);
}

.plan-card-price {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 18px;
}

.plan-card-price strong {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
}

.plan-card-price span {
    font-size: 13px;
    font-weight: 500;
}

.plan-card-features {
    flex: 1;
    margin-bottom: 20px;
}

.plan-card-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.45;
}

.plan-card-features li:last-child {
    margin-bottom: 0;
}

.plan-card-features .fa-check {
    color: var(--secondary);
    margin-top: 3px;
    flex-shrink: 0;
}

.plan-card-cta {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 700;
    color: var(--light);
    background: var(--primary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.plan-card-cta:hover {
    background: var(--primary-hover);
}

.plan-card-cta:active {
    transform: scale(0.98);
}

@media (max-width: 992px) {
    .plan-cards {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin: 0 auto;
    }

    .plan-cards--two {
        max-width: 440px;
    }
}

@media (max-width: 768px) {
    .plans-section {
        padding: 40px 0 48px;
    }
}

/* --- Página de detalle de servicio (hero + grid + CTA) --- */
.submenu a[aria-current="page"],
.mobile-nav-sub a[aria-current="page"] {
    font-weight: 700;
    color: var(--primary);
    background: rgba(0, 98, 177, 0.08);
}

body.dark-mode .submenu a[aria-current="page"],
body.dark-mode .mobile-nav-sub a[aria-current="page"] {
    background: rgba(115, 192, 50, 0.12);
    color: var(--secondary);
}

.service-hero.service-hero--detail {
    position: relative;
    max-height: none;
    min-height: 0;
    background: #050a12;
}

.service-hero--detail .service-hero-media {
    position: relative;
    width: 100%;
    min-height: 260px;
    max-height: min(52vh, 480px);
    overflow: hidden;
}

.service-hero--detail .service-hero-media img {
    width: 100%;
    height: min(52vh, 480px);
    min-height: 260px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.service-hero-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(5, 10, 18, 0.92) 0%,
        rgba(5, 10, 18, 0.45) 45%,
        rgba(5, 10, 18, 0.15) 100%
    );
    pointer-events: none;
}

.service-hero-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 20px 32px;
    z-index: 1;
}

.service-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary);
    margin-bottom: 10px;
}

.service-hero-caption h1 {
    color: #fff;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 10px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.service-hero-lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(15px, 2vw, 17px);
    max-width: 36rem;
    margin: 0;
    line-height: 1.55;
}

.service-info-page--layout {
    padding: 40px 0 64px;
}

.service-info-page--layout .service-detail-shell {
    max-width: var(--container-width);
}

.service-info-page--layout .service-detail-main.policy-content {
    max-width: none;
    margin: 0;
}

.service-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 32px;
    align-items: start;
}

.service-detail-main .policy-meta {
    margin-bottom: 1rem;
}

.service-checklist {
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.45;
}

.service-checklist .fa-check {
    color: var(--secondary);
    margin-top: 3px;
    flex-shrink: 0;
}

.service-cross-nav {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-color);
}

.service-cross-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 14px;
}

.service-cross-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-cross-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--gray-100);
    color: var(--text-color);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
}

.service-cross-link .fa-arrow-right {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.55;
}

.service-cross-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(2px);
}

body.dark-mode .service-cross-link {
    background: var(--card-bg);
}

body.dark-mode .service-cross-link:hover {
    color: var(--secondary);
    border-color: var(--secondary);
}

.service-detail-aside {
    position: sticky;
    top: 88px;
}

.service-aside-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
}

.service-aside-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--text-color);
}

.service-aside-text {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0 0 16px;
    line-height: 1.5;
}

body.dark-mode .service-aside-text {
    color: var(--gray-600);
}

.service-aside-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    margin-bottom: 10px;
    text-align: center;
    transition: var(--transition);
}

.service-aside-btn:last-of-type {
    margin-bottom: 0;
}

.service-aside-btn--call {
    background: var(--primary);
    color: #fff;
}

.service-aside-btn--call:hover {
    background: var(--primary-hover);
    color: #fff;
}

.service-aside-btn--wa {
    background: #25d366;
    color: #fff;
}

.service-aside-btn--wa:hover {
    filter: brightness(1.06);
    color: #fff;
}

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

.service-aside-btn--form:hover {
    background: var(--primary);
    color: #fff;
}

.service-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
}

.service-back-home:hover {
    color: var(--primary);
}

@media (max-width: 960px) {
    .service-detail-grid {
        grid-template-columns: 1fr;
    }

    .service-detail-aside {
        position: static;
        order: -1;
    }
}

@media (max-width: 600px) {
    .service-hero--detail .service-hero-media {
        min-height: 220px;
        max-height: 42vh;
    }

    .service-hero--detail .service-hero-media img {
        height: 42vh;
        min-height: 220px;
    }

    .service-hero-caption {
        padding: 20px 16px 22px;
    }
}

/* --- Página de login --- */
body.page-login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background-color: var(--gray-100);
}

body.dark-mode.page-login {
    background-color: var(--bg-color);
}

.login-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

.login-page-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
}

.login-page-back:hover {
    color: var(--primary);
}

.login-page-theme {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-page-theme .theme-switch-label {
    font-size: 13px;
    font-weight: 600;
}

.login-page-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px 40px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 36px 32px 32px;
    box-shadow: var(--shadow-sm);
}

.login-card-logo-link {
    display: block;
    text-align: center;
    margin-bottom: 28px;
}

.login-card-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.login-card-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--gray-800);
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.login-card-sub {
    font-size: 0.9375rem;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 28px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font-main);
    font-size: 0.9375rem;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input::placeholder {
    color: var(--gray-600);
    opacity: 0.75;
}

.login-input:hover {
    border-color: var(--gray-600);
}

.login-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 98, 177, 0.15);
}

.login-input--has-toggle {
    padding-right: 44px;
}

.login-password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

.login-password-toggle:hover {
    color: var(--primary);
    background-color: var(--gray-100);
}

body.dark-mode .login-password-toggle:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.login-row-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: -4px;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
    user-select: none;
}

.login-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.login-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.login-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.login-submit {
    width: 100%;
    margin-top: 4px;
    padding: 14px 18px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    color: var(--light);
    background-color: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.login-submit:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 0 2px var(--secondary), 0 4px 12px rgba(0, 98, 177, 0.25);
}

.login-submit:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

.login-card-footer {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--gray-600);
    text-align: center;
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 22px 24px;
    }

    .login-page-theme .theme-switch-label span:not(.fa-solid) {
        display: none;
    }
}

/* Login Status Messages & Utilities */
.login-error {
    background-color: #fee2e2;
    border-left: 4px solid #dc2626;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.login-success {
    background-color: #dcfce7;
    border-left: 4px solid #22c55e;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

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

.btn-spinner {
    margin-left: 8px;
}

.login-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: var(--gray-600);
}

.login-input:disabled {
    background-color: var(--gray-100);
    cursor: not-allowed;
}

/* --- info_plan.html (datos desde API) --- */
.info-plan-cards-wrap {
    margin-top: 0.5rem;
}

.info-plan-cards-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-plan-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--light);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

body.dark-mode .info-plan-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.info-plan-card-media {
    line-height: 0;
    background: #0a1628;
}

.info-plan-card-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 280px;
}

.info-plan-card-body {
    padding: 1.25rem 1.35rem 1.5rem;
}

.info-plan-card-nombre-corto {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 0.35rem;
    line-height: 1.3;
}

body.dark-mode .info-plan-card-nombre-corto {
    color: var(--secondary);
}

.info-plan-card-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 0.5rem;
}

body.dark-mode .info-plan-card-price {
    color: var(--secondary);
}

.info-plan-card-meta {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}

body.dark-mode .info-plan-card-meta {
    color: rgba(255, 255, 255, 0.72);
}

.info-plan-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.info-plan-card-desc {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
    white-space: normal;
}

.info-plan-card-body .plan-card-cta {
    width: 100%;
    max-width: 320px;
}

/* --- listado_planes.html (catálogo desde GET /api/info_planes) --- */
.listado-planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 0.5rem;
}

a.listado-plan-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--light);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

a.listado-plan-card:hover {
    box-shadow: 0 8px 24px rgba(0, 86, 150, 0.12);
    border-color: rgba(0, 86, 150, 0.25);
    transform: translateY(-2px);
}

body.dark-mode a.listado-plan-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode a.listado-plan-card:hover {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.listado-plan-card-media {
    line-height: 0;
    background: #0a1628;
}

.listado-plan-card-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 200px;
}

.listado-plan-card-body {
    padding: 1.1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.listado-plan-card-tipo {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-600);
    margin: 0 0 0.35rem;
}

.listado-plan-card-subtipo {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-600);
    margin: -0.2rem 0 0.4rem;
    text-transform: none;
    letter-spacing: normal;
}

body.dark-mode .listado-plan-card-subtipo {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .listado-plan-card-tipo {
    color: rgba(255, 255, 255, 0.65);
}

.listado-plan-card-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 0.65rem;
}

body.dark-mode .listado-plan-card-price {
    color: var(--secondary);
}

.listado-plan-card-desc {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--gray-700);
    margin: 0 0 1rem;
    flex: 1;
}

body.dark-mode .listado-plan-card-desc {
    color: rgba(255, 255, 255, 0.85);
}

.listado-plan-card-cta {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
}

body.dark-mode .listado-plan-card-cta {
    color: var(--secondary);
}

a.listado-plan-card:hover .listado-plan-card-cta {
    text-decoration: underline;
}
