/* ==========================================================================
   Variables y Reset (Minimalist V3 Theme)
   ========================================================================== */
:root {
    --primary-color: #9EADBA; /* Soft Corporate Blue */
    --primary-dark: #81919E;
    
    --text-main: #1C1C1C;
    --text-muted: #666666;
    
    --bg-white: #FFFFFF;
    --bg-gray: #F9F9F9;
    
    --border-color: #EAEAEA;
    
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-muted);
    background-color: var(--bg-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.2;
}

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

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

ul {
    list-style: none;
}

/* ==========================================================================
   Utilidades
   ========================================================================== */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
}

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

.section-header {
    margin-bottom: 80px;
    max-width: 600px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1.1rem;
}

.label {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-bottom: 16px;
    font-weight: 500;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 24px;
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-main);
}

.btn-outline:hover {
    background-color: var(--text-main);
    color: white;
}

/* ==========================================================================
   Header & Nav
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    transition: height 0.3s ease;
}

.header.scrolled .header-container {
    height: 80px;
}

.logo-img {
    height: 52px;
    transition: height 0.3s ease;
}

.header.scrolled .logo-img {
    height: 42px;
}

.nav-list {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    font-size: 0.78rem;
    color: var(--text-main);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.contact-link {
    padding-bottom: 8px;
}

.nav-btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white !important;
    padding: 8px 22px !important;
    font-weight: 600 !important;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    border-radius: 0;
    text-transform: uppercase;
    border: 1px solid var(--primary-color) !important;
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn-cta::after {
    display: none !important;
}

.nav-btn-cta:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: white !important;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 8px;
    position: relative;
    z-index: 1001;
}

/* ==========================================================================
   Hero Section (Video Banner)
   ========================================================================== */
.hero-video {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 100px; /* offset for header */
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 28, 28, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1;
}

.hero-container-video {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content h1 {
    font-size: 4.5rem;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    line-height: 1.1;
    color: var(--bg-white);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 600px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-outline-light {
    background-color: transparent;
    color: var(--bg-white);
    border: 1px solid var(--bg-white);
}

.btn-outline-light:hover {
    background-color: var(--bg-white);
    color: var(--text-main);
}

/* ==========================================================================
   Acerca de
   ========================================================================== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(10%);
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.about-content p {
    margin-bottom: 20px;
}

/* ==========================================================================
   Terapias Expandidas
   ========================================================================== */
.therapy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.therapy-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.therapy-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.therapy-card-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    filter: grayscale(10%);
    transition: filter 0.3s ease;
}

.therapy-card:hover .therapy-card-image img {
    filter: grayscale(0%);
}

.therapy-card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.therapy-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

/* ==========================================================================
   Instalaciones - Grid Cuadrado Estricto
   ========================================================================== */
.square-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background-color: var(--border-color); /* Crea líneas de 1px entre fotos */
}

.square-grid img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    filter: grayscale(10%);
    transition: filter 0.3s ease;
}

.square-grid img:hover {
    filter: grayscale(0%);
}

/* ==========================================================================
   Footer & Contacto (Mega Footer)
   ========================================================================== */
.footer {
    padding: 100px 0 0 0;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    padding-bottom: 80px;
}

.footer-col h3 {
    font-size: 1.25rem;
    margin-bottom: 30px;
    font-weight: 600;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-details li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-label {
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.4;
}

.detail-value a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 16px;
    align-items: center;
}

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

.social-icons a:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form .btn {
    width: 100%;
    border: none;
}

.recaptcha-notice {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
    text-align: center;
}

.recaptcha-notice a {
    color: var(--text-main);
    text-decoration: underline;
}

.recaptcha-notice a:hover {
    color: var(--primary-color);
}

.footer-map {
    height: 100%;
    min-height: 250px;
    background-color: var(--bg-gray);
    border: 1px solid var(--border-color);
}

/* Socket */
.footer-socket {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    background-color: var(--bg-gray);
}

.socket-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links a {
    color: var(--text-main);
    margin: 0 5px;
}

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

.pacientes-link {
    font-weight: 600;
    color: #38A57A;
}

.pacientes-link:hover {
    color: #38A57A;
    opacity: 0.8;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Versión para Tablet (iPad portrait / landscape y tablets: 769px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }

    .section {
        padding: 90px 0;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.15rem;
    }

    .about-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .therapy-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .therapy-card-content {
        padding: 24px;
    }

    .square-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .footer-col:last-child {
        grid-column: span 2;
    }

    .footer-map {
        min-height: 260px;
    }
}

/* Mobile & Small Tablets (< 768px) */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-white);
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 900;
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        max-height: 100vh;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 15px;
        width: 100%;
        padding: 0;
    }
    
    .nav-link {
        display: inline-block;
        font-size: 1.5rem;
        padding: 6px;
        text-align: center;
        border: none !important;
    }
    
    .contact-link {
        border-bottom: none !important;
        padding-bottom: 6px;
    }

    .nav-link::after {
        display: none !important;
    }

    .nav-link.nav-btn-cta {
        border: 1px solid var(--primary-color) !important;
        background-color: var(--primary-color) !important;
        color: white !important;
        font-size: 1.2rem;
        padding: 8px 24px;
        margin-top: 5px;
        display: inline-block;
        border-radius: 0;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .section {
        padding: 70px 0;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .about-image {
        max-width: 380px;
        margin: 0 auto;
        width: 100%;
    }

    .therapy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .square-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-col:last-child {
        grid-column: span 1;
    }
}

/* ==========================================================================
   Lightbox / Image Zoom
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.lightbox-close:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* Scroll prevention when active */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 25px;
        font-size: 35px;
    }
}

/* ==========================================================================
   Modales (WhatsApp Form)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(14, 24, 38, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-white);
    padding: 50px 40px;
    width: 100%;
    max-width: 460px;
    border-radius: 8px;
    border: 1px solid rgba(158, 173, 186, 0.35);
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-content h3 {
    font-size: 1.3rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-main);
    margin-bottom: 15px;
    text-align: center;
}

.modal-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 300;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 0.85rem;
    background-color: var(--bg-gray);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

.form-group select {
    -webkit-appearance: none;
    -moz-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='%23666666' 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 16px center;
    background-size: 14px;
    padding-right: 40px;
    cursor: pointer;
}

.form-group input::placeholder {
    color: #A0B0B9;
    font-weight: 300;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-white);
}

/* -------------------------------------------------------------
   BOTÓN FLOTANTE WHATSAPP
   ------------------------------------------------------------- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #20BA5A;
    transform: scale(1.05);
}

.whatsapp-float svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    .whatsapp-float svg {
        width: 20px;
        height: 20px;
    }
    
    .modal-content {
        padding: 35px 20px;
        margin: 0 12px;
    }
}

/* Ocultar insignia flotante inferior derecha de reCAPTCHA v3 */
.grecaptcha-badge {
    visibility: hidden !important;
}
