/* ==========================================================
   RTO SAN LUIS - styles.css
   Mobile-first, compatible con inicio.html y script.js
   PALETA OTOÑAL (terracota + ámbar + crema)
   ========================================================== */

/* ===== VARIABLES Y RESET ===== */
:root {
    --primary: #9c4221;
    --primary-dark: #7a3218;
    --accent: #e0913a;
    --primary-light: #fbefe3;
    --brand-gradient: linear-gradient(90deg, #7a3218 0%, #c2691f 100%);
    --success: #4d7a2a;
    --success-light: #e6efd5;
    --error: #b3261e;
    --error-light: #f9dedc;
    --warning: #e08a00;
    --warning-dark: #b45f06;
    --warning-light: #fff1d6;
    --text-main: #3b2418;
    --text-muted: #6b4f3f;
    --text-light: #8a7366;
    --bg-body: #fdf6ec;
    --bg-card: #ffffff;
    --border-color: #e6cfb5;
    --border-light: #f0e0cc;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(59, 36, 24, 0.10);
    --shadow-lg: 0 8px 25px rgba(59, 36, 24, 0.14);
    --touch-size: 48px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 90px;
}

body {
    font-family: 'Commissioner', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

img,
iframe {
    max-width: 100%;
}

button,
input,
select {
    font-family: inherit;
}

:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

/* ===== HEADER / NAVBAR ===== */
header {
    background: var(--brand-gradient);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
	display: block;
    height: 72px;
    width: auto;
    max-width: 100
}

img.logo-dark { display: none; }

@media (prefers-color-scheme: dark) {
  img.logo-light { display: none; }
  img.logo-dark { display: block; }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.logo i {
    font-size: 1.5rem;
}

.logo-img {
    display: block;
    height: 72px;
    width: auto;
    max-width: 100%;
}

@media (max-width: 599px) {
    .logo-img {
        height: 72px;
    }
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    padding: 0.5rem 0.25rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* ===== MENÚ HAMBURGUESA ===== */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
    z-index: 101;
}

.hamburger span {
    width: 24px;
    height: 2.5px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Con el menú abierto el fondo es blanco, así que las líneas pasan a oscuro */
.hamburger.active span {
    background-color: var(--text-main);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

.nav-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--bg-card);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding-top: 4.5rem;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-sidebar.active {
    right: 0;
}

.close-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
    margin-left: auto;
    margin-right: 1rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.close-menu:hover {
    color: var(--primary);
}

.nav-sidebar .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-sidebar .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.nav-sidebar .nav-links a:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-sidebar .nav-links a:active {
    background-color: var(--primary-light);
}

/* ===== MOSTRAR HAMBURGUESA EN MÓVIL ===== */
@media (max-width: 599px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
    }
}

/* ===== NAVEGACIÓN EN TABLET+ / DESKTOP ===== */
@media (min-width: 600px) {
    .hamburger,
    .nav-overlay,
    .close-menu {
        display: none !important;
    }

    /* El sidebar deja de ser un panel fijo y se integra en el navbar */
    .nav-sidebar {
        display: block !important;
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        padding: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        transition: none;
    }

    .nav-sidebar .nav-links {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 1.25rem;
    }

    .nav-sidebar .nav-links a {
        display: inline-block;
        padding: 0.5rem 0.25rem;
        border-bottom: none;
    }

    .nav-sidebar .nav-links a:hover {
        background-color: transparent;
        color: var(--primary);
    }

    /* Sobre el degradado del header, los enlaces son blancos */
    header .nav-sidebar .nav-links a {
        color: #fff;
    }

    header .nav-sidebar .nav-links a:hover {
        color: #ffe9cf;
    }
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.main-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    flex: 1;
    width: 100%;
}

/* ===== INDICADOR DE PASOS ===== */
.steps-indicator {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    opacity: 0.5;
    transition: all 0.3s ease;
    min-width: 0;
}

.step-item.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border-light);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    text-align: center;
    line-height: 1.2;
    max-width: 70px;
    transition: color 0.3s ease;
}

.step-item.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-connector {
    flex: 0 0 24px;
    height: 2px;
    margin-top: 19px;
    background-color: var(--border-light);
    transition: background-color 0.3s ease;
}

/* El conector se pinta si el paso siguiente está activo */
.step-connector:has(+ .step-item.active) {
    background-color: var(--primary);
}

/* ===== TARJETA PRINCIPAL ===== */
.card-container {
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

/* ===== PASOS DEL FORMULARIO ===== */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* ===== GRUPOS DE FORMULARIO ===== */
.form-section {
    margin-bottom: 1.5rem;
}

.form-section h4 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.6rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
    min-width: 0;
}

.form-group label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

/* Inputs: 16px evita el zoom automático en iOS */
.text-input,
.select-input {
    width: 100%;
    min-height: var(--touch-size);
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-main);
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.text-input::placeholder {
    color: #b09a88;
}

.text-input:focus,
.select-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Date/time en iOS y Android */
input[type="date"].text-input,
input[type="time"].text-input {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    text-align: left;
}

.select-input {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b2418' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 38px;
    text-overflow: ellipsis;
}

/* ===== INFO DE SEDE ===== */
.sede-info-hidden {
    display: none;
}

.sede-info-hidden.active {
    display: block;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--primary-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.sede-map-container {
    margin-bottom: 1rem;
}

.sede-map-container iframe {
    display: block;
    width: 100%;
    height: 220px;
    border: 0;
    border-radius: 8px;
}

.sede-details h4 {
    margin-bottom: 0.4rem;
    color: var(--primary);
    font-size: 1.05rem;
}

.sede-details p {
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.sede-horarios {
    margin-top: 0.75rem;
}

.sede-horarios h5 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

/* ===== TARIFA INFO ===== */
.tarifa-info {
    background-color: #fdf1e2;
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    text-align: center;
}

.tarifa-monto {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.3rem 0;
}

.tarifa-nota {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== RESUMEN ===== */
.resumen-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.resumen-section {
    background-color: var(--primary-light);
    padding: 1rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    min-width: 0;
}

.resumen-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
    border: none;
    padding: 0;
}

.resumen-section p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
    color: var(--text-main);
}

.resumen-section strong {
    color: var(--text-main);
}

.tarifa-section {
    text-align: center;
    background-color: var(--warning-light);
    border-left-color: var(--warning-dark);
}

.monto-grande {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--warning-dark);
    margin: 0.3rem 0;
}

.monto-nota {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== FORMULARIO DE PAGO ===== */
.payment-form {
    margin: 0;
}

.payment-logos {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.payment-logos > div {
    flex-wrap: wrap;
    gap: 14px !important;
    margin: 0 !important;
}

.payment-logos img {
    height: auto;
    max-height: 32px;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter 0.3s;
}

.payment-logos img:hover {
    filter: grayscale(0%);
}

.payment-input-group {
    margin-bottom: 1rem;
    position: relative;
}

.payment-input-group input,
.payment-input-group select {
    width: 100%;
    min-height: var(--touch-size);
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-main);
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.payment-input-group select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b2418' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 38px;
}

.payment-input-group input:focus,
.payment-input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.payment-input-group.has-logo input {
    padding-right: 72px;
}

.card-logo-container {
    position: absolute;
    right: 10px;
    top: 24px;
    transform: translateY(-50%);
    width: 52px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.card-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.expiry-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.error {
    display: none;
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.35rem;
    font-weight: 500;
    line-height: 1.4;
}

.error.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

/* ===== INPUTS DATE/TIME ESPECÍFICOS ===== */
input[type="date"],
input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    border-radius: 4px;
    margin-right: 2px;
    opacity: 0.6;
    filter: invert(0.8);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

input[type="date"]::-webkit-outer-spin-button,
input[type="date"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-outer-spin-button,
input[type="time"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="date"],
input[type="time"] {
    color-scheme: light;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1.25rem 0;
    font-size: 0.95rem;
}

.terms-checkbox input {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}

.terms-checkbox label {
    cursor: pointer;
    user-select: none;
    color: var(--text-main);
}

.terms-note {
    background-color: var(--warning-light);
    border: 1px solid #ffc56d;
    border-left: 4px solid var(--warning-dark);
    padding: 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 1.25rem 0;
}

/* ===== BOTONES ===== */
.btn-primary,
.btn-secondary {
    width: 100%;
    min-height: var(--touch-size);
    padding: 0.8rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s, box-shadow 0.25s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(156, 66, 33, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background-color: #d8ccc0;
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    margin-top: 0.75rem;
}

.btn-secondary:hover {
    background-color: var(--bg-body);
    border-color: var(--primary);
    color: var(--primary);
}

.button-group {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.button-group .btn-secondary {
    margin-top: 0;
}

/* ===== RESULTADO (ÉXITO / ERROR) ===== */
.result-container {
    display: none;
    text-align: center;
}

.result-container:not(.hidden) {
    display: block;
}

.icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.icon-circle.success {
    background: linear-gradient(135deg, var(--success), #2f4f17);
}

.icon-circle.error {
    background: linear-gradient(135deg, var(--error), #7a1a14);
}

#step-4 h2 {
    margin: 0.75rem 0 0.4rem;
    color: var(--text-main);
}

.result-message {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.confirmation-box,
.error-box {
    background-color: var(--primary-light);
    border: 1px solid #e6cfb5;
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1.25rem 0;
    text-align: left;
}

.error-box {
    background-color: var(--error-light);
    border-color: #eab5ae;
}

.confirmation-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(156, 66, 33, 0.15);
}

.error-box .confirmation-row {
    border-bottom: 1px solid rgba(179, 38, 30, 0.15);
}

.confirmation-row:last-child {
    border-bottom: none;
}

.confirmation-row .label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.confirmation-row .value {
    font-weight: 600;
    color: var(--text-main);
    overflow-wrap: anywhere;
}

.confirmation-row .monto {
    font-size: 1.2rem;
    color: var(--primary);
}

.appointment-box {
    background-color: #fdf1e2;
    margin-top: 1.5rem;
}

.appointment-box h4 {
    margin-bottom: 0.75rem;
    color: var(--primary);
    border: none;
}

/* ===== SECCIÓN DE TARIFAS ===== */
.tarifas-section {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-lg);
}

.tarifas-section h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

.tarifas-subtitle {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.tarifas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tarifa-card {
    background: linear-gradient(135deg, var(--primary-light), #fff);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem 0.75rem;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s;
}

.tarifa-icon {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.tarifa-card h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--text-main);
    border: none;
}

.tarifa-precio {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.3rem 0;
}

.tarifa-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.tarifas-nota {
    background-color: var(--warning-light);
    border: 1px solid #ffc56d;
    border-left: 4px solid var(--warning-dark);
    padding: 0.85rem;
    border-radius: 8px;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
footer {
    background: var(--brand-gradient);
    color: #fff;
    margin-top: auto;
    padding: 2rem 1rem calc(1rem + env(safe-area-inset-bottom));
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.footer-col h4 {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    color: #fff;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.9;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
    overflow-wrap: anywhere;
}

.footer-col a {
    color: #fff;
    text-decoration: none;
}

/* ===== LOGOS EN FOOTER ===== */
.footer-logos {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-logo {
    display: block;
    max-width: 110px;
    height: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    /* padding: 6px 10px; */
    border-radius: 6px;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.8;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 12px 16px;
}

.footer-flag-link {
    display: block;
    flex-shrink: 0;
    margin-left: auto;   /* la empuja a la derecha */
    line-height: 0;      /* evita espacio extra debajo de la imagen */
}

.footer-flag {
    display: block;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s ease;
}

.footer-flag-link:hover .footer-flag,
.footer-flag-link:focus-visible .footer-flag {
    opacity: 0.85;
}

.footer-flag-link:focus-visible {
    outline: 2px solid #e0913a;
    outline-offset: 2px;
}

/* Logos en móvil */
@media (max-width: 599px) {
    .footer-logos {
        gap: 1rem;
        justify-content: flex-start;
    }

    .footer-logo {
        max-width: auto;
    }
}

/* Logos en tablet y desktop */
@media (min-width: 600px) {
    .footer-logos {
        gap: 2rem;
    }

    .footer-logo {
        max-width: 120px;
    }
}

/* ==========================================================
   TABLET (600px en adelante)
   ========================================================== */
@media (min-width: 600px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .main-container {
        padding: 2rem 1.5rem;
    }

    .card-container,
    .tarifas-section {
        padding: 2rem;
    }

    .steps-indicator {
        gap: 0.75rem;
    }

    .step-number {
        width: 46px;
        height: 46px;
    }

    .step-label {
        font-size: 0.85rem;
        max-width: 100px;
    }

    .step-connector {
        flex-basis: 48px;
        margin-top: 22px;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .form-group {
        min-width: 0;
    }

    .form-step h2 {
        font-size: 1.7rem;
    }

    .sede-map-container iframe {
        height: 280px;
    }

    .resumen-container {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .tarifa-section {
        grid-column: 1 / -1;
    }

    .button-group {
        flex-direction: row;
        gap: 1rem;
    }

    .confirmation-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .confirmation-row .value {
        text-align: right;
    }

    .tarifas-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.25rem;
    }

    .tarifas-nota {
        text-align: center;
    }

        .footer-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 2rem;
    }

    /* Hover solo donde existe puntero */
    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
    }

    .tarifa-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
}

/* ==========================================================
   DESKTOP (1024px en adelante)
   ========================================================== */
@media (min-width: 1024px) {
    .nav-container {
        padding: 0 2rem;
    }

    .main-container {
        padding: 3rem 2rem;
    }

    .card-container,
    .tarifas-section {
        padding: 2.5rem;
    }

    .steps-indicator {
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    .step-label {
        font-size: 0.9rem;
        max-width: none;
    }

    .step-connector {
        flex-basis: 60px;
        margin-top: 24px;
    }

    .form-step h2 {
        font-size: 1.9rem;
        margin-bottom: 0.5rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .form-section h4 {
        font-size: 1.15rem;
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .form-group {
        min-width: 0;
        overflow: hidden;
    }

    .text-input,
    .select-input {
        width: 100%;
    }

    input[type="date"].text-input,
    input[type="time"].text-input {
        width: 100%;
    }

    .text-input,
    .select-input,
    .payment-input-group input,
    .payment-input-group select {
        padding: 0.85rem 1.25rem;
        font-size: 1rem;
    }

    .sede-map-container iframe {
        height: 320px;
    }

    .resumen-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .tarifa-section {
        grid-column: 1 / -1;
    }

    .button-group {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
        margin-top: 2rem;
    }

    .button-group .btn-secondary {
        margin-top: 0;
    }

    .confirmation-row {
        padding: 0.8rem 0;
    }

    .tarifas-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .tarifa-card {
        padding: 1.5rem 1rem;
    }

    .footer-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* ==========================================================
   PANTALLAS GRANDES (1440px+)
   ========================================================== */
@media (min-width: 1440px) {
    .card-container,
    .tarifas-section,
    .footer-container,
    .footer-bottom {
        max-width: 1200px;
    }

    .form-step h2 {
        font-size: 2rem;
    }
}

/* ==========================================================
   LANDSCAPE EN MÓVILES
   ========================================================== */
@media (max-height: 600px) and (orientation: landscape) {
    header {
        padding: 0.5rem 0;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .main-container {
        padding: 1rem;
    }

    .card-container {
        padding: 1rem;
    }

    .form-step h2 {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }

    .subtitle {
        margin-bottom: 1rem;
    }

    .form-section h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .btn-primary,
    .btn-secondary {
        min-height: 44px;
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    .steps-indicator {
        gap: 0.25rem;
        margin-bottom: 1rem;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.7rem;
        max-width: 60px;
    }

    .step-connector {
        flex-basis: 20px;
        margin-top: 18px;
    }
}

/* ==========================================================
   ACCESIBILIDAD - Modo oscuro (si el usuario lo prefiere)
   ========================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #f0a868;
        --primary-dark: #e08a4a;
        --accent: #e0913a;
        --primary-light: #3a2619;
        --brand-gradient: linear-gradient(90deg, #5a2a12 0%, #b0621f 100%);
        --success: #a3c46b;
        --success-light: #2a3318;
        --error: #ff8a7a;
        --error-light: #3a1f1b;
        --warning: #fbbf24;
        --warning-dark: #f59e0b;
        --text-main: #f6ece2;
        --text-muted: #d9c8b8;
        --text-light: #a89485;
        --bg-body: #1a120d;
        --bg-card: #261a13;
        --border-color: #4a3527;
        --border-light: #3b2a1f;
    }

    /* ===== INPUTS Y SELECTORES ===== */
    .text-input,
    .select-input,
    .payment-input-group input,
    .payment-input-group select {
        background-color: #33241a;
        color: #f6ece2;
        border-color: #5a4333;
    }

    .text-input:focus,
    .select-input:focus,
    .payment-input-group input:focus,
    .payment-input-group select:focus {
        border-color: #f0a868;
        box-shadow: 0 0 0 3px rgba(240, 168, 104, 0.25);
    }

    .text-input::placeholder {
        color: #8f7867;
    }

    /* ===== SELECTORES CON ICONOS ===== */
    .select-input,
    .payment-input-group select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6ece2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    }

    /* ===== DATE Y TIME PICKERS ===== */
    input[type="date"],
    input[type="time"] {
        background-color: #33241a;
        color: #f6ece2;
    }

    input[type="date"]::-webkit-calendar-picker-indicator,
    input[type="time"]::-webkit-calendar-picker-indicator {
        filter: invert(1) brightness(0.9);
        opacity: 0.8;
    }

    input[type="date"]::-webkit-calendar-picker-indicator:hover,
    input[type="time"]::-webkit-calendar-picker-indicator:hover {
        opacity: 1;
    }

    /* ===== BOTONES ===== */
    .btn-secondary {
        border-color: #5a4333;
        color: #d9c8b8;
    }

    .btn-secondary:hover {
        background-color: #33241a;
        border-color: #f0a868;
        color: #f0a868;
    }

    /* ===== MENÚ MÓVIL (fondo oscuro, las líneas del hamburguesa vuelven a claro) ===== */
    .hamburger.active span {
        background-color: #f6ece2;
    }

    /* ===== SECCIONES DE RESUMEN ===== */
    .resumen-section {
        background-color: #3a2619;
        border-left-color: #f0a868;
    }

    .resumen-section p {
        color: #f1e4d6;
    }

    .resumen-section h4 {
        color: #f0a868;
    }

    /* ===== CAJAS DE CONFIRMACIÓN ===== */
    .confirmation-box {
        background-color: #3a2619;
        border-color: #6b4a33;
    }

    .confirmation-box .label {
        color: #f0c9a0;
    }

    .confirmation-box .value {
        color: #f6ece2;
    }

    .error-box {
        background-color: #3a1f1b;
        border-color: #6b2e32;
    }

    .error-box .label {
        color: #ff9c8f;
    }

    .error-box .value {
        color: #ffcfc7;
    }

    /* ===== TARJETAS DE TARIFA ===== */
    .tarifa-card {
        background: linear-gradient(135deg, #3a2619, #33241a);
        border-color: #5a4333;
    }

    .tarifa-card h4 {
        color: #f6ece2;
    }

    .tarifa-precio {
        color: #f0a868;
    }

    .tarifa-desc {
        color: #bfae9f;
    }

    /* ===== SECCIÓN DE TARIFAS ===== */
    .tarifas-section {
        background-color: #261a13;
        border: 1px solid #4a3527;
    }

    .tarifas-section h3 {
        color: #f6ece2;
    }

    .tarifas-subtitle {
        color: #bfae9f;
    }

    .tarifas-nota {
        background-color: #2d2414;
        border: 1px solid #5a4a28;
        border-left: 4px solid #fbbf24;
        color: #f3d76b;
    }

    .tarifas-nota strong {
        color: #fbbf24;
    }

    /* ===== SECCIÓN DE TARIFA (DENTRO DEL RESUMEN) ===== */
    .tarifa-section {
        background-color: #2d2414;
        border-left-color: #fbbf24;
    }

    .tarifa-section h4 {
        color: #fbbf24;
    }

    .monto-grande {
        color: #fbbf24;
    }

    /* ===== TÉRMINOS Y NOTAS ===== */
    .terms-note {
        background-color: #2d2414;
        border: 1px solid #5a4a28;
        border-left: 4px solid #fbbf24;
        color: #f3d76b;
    }

    .terms-checkbox label {
        color: #f6ece2;
    }

    /* ===== INDICADORES DE PASO ===== */
    .step-number {
        background-color: #4a3527;
        color: #a89485;
    }

    .step-item.active .step-number {
        background-color: #f0a868;
        color: #1a120d;
        box-shadow: 0 0 0 4px rgba(240, 168, 104, 0.25);
    }

    .step-label {
        color: #a89485;
    }

    .step-item.active .step-label {
        color: #f0a868;
    }

    .step-connector {
        background-color: #4a3527;
    }

    .step-connector:has(+ .step-item.active) {
        background-color: #f0a868;
    }

    /* ===== INFO DE SEDE ===== */
    .sede-info-hidden.active {
        background-color: #3a2619;
        border-left-color: #f0a868;
    }

    .sede-details h4 {
        color: #f0a868;
    }

    .sede-details p {
        color: #d9c8b8;
    }

    /* ===== TARIFA INFO ===== */
    .tarifa-info {
        background-color: #3a2619;
        border-left-color: #f0a868;
    }

    .tarifa-monto {
        color: #f0a868;
    }

    .tarifa-nota {
        color: #bfae9f;
    }

    /* ===== MENSAJES DE ERROR ===== */
    .error {
        color: #ff9c8f;
    }

    /* ===== FOOTER (usa --brand-gradient, definido arriba) ===== */
    .footer-col h4 {
        color: #fff;
    }

    .footer-col p {
        font-size: 0.9rem;
        line-height: 1.6;
        opacity: 0.9;
    }

    /* ===== RESULTADO (ÉXITO/ERROR) ===== */
    .result-message {
        color: #d9c8b8;
    }

    #step-4 h2 {
        color: #f6ece2;
    }

    /* ===== APPOINTMENT BOX ===== */
    .appointment-box {
        background-color: #3a2619;
    }

    .appointment-box h4 {
        color: #f0a868;
    }
}

/* ==========================================================
   REDUCCIÓN DE MOVIMIENTO (prefers-reduced-motion)
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================
   IMPRESIÓN
   ========================================================== */
@media print {
    header,
    footer,
    .steps-indicator,
    .btn-primary,
    .btn-secondary {
        display: none;
    }

    body {
        background: #fff;
    }

    .card-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .main-container {
        max-width: 100%;
    }
}