/* CSS Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Import PT Sans from Google Fonts for hero 'Turnos' */
@import url('https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap');
/* Import Montserrat for main titles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;900&display=swap');

/* Site-wide font: centralizar PT Sans y evitar declaraciones por componente */
:root {
    --site-font: 'PT Sans', sans-serif;
}

html, body, .portal-body, .portal-body * {
    font-family: var(--site-font) !important;
}

html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    color: #0D3050;
}

/* Custom Colors */
:root {
    --portal-bg: #F3F0EC;
    --portal-blue: #0D3050;
    --portal-text-dark: #0D3050;
    --turnos-icon: #67D3DE;
    --turnos-text: #333333;
    --gray-100: #f7fafc;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
}

/* Portal Background Pattern */
.portal-pattern {
    background-color: var(--portal-bg);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d1ccc5' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}



/* PT Sans utility classes (provided by user) */
.pt-sans-regular {
    font-family: "PT Sans", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.pt-sans-bold {
    font-family: "PT Sans", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.pt-sans-regular-italic {
    font-family: "PT Sans", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.pt-sans-bold-italic {
    font-family: "PT Sans", sans-serif;
    font-weight: 700;
    font-style: italic;
}

.portal-body {
    background-image: url('/assets/bgcolegiales.png');
    background-size: cover;
    background-position: top left;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #0D3050 !important;
}

.portal-body * {
    color: #0D3050 !important;
}

.portal-main {
    margin-top: -60px;
}

.portal-button {
    background-color: #0D3050 !important;
    color: white !important;
    text-transform: uppercase !important;
    font-size: 1em !important;
    border-radius: 40px !important;
    width: auto !important;
    font-weight: bold !important;
    padding: 8px 25px !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.portal-button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.form-card {
    min-height: 600px;
    max-width: 600px !important;
    border-radius: 40px !important;
    padding: 2.5rem;
    background-color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.form-card h2 {
    font-size: 1.25rem !important;
}

.form-card input {
    font-size: 1.1rem !important;
}

.form-card a {
    font-size: 1rem !important;
}

.title-heavy {
    font-weight: 900 !important;
}

/* Removed: .portal-body h1 rule to allow .turnos-h1-mobile to control its own weight */

.subtitle-spaced {
    letter-spacing: 0.10em !important;
}

/* Utility Classes */
.min-h-screen {
    min-height: 100vh;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.flex-shrink-0 {
    flex-shrink: 0;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

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

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-10 {
    gap: 2.5rem;
}

.gap-12 {
    gap: 3rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-8 > * + * {
    margin-top: 2rem;
}

.space-y-10 > * + * {
    margin-top: 2.5rem;
}

.space-y-12 > * + * {
    margin-top: 3rem;
}

.text-center {
    text-align: center;
}

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

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.text-7xl {
    font-size: 4.5rem;
    line-height: 1;
}

.text-7sxl {
    font-size: 4rem;
    line-height: 1;
}

.text-8xl {
    font-size: 6rem;
    line-height: 1;
}

/* Unified style for .turnos-h1-mobile (single source of truth) */
.turnos-h1-mobile {
    font-family: 'Montserrat', sans-serif !important;
    color: var(--portal-blue) !important;
    font-weight: 600 !important;
    font-style: normal !important;
    /* responsive size: menor en móviles, escala con viewport y máxima en desktop */
    font-size: clamp(2.4rem, 7.5vw, 6.5rem) !important;
    line-height: 0.95 !important;
    margin-bottom: 0.5rem !important;
}

/* Forzar que el título quede en exactamente dos renglones */
.turnos-h1-mobile .turnos-line1 {
    display: inline-block;
    white-space: nowrap; /* evitar que "Central de" se divida */
}

.turnos-h1-mobile .turnos-line2 {
    display: block; /* forzar "Turnos" en segunda línea */
}

@media (min-width: 1024px) {
    .turnos-h1-mobile {
        font-size: 7.1rem !important;
        font-weight: 600 !important;
        line-height: 0.92 !important;
    }
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.leading-tight {
    line-height: 1.25;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.text-portal-blue {
    color: var(--portal-blue);
}

.bg-portal-blue {
    background-color: var(--portal-blue);
}

.text-portal-text-dark {
    color: var(--portal-text-dark);
}

.bg-portal-bg {
    background-color: var(--portal-bg);
}

.bg-turnos-icon {
    background-color: var(--turnos-icon);
}

.text-turnos-text {
    color: var(--turnos-text);
}

.text-turnos-icon {
    color: var(--turnos-icon);
}

.bg-turnos-icon-light {
    background-color: rgba(103, 211, 222, 0.1);
}

.text-gray-500 {
    color: var(--gray-500);
}

.text-gray-600 {
    color: var(--gray-600);
}

.text-gray-700 {
    color: var(--gray-700);
}

.bg-white {
    background-color: white;
}

.bg-transparent {
    background-color: transparent;
}

/* Ensure all card components are opaque and visually distinct */
.card-service,
.card-bristol-touch,
.card,
.form-card {
    background-color: #ffffff !important;
    box-shadow: 0 12px 30px -8px rgba(13, 48, 80, 0.12) !important;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Turnos page: force article cards to be opaque and match LP aesthetics */
body.text-turnos-text article {
    background-color: #ffffff !important;
    background-image: none !important;
    border-radius: 1.5rem !important; /* rounded-3xl look */
    box-shadow: 0 12px 30px -8px rgba(13, 48, 80, 0.12) !important;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-10 {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-8 {
    padding: 2rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.w-full {
    width: 100%;
}

.w-8 {
    width: 2rem;
}

.w-12 {
    width: 3rem;
}

.h-8 {
    height: 2rem;
}

.h-12 {
    height: 3rem;
}

.h-36 {
    height: 9rem;
}

.h-full {
    height: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-6xl {
    max-width: 72rem;
}

.max-w-7xl {
    max-width: 80rem;
}

.max-w-full {
    max-width: 100%;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-2xl {
    border-radius: 1rem;
}

.border {
    border-width: 1px;
}

.border-2 {
    border-width: 2px;
}

.border-gray-200 {
    border-color: var(--gray-200);
}

.border-gray-300 {
    border-color: var(--gray-300);
}

.border-portal-blue {
    border-color: var(--portal-blue);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.overflow-hidden {
    overflow: hidden;
}

.relative {
    position: relative;
}

.fixed {
    position: fixed;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.z-40 {
    z-index: 40;
}

.z-50 {
    z-index: 50;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.opacity-80 {
    opacity: 0.8;
}

.drop-shadow-lg {
    filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
}

.transition,
.transition-colors,
.transition-opacity,
.transition-transform {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.cursor-pointer {
    cursor: pointer;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Vertical writing mode */
.writing-mode-vertical-rl {
    writing-mode: vertical-rl;
}

.transform {
    transform: translateZ(0);
}

.rotate-180 {
    transform: rotate(180deg);
}

/* Input styles */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.15s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--portal-blue);
    box-shadow: 0 0 0 3px rgba(13, 48, 80, 0.1);
}

/* Button hover effects */
a:hover,
button:hover {
    opacity: 0.9;
}

a.hover\:underline:hover {
    text-decoration: underline;
}

a.hover\:text-portal-blue:hover {
    color: var(--portal-blue) !important;
}

button.hover\:bg-portal-blue:hover,
a.hover\:bg-portal-blue:hover {
    background-color: var(--portal-blue) !important;
}

button.hover\:text-white:hover,
a.hover\:text-white:hover {
    color: white !important;
}

/* Focus states */
button:focus,
a:focus {
    outline: none;
}

.focus\:outline-none:focus {
    outline: none;
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 3px rgba(13, 48, 80, 0.5);
}

.focus\:ring-portal-blue:focus {
    box-shadow: 0 0 0 3px rgba(13, 48, 80, 0.5);
}

/* Horizontal rule */
hr {
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid var(--gray-200);
}

.my-4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.pt-8 {
    padding-top: 2rem;
}

.pt-24 {
    padding-top: 6rem;
}

.pt-32 {
    padding-top: 8rem;
}

.pb-16 {
    padding-bottom: 4rem;
}

/* Responsive - Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .md\:text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    
    .md\:text-4xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
    
    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
    
    .md\:text-7xl {
        font-size: 4.5rem;
        line-height: 1;
    }
    
    .md\:text-8xl {
        font-size: 6rem;
        line-height: 1;
    }
    
    .md\:px-10 {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
    
    .md\:px-12 {
        padding-left: 3rem;
        padding-right: 3rem;
    }
    
    .md\:block {
        display: block;
    }
    
    .form-card {
        margin-left: auto;
        margin-right: 2rem;
    }
}

/* Responsive - Large devices (desktops, 1024px and up) */
@media (min-width: 768px) {
    /* Ocultar sección mobile en desktop */
    .mobile-only {
        display: none !important;
    }
    
    /* Mostrar sección desktop */
    .desktop-only {
        display: block !important;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }
    
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    
    .lg\:gap-40 {
        gap: 12rem;
    }
    
    .lg\:text-left {
        text-align: left;
    }
    
    .lg\:flex {
        display: flex;
    }
    
    .lg\:hidden {
        display: none;
    }
    
    .lg\:block {
        display: block;
    }
    
    .lg\:flex-grow-0 {
        flex-grow: 0;
    }
    
    .lg\:mx-0 {
        margin-left: 0;
        margin-right: 0;
    }
    
    .lg\:px-16 {
        padding-left: 4rem;
        padding-right: 4rem;
    }
    
    .lg\:px-20 {
        padding-left: 5rem;
        padding-right: 5rem;
    }
    
    .lg\:pt-24 {
        padding-top: 6rem;
    }
    
    .form-card {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile specific styles */
@media (max-width: 767px) {
    
    /* Ocultar sección desktop en mobile */
    .desktop-only {
        display: none !important;
    }
    
    /* Mostrar sección mobile */
    .mobile-only {
        display: block !important;
    }
    
    /* Estilos para la sección mobile compacta */
    .mobile-compact {
        padding: 1rem 1rem 2rem 1rem;
        min-height: auto;
    }
    
    .mobile-compact h1 {
        font-size: 1.75rem;
        margin: 0 0 1rem 0;
        font-weight: 900;
    }
    
    .mobile-compact .portal-button {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        margin: 0;
    }
    
    /* Reducir padding de la sección de servicios en mobile */
    section.py-20 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Ajustar main para eliminar min-height en mobile */
    main.min-h-screen {
        min-height: auto !important;
    }
}

/* Additional portal styles */
.pt-32 {
    padding-top: 8rem;
}

.min-h-screen {
    min-height: 100vh;
}

/* Header with overlay positioning */
.header-with-overlay {
    position: relative;
    z-index: 50;
}

/* Hero Layout - 60/40 Split */
.main-hero-layout {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
}

.main-hero-overlap {
    margin-top: 0;
}

@media (min-width: 1024px) {
    .main-hero-layout {
        display: flex;
        flex-direction: row;
        min-height: 100vh;
        margin-bottom: 4rem;
    }
    
    .main-hero-overlap {
        margin-top: -160px;
    }
}

.hero-content-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 3rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 0;
    width: 100%;
}

@media (min-width: 768px) {
    .hero-content-section {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 1024px) {
    .hero-content-section {
        flex: 0 0 60%;
        padding-top: 160px;
        padding-bottom: 4rem;
    }
}

.hero-image-aside {
    display: none;
}

@media (min-width: 1024px) {
    .hero-image-aside {
        display: block;
        position: relative;
        min-height: 100vh;
        overflow: hidden;
        flex: 0 0 40%;
        z-index: 1;
        margin-top: -160px;
    }
}

.hero-text-overlay {
    position: absolute;
    right: 15rem;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    color: white !important;
    font-size: 6rem;
    font-weight: 500;
    letter-spacing: 0.0em;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Additional utility classes */
.w-2\/3 {
    width: 66.666667%;
}

.h-\[500px\] {
    height: 500px;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.border-t {
    border-top-width: 1px;
}

/* Select dropdown styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* 404 Page Styles */
.error-page-body {
    margin: 0;
    overflow: hidden;
}

.error-container {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #F3F0EC 0%, #e8e4dd 100%);
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    color: #0D3050;
    margin: 0;
    line-height: 1;
}

.error-message {
    font-size: 2rem;
    color: #0D3050;
    margin: 1rem 0 2rem;
}

.error-description {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 2rem;
    max-width: 600px;
}

.error-btn {
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.875rem !important;
}

/* Portal page inline styles */
.portal-submit-btn {
    color: white !important;
    padding: 1rem !important;
    font-size: 1.25rem !important;
    width: 100% !important;
}

.logo-spacing {
    height: 120px;
    margin-bottom: 2rem;
}

/* Logo específico para la página de Gracias (muestra encima del título) */
.gracias-top-logo {
    text-align: center;
    margin-bottom: 1rem;
}
.gracias-top-logo img {
    height: 84px;
    width: auto;
    display: inline-block;
    -webkit-filter: none;
    filter: none;
}
@media (max-width: 767px) {
    .gracias-top-logo img {
        height: 96px;
    }
}

/* Evitar logo duplicado en mobile: ocultar el logo extra de la página Gracias
   cuando ya existe el logo fijo `.mobile-logo` */
@media (max-width: 767px) {
    .gracias-top-logo {
        display: none !important;
    }
}

/* Ocultar el logo extra en desktop para evitar duplicados con el header */
@media (min-width: 1024px) {
    .gracias-top-logo {
        display: none !important;
    }
}

.gracias-mb {
    margin-bottom: 0;
}

.hidden-iframe {
    display: none;
}

.map-iframe {
    border-radius: 40px;
    display: block;
}

/* Overlay oscuro sobre videos/maps cuando se necesita un filtro ligero */
.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5); /* aclarado: menos oscuro */
    pointer-events: none;
    z-index: 4; /* debe quedar debajo de .hero-text-overlay (z-index:10) */
}

/* Mobile overlay content: centered title + CTA shown only on mobile */
.hero-overlay-content {
    display: none; /* default hidden, shown in mobile */
}


/* Desktop fallback: si no existe .video-overlay, crear overlay oscuro sobre el aside del hero */
@media (min-width: 1024px) {
    .hero-image-aside::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 3; /* debajo de .hero-text-overlay (z-index:10) y encima del video */
        pointer-events: none;
    }
}

/* Mobile: mostrar solo el componente aside.hero-image-aside y ocultar el resto */
@media (max-width: 767px) {

    /* ocultar header y menús (no ocultar footer) */
    header, #mobile-menu, .desktop-only, .hidden-desktop {
        display: none !important;
    }

    /* Forzar que el footer sea visible en mobile (anula rules previas cacheadas) */
    footer {
        display: block !important;
    }

    /* asegurar que .hero-image-aside se muestre en mobile y ocupe pantalla */
    .hero-image-aside {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: 100vh !important;
        overflow: hidden !important;
        z-index: 2 !important;
    }

    /* ocultar todo el contenido dentro de main excepto el aside.hero-image-aside
       (aplica solo a la landing 'turnos' para evitar ocultar otras páginas como 'gracias') */
    .text-turnos-text main > * {
        display: none !important;
    }
    .text-turnos-text main > .hero-image-aside {
        display: block !important;
        margin-bottom: 3rem;
    }

    /* video full-bleed */
    .hero-image-aside video {
        width: 100% !important;
        height: 100vh !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        pointer-events: none !important;
    }

    /* overlay y título encima del video */
    .hero-image-aside .video-overlay {
        position: absolute !important;
        inset: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 3 !important;
        pointer-events: none !important;
    }

    /* hide desktop vertical label and show mobile-friendly centered overlay */
    .hero-image-aside .hero-text-overlay {
        display: none !important;
    }

    .hero-overlay-content {
        display: block !important;
        position: absolute !important;
        /* posicionar más abajo en mobile, no centrado */
        top: auto !important;
        bottom: 4rem !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        z-index: 10 !important;
        text-align: center !important;
        pointer-events: auto !important;
        width: 100% !important;
        padding: 0 1rem !important;
        max-width: none !important;
    }

    /* H2 móvil: evitar clipping, permitir wrapping y tamaño responsivo */
    .hero-overlay-content .turnos-h1-mobile {
        color: #ffffff !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 0 0.75rem 0 !important;
        box-shadow: none !important;
        text-align: left !important;
        display: block !important;
        /* permitir que el título haga wrap y no se corte */
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        hyphens: auto !important;
        /* tamaño más contenido en móviles pequeños */
        font-size: clamp(2.5rem, 8.5vw, 3.5rem) !important;
        line-height: 1.05 !important;
        text-shadow: 0 6px 18px rgba(0,0,0,0.6) !important;
    }

    /* Forzar color blanco solo para el H1 dentro del hero-overlay-content (mobile video overlay en turnos.html) */
    .hero-overlay-content .turnos-h1-mobile .turnos-line1,
    .hero-overlay-content .turnos-h1-mobile .turnos-line2 {
        color: #ffffff !important;
    }

    /* Ajustes adicionales para pantallas muy pequeñas */
    @media (max-width: 360px) {
        .hero-overlay-content .turnos-h1-mobile {
            font-size: 1.5rem !important;
        }
        .hero-overlay-content {
            left: 0.75rem !important;
            right: 0.75rem !important;
            top: 46% !important;
        }
    }

    /* Forzar que el título 'Central de Turnos' quede en dos renglones en mobile */
    .turnos-h1-mobile .turnos-line1 {
        display: inline-block;
        white-space: nowrap; /* evitar que 'Central de' se divida en más de una línea */
        margin: 0;
        padding: 0;
    }

    .turnos-h1-mobile .turnos-line2 {
        display: block; /* fuerza que 'Turnos' vaya en la segunda línea */
        margin: 0;
        padding: 0;
        line-height: 1;
    }

    /* Seguridad: limitar a máximo dos líneas visuales para evitar saltos inesperados
       si el contenido crece o la pantalla es extremadamente pequeña */
    .turnos-h1-mobile {
        overflow: hidden;
        display: block;
        max-height: calc(2 * 1em * 1.1); /* dos líneas basadas en font-size y line-height aproximado */
    }

    .hero-overlay-content .hero-cta {
        display: block !important;
        font-size: 1.05rem !important;
        padding: 0.9rem 1.5rem !important;
        width: 100% !important;
        max-width: 480px !important;
        border-radius: 999px !important;
        box-shadow: 0 12px 30px rgba(13,48,80,0.12) !important;
        margin: 0 auto !important;
        background-color: white !important;
        color: #0D3050 !important;
    }

    /* (removed mobile re-definition of .hero-text-overlay to keep it hidden on mobile) */
}

/* Alinear textos del hero a la izquierda sólo en la página `turnos` */
body.text-turnos-text .hero-content-section {
    text-align: left !important;
}

body.text-turnos-text .hero-content-section .turnos-h1-mobile,
body.text-turnos-text .hero-content-section p,
body.text-turnos-text .hero-content-section .portal-button {
    text-align: left !important;
    margin-left: 0 !important;
}

/* En mobile, asegurarse que el overlay siga alineado a la izquierda en la landing de turnos */
@media (max-width: 767px) {
    body.text-turnos-text .hero-overlay-content {
        left: 1rem !important;
        right: 1rem !important;
        transform: translateY(-50%) !important;
        text-align: left !important;
        padding: 0 !important;
        width: auto !important;
    }

    body.text-turnos-text .hero-overlay-content .turnos-h1-mobile {
        text-align: center !important;
    }
}

/* Overrides específicos para páginas que no son la landing 'turnos' (p.ej. portal.html) */
@media (max-width: 767px) {
    /* Mostrar header en páginas que no son la landing de turnos (header estaba oculto globalmente) */
    body:not(.text-turnos-text) header {
        display: block !important;
    }

    /* Asegurar que en portal.html el título quede centrado y no se corte */
    body:not(.text-turnos-text) .turnos-h1-mobile {
        text-align: center !important;
        font-size: clamp(1.6rem, 6.5vw, 2.4rem) !important;
        line-height: 1.1 !important;
        margin-top: 0.75rem !important;
        margin-bottom: 1rem !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }

    /* Forzar que el formulario quede debajo del título y con margen */
    body:not(.text-turnos-text) .form-card {
        margin-top: 1rem !important;
        max-width: 720px !important;
    }

    /* Ajustes de padding para el contenedor principal en mobile */
    body:not(.text-turnos-text) .max-w-6xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-top:1rem !important;
    }
}

/* Asegurar que el overlay móvil tenga exactamente el mismo filtro que en desktop */
@media (max-width: 767px) {
    .mobile-hero-bg .video-overlay,
    .hero-image-aside .video-overlay {
        background: rgba(0,0,0,0.5) !important;
        z-index: 3 !important;
        pointer-events: none !important;
    }

    /* Fallback: crear un overlay oscuro incluso si no existe el elemento .video-overlay */
    .hero-image-aside::before {
        content: "" !important;
        position: absolute !important;
        inset: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 3 !important;
        pointer-events: none !important;
    }
}

/* Mobile logo: visible solo en pantallas pequeñas, arriba a la izquierda */
.mobile-logo {
    display: none; /* oculto por defecto (desktop) */
}

/* Floating CTA button (Reservar turno) - visible en mobile y desktop */
.floating-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    z-index: 10;
    pointer-events: auto;
}

.floating-cta .portal-button {
    padding: 0.85rem 1.25rem !important;
    font-size: 1rem !important;
    border-radius: 999px !important;
    box-shadow: 0 12px 30px rgba(13,48,80,0.12) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

@media (max-width: 767px) {
    .floating-cta .portal-button {
        font-size: 1.05rem !important;
        padding: 0.9rem 1.5rem !important;
        width: calc(100% - 2rem);
        max-width: 480px;
    }
}

@media (max-width: 767px) {
    .mobile-logo {
        display: block !important;
        position: fixed !important;
        top: 12px !important;
        left: 12px !important;
        width: 90px !important;
        max-width: 90px !important;
        height: auto !important;
        z-index: 9999 !important; /* asegurar que quede encima de todo */
        pointer-events: auto !important;
        background: transparent !important;
        transform: none !important; /* evitar que herede transform y deje de ser fixed */
        -webkit-transform: none !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        will-change: auto !important;
        opacity: 1 !important;
        transition: opacity 0.3s ease !important;
    }

    .mobile-logo.logo-hidden {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .mobile-logo img,
    .mobile-logo svg {
        width: auto !important;
        height: 96px !important;
        display: block !important;
        transition: filter 150ms ease !important;
    }

    /* Pintar el logo de blanco sólo en la landing de Turnos */
    body.text-turnos-text .mobile-logo img,
    body.text-turnos-text .mobile-logo svg {
        -webkit-filter: brightness(0) invert(1) !important;
        filter: brightness(0) invert(1) !important;
    }

    /* ocultar el logo por defecto (centrado) en mobile para evitar duplicados */
    header .text-center img {
        display: none !important;
        visibility: hidden !important;
    }
}
