/*
Theme Name: Haltus Hope Theme
Version: 1.1
*/

@font-face {
    font-family: 'GalanoGrotesque-Regular';
    src: url('assets/images/galano-grotesque-regular/galano-grotesque-regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-color: #413960;
    --accent-color: #e83e35;
    --text-light: #ffffff;
    --text-dark: #413960;
    --bg-light: #f4f4f4;
    --bg-dark-nav: #312c49;
    --font-heading: 'GalanoGrotesque-Regular', sans-serif;
    --font-body: 'GalanoGrotesque-Regular', sans-serif;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'GalanoGrotesque-Regular', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: 'GalanoGrotesque-Regular', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 15px;
    line-height: 159%;
    letter-spacing: 0;
    text-align: center;
    vertical-align: middle;
    color: var(--text-light);
    background-color: var(--primary-color);
}

/* Global Fix for Overflow */
* {
    max-width: 100vw;
}

.section-container, .header-container, .footer-container, .specialty-container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* --- HEADER & LOGO --- */
.site-header {
    background-color: var(--primary-color);
    padding: 1.5rem 0 0 0; /* Added space at the top */
}

.header-top-bar {
    background-color: #31264A;
    padding: 1.5rem 0;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between; /* Align logo left, slogan right */
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.site-logo {
    height: 120px; /* Increased from 80px */
    width: auto;
    display: block;
    margin-left: 5rem; /* Increased from 2rem to move it more to the right */
}

.slogan-container {
    margin-right: 2rem; /* Add space from the right edge */
    display: flex;
    align-items: center;
}

.header-gif {
    height: 57px;
    width: auto;
    display: block;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    margin-left: 0; /* Keep footer logo as is or adjust if needed */
}

.slogan-wrapper {
    display: flex;
    align-items: baseline;
    gap: 15px;
    font-family: var(--font-heading);
}

.slogan-gigantes, .slogan-innovacion {
    font-weight: 900;
    font-size: clamp(1.5rem, 4vw, 4.5rem);
}

.slogan-en { font-size: 1.5rem; font-style: italic; opacity: 0.8; }

/* --- NAVIGATION --- */
.main-navigation {
    background-color: #413960; /* Set specific color */
    width: 100%;
    margin-top: 0; /* Remove gap to merge with top bar */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-flex {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.nav-menu a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1.2rem 1.5rem;
    display: block;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu a.active, .nav-menu a:hover { color: var(--text-light); }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    transition: var(--transition);
}

/* --- HERO --- */
.hero-full-width {
    width: 100%;
    min-height: 400px;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    border-radius: 0;
    overflow: hidden; 
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2; /* Stays below overlay and content */
}

.hero-overlay-main {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 39, 66, 0.4); /* Overlay to ensure text readability */
    z-index: -1;
}

.hero-floating-content {
    position: relative;
    z-index: 1;
}

.hero-main-title {
    font-size: clamp(2rem, 8vw, 5.5rem);
    font-weight: 900;
    padding: 0 5%;
}

.hero-main-title span { color: var(--accent-color); }

/* --- SECTIONS GENERAL --- */
main section { padding: 6rem 0; width: 100%; }

/* NOSOTROS */
.about-section { background: white; color: var(--text-dark); text-align: center; }
.about-content { margin: 0 auto; }
.about-content h3 { 
    font-size: clamp(2rem, 5vw, 3.5rem); 
    margin-bottom: 2rem; 
    color: var(--primary-color); 
    font-weight: 900 !important; /* Force thick weight for this title */
}
.about-content p { text-align: justify; margin-bottom: 2rem; font-size: 1.1rem; color: #555; }

.about-video-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 3rem auto;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 0; /* Remove rounded borders */
    position: relative;
}

.about-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0; /* Remove rounded borders */
    display: block;
}

.about-video-wrapper::after {
    content: '';
    position: absolute;
    bottom: -12.5px; /* Half of the 25px border thickness to stay half in/half out */
    right: -12.5px;
    width: 250px;
    height: 250px;
    border-bottom: 25px solid var(--accent-color); 
    border-right: 25px solid var(--accent-color);
    z-index: 1;
    pointer-events: none;
}

/* VALORES */
.values-section { background: white; color: var(--text-dark); border-top: 1px solid #eee; }
.section-title { text-align: center; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; color: var(--primary-color); margin-bottom: 4rem; }

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.value-item.image-flip {
    height: 450px; /* Restore height so cards don't disappear */
    padding: 0;
    background: #f9f9f9;
    border-radius: 30px;
    display: block;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    /* Entrance animation properties */
    opacity: 0;
    transform: rotate(-180deg) scale(0.3);
    transition: transform 0.4s ease;
}

.value-item.animate-spiral {
    animation: spiralIn 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes spiralIn {
    from { opacity: 0; transform: rotate(-180deg) scale(0.3); }
    to { opacity: 1; transform: rotate(0deg) scale(1); }
}

.value-item:nth-child(2) { animation-delay: 0.2s; }
.value-item:nth-child(3) { animation-delay: 0.4s; }

.value-front, .value-back {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.6s ease;
}

.value-front img, .value-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.value-back {
    z-index: 2;
    clip-path: circle(0% at 50% 100%);
    background: var(--primary-color);
}

.value-item.image-flip:hover .value-back {
    clip-path: circle(150% at 50% 100%);
}

.value-item:hover { transform: translateY(-10px); }

.value-icon { font-size: 5rem; color: var(--accent-color); }

.value-text-container { 
    opacity: 0; 
    transform: rotate(90deg) scale(0.5); 
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.1s, opacity 0.5s 0.1s; 
    text-align: center; 
}

.value-item:hover { color: white; transform: translateY(-10px); }

.value-item:hover .value-icon-container { 
    opacity: 0; 
    transform: rotate(360deg) scale(0); 
}

.value-item:hover .value-text-container { 
    opacity: 1; 
    transform: rotate(0deg) scale(1); 
}

.value-item:hover h3 { color: white; }
.value-item:hover p, .value-item:hover li { color: rgba(255,255,255,0.9); }

/* ESPECIALIDADES */
.specialized-section { background: var(--bg-light); color: var(--text-dark); }
.section-description {
    max-width: 2000px;
    margin: 0 auto 5rem auto; /* Added 5rem bottom margin */
    text-align: justify; /* Changed from center to justify */
    font-size: 1.1rem;
    line-height: 1.8;
}
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
    justify-content: center; /* Centra las filas incompletas */
}

@media (max-width: 1100px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en pantallas medianas */
    }
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr; /* 1 columna en móviles */
        gap: 5rem 0;
    }
}

.card-lab-wrapper {
    grid-column: 2; /* Centra la tarjeta en la segunda columna de la fila */
}

@media (max-width: 1100px) {
    .card-lab-wrapper {
        grid-column: span 2; /* En 2 columnas, ocupa todo el ancho o se ajusta */
    }
}

@media (max-width: 768px) {
    .card-lab-wrapper {
        grid-column: span 1; /* En móviles vuelve a su tamaño normal */
    }
}

.card { 
    position: relative; 
    width: 100%; 
    max-width: 320px; 
    margin: 0 auto;
    cursor: pointer; 
}

.card-image-wrapper { 
    aspect-ratio: 1 / 1; 
    border-radius: 20px; 
    background-color: var(--primary-color); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: var(--transition);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-suite { background-image: url('assets/images/suits.png'); }
.card-intens { background-image: url('assets/images/terapia.jpg'); }
.card-onco { background-image: url('assets/images/oncologia.jpg'); }
.card-quir { background-image: url('assets/images/quirofano.jpg'); }
.card-imag { background-image: url('assets/images/imagenologia.jpg'); }
.card-endo { background-image: url('assets/images/endoscopia.jpg'); }
.card-lab { background-image: url('assets/images/LABORATORIOS_FOTO 6.webp'); }

.card-title-badge {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1rem;
    width: 85%;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.card-title-badge h3 { font-size: 1rem; font-weight: 800; text-transform: uppercase; color: var(--primary-color); }

.card:hover .card-image-wrapper { transform: translateY(-5px); }
.card:hover .card-title-badge { background: var(--accent-color); }
.card:hover h3 { color: white; }

/* PROFESSIONALS BANNER */
.professionals-banner { background: white; position: relative; overflow: hidden; }

/* RESERVATION SECTION */
.reservation-section { background: white; padding: 0; } /* Remove padding for edge-to-edge */
.reservation-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    width: 100%;
    min-height: 700px;
}

.reservation-image { 
    background-color: #eee;
    background-image: url('assets/images/SE10_v1 1.png'), url('assets/images/SE10_v1 2.png'); 
    background-size: 110%, cover; /* Increased from contain to 115% */
    background-repeat: no-repeat, no-repeat;
    background-position: bottom center, center;
    position: relative;
}

.reservation-form-container { 
    background: var(--primary-color); 
    padding: 6rem 10%; 
    display: flex;
    align-items: center;
    position: relative; /* Ensure relative for the triangle positioning */
}

.reservation-form-container::before {
    content: '';
    position: absolute;
    left: -30px; /* Adjust overlap amount */
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    z-index: 5;
}

@media (max-width: 992px) {
    .reservation-form-container::before { display: none; } /* Hide triangle on mobile stack */
}

.form-inner-wrapper {
    width: 100%;
    max-width: 600px; /* Limits form stretch */
}

.reservation-title { 
    font-size: clamp(2rem, 4vw, 3rem); 
    font-weight: 900; 
    margin-bottom: 2.5rem; 
    line-height: 1.1;
    text-align: left;
}

.reservation-title span { color: var(--accent-color); }

.appointment-form { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group input, 
.form-group select, 
.form-group textarea { 
    width: 100%; 
    padding: 1.2rem; 
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 0; /* Square borders for consistency with video change */
    color: white; 
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.submit-btn { 
    grid-column: span 2;
    background: var(--accent-color); 
    color: white; 
    border: none; 
    padding: 1.2rem; 
    border-radius: 0;
    font-weight: 800; 
    cursor: pointer; 
    transition: var(--transition); 
    letter-spacing: 2px;
    margin-top: 1rem;
    text-transform: uppercase;
}

@media (max-width: 992px) {
    .reservation-grid { grid-template-columns: 1fr; }
    .reservation-image { min-height: 400px; }
    .reservation-form-container { padding: 4rem 5%; }
    .form-inner-wrapper { max-width: 100%; }
}

@media (max-width: 768px) {
    .appointment-form { grid-template-columns: 1fr; }
    .form-group.full-width, .submit-btn { grid-column: span 1; }
}

/* PROFESSIONALS BANNER */
.professionals-banner { 
    background: white; 
    position: relative; 
    /* overflow: hidden; */ /* Removed to allow image pop-out */
    padding: 0rem 0; /* Updated to 0rem 0 as requested */
}

.professionals-banner::before {
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 0;
    background: var(--primary-color); /* The section cover color */
    transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); 
    z-index: 0;
    overflow: hidden; /* Keep the color fill contained */
}

.professionals-banner:hover::before { height: 100%; }

.banner-grid { 
    display: grid; 
    grid-template-columns: 1.1fr 1fr; 
    gap: 8rem; /* Significant gap to prevent overlap */
    position: relative; 
    z-index: 1; 
    align-items: center; 
}

.banner-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    width: 100%;
    max-width: 380px; 
    aspect-ratio: 1 / 1.3; 
    margin: 0 auto; 
}

/* The background circle */
.banner-image-wrapper::before {
    content: '';
    position: absolute;
    width: 100%; 
    height: 77%; 
    aspect-ratio: 1 / 1;
    background: var(--primary-color);
    border-radius: 50%;
    z-index: -1;
    transition: all 0.6s ease;
    bottom: 0;
    left: 0;
}

/* On hover circle effect */
.professionals-banner:hover .banner-image-wrapper::before {
    background: white;
    transform: scale(1.02);
}

.banner-image { 
    width: 153%;
    height: 100%;
    position: absolute;
    bottom: 0; 
    left: 52%; /* Slightly shifted to the right as requested */
    transform: translateX(-50%);
    border-radius: 0; 
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: bottom center; 
    background-image: url('assets/images/Q32_v1 1.png');
    z-index: 1;
}

.professionals-banner:hover h2,
.professionals-banner:hover p {
    color: white;
}

.banner-content h2 {
    font-size: clamp(1rem, 2vw, 3rem);
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2; /* Añadido para evitar que las líneas se peguen al romper */
    transition: var(--transition);
}

.banner-content p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    text-align: justify;
    transition: var(--transition);
}

.banner-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.banner-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

@media (max-width: 992px) {
    .banner-grid { 
        grid-template-columns: 1fr; 
        gap: 3rem; 
        align-items: center; /* Center on mobile */
    }
    .banner-content { text-align: center; }
    .banner-content h2, .banner-content p { text-align: center; }
    .banner-content p { text-align: center; } /* Overriding justify for mobile readability */
    
    .banner-image-wrapper {
        margin: 80px auto 0 auto; /* Space for heads on mobile */
        max-width: 300px; /* Smaller circle for mobile */
    }

    .banner-image {
        width: 130%; /* Reduced scale for mobile (from 153%) */
        left: 50%; /* Re-centered for mobile */
    }
}

/* FOOTER */
.site-footer { 
    background: var(--primary-color); 
    padding: 5rem 0 2rem; 
    border-top: 4px solid var(--accent-color); 
    color: white;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

.footer-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 4rem; 
    margin-bottom: 4rem; 
}

.footer-section { 
    text-align: left; 
    padding-right: 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2); /* Línea vertical blanca sutil */
}

.footer-section:last-child {
    border-right: none; /* Quitar línea en la última columna */
    padding-right: 0;
}

@media (max-width: 992px) {
    .footer-section { 
        border-right: none; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
        padding-right: 0;
        padding-bottom: 2rem;
    }
    .footer-section:last-child {
        border-bottom: none;
    }
}

.footer-logo-area .footer-logo {
    height: 100px;
    width: auto;
    margin-bottom: 1.5rem;
}

.footer-tagline {
    display: none; /* Ocultamos el tagline anterior */
}

.footer-social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-btn {
    display: block;
    width: 45px;
    height: 45px;
    transition: var(--transition);
}

.social-btn img {
    width: 91%;
    height: 100%;
    object-fit: contain;
}

.social-btn:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

@media (max-width: 992px) {
    .footer-social-links { justify-content: center; }
}

.footer-title { 
    font-weight: 900; 
    margin-bottom: 2rem; 
    color: var(--accent-color); 
    font-size: 1.2rem;
    text-transform: uppercase;
}

.contact-item { margin-bottom: 1.5rem; }

.contact-label {
    display: block;
    font-weight: 800;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.contact-value {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
}

.contact-sub {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.2rem;
}

.map-wrapper iframe {
    border-radius: 20px; /* Bordes redondeados aplicados */
    filter: grayscale(0.2);
}

.footer-bottom { 
    text-align: center; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 2rem; 
    font-size: 0.8rem; 
    opacity: 0.6; 
}

@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .footer-section { text-align: center; }
    .footer-logo-area .footer-logo { margin: 0 auto 1.5rem auto; }
}

/* --- MOBILE QUERIES --- */
@media (max-width: 992px) {
    .header-top-bar { position: relative; } /* Context for the toggle */

    .header-container { 
        flex-direction: column; 
        text-align: center; 
        gap: 1rem; 
        padding: 1rem 0;
    }

    .site-logo {
        height: 80px; 
        margin-left: 0; 
        margin: 0 auto;
    }

    .slogan-container {
        margin-right: 0; 
        justify-content: center;
        width: 100%;
    }

    .header-gif {
        height: 30px; 
        margin: 0 auto;
    }
    
    .slogan-wrapper { justify-content: center; }
    
    .menu-toggle { 
        display: flex; 
        position: absolute; 
        right: 20px; 
        top: 25px; /* Moved up to the header area */
        z-index: 1100;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--bg-dark-nav);
        padding: 1rem 0;
    }
    
    .nav-menu.active { display: flex; }
    .nav-menu a { text-align: center; padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
}

@media (max-width: 768px) {
    body { font-size: 13px; line-height: 1.5; } /* Reducción base */
    main section { padding: 4rem 0; }
    .hero-full-width { height: 50vh; min-height: 300px; }
    .about-video-wrapper::after { width: 50px; height: 50px; border-width: 8px; }

    /* Reducción de títulos y párrafos de sección */
    .about-content h3, .section-title { font-size: 1.8rem !important; }
    .about-content p, .section-description p { font-size: 0.95rem; line-height: 1.5; }

    /* Compactación Filosofía Haltus */
    .values-section { padding: 3rem 0; }
    .values-section .section-title { margin-bottom: 2.5rem; }
    .values-grid { gap: 1.5rem; }
    .value-item { height: 320px; padding: 1.5rem; border-radius: 20px; }
    .value-icon { font-size: 4rem; }
    .value-text-container h3 { font-size: 1.5rem; margin-bottom: 1rem; }
    .value-text-container p, .value-text-container li { font-size: 0.85rem; line-height: 1.4; }
    .values-list li { margin-bottom: 0.3rem; }
}
