/* ==========================================================================
   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.95rem;
    color: var(--text-main);
    font-weight: 500;
}

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

.contact-link {
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 2px;
}

.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: 1/1;
    object-fit: cover;
    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;
}

.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,
.hierro-link:hover {
    color: var(--primary-color);
}

.hierro-link {
    font-weight: 600;
    color: var(--text-main);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .about-container, .therapy-grid, .footer-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .square-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@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; /* overwrite old max-height if any */
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        width: 100%;
        padding: 0;
    }
    
    .nav-link {
        display: inline-block;
        font-size: 1.5rem;
        padding: 10px;
        text-align: center;
        border: none !important; /* override any borders */
    }
    
    .contact-link {
        border-bottom: none !important;
        padding-bottom: 10px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .section {
        padding: 80px 0;
    }
}
