/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --white: #ffffff;
    --pastel-blue: #e1f5fe;
    --pastel-green: #e8f5e9;
    --color-acento: #006d77;    /* Teal Sanáhra */
    --text-main: #1d1d1f;       /* Apple Black */
    --text-secondary: #86868b;  /* Apple Grey */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { 
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden; 
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f5f7;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    padding-top: 90px; 
}

/* =========================================
   2. HEADER & NAV (STICKY / FIJO)
   ========================================= */
.standard-navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 90px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    position: fixed; top: 0; left: 0; z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-container {
    width: 100%; max-width: 1200px; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}

.nav-logo { height: 60px; transition: transform 0.3s ease; }
.logo-link:hover .nav-logo { transform: scale(1.05); }

.nav-menu { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; align-items: center; }

.nav-menu a:not(.crisis-btn) {
    text-decoration: none; color: var(--text-main); font-weight: 600;
    font-size: 1rem; position: relative; transition: color 0.3s ease;
}

.nav-menu a:not(.crisis-btn)::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 0; background-color: var(--color-acento);
    transition: width 0.3s ease;
}

.nav-menu a:not(.crisis-btn):hover { color: var(--color-acento); }
.nav-menu a:not(.crisis-btn):hover::after { width: 100%; }

.nav-menu a.active-link { color: var(--color-acento) !important; }
.nav-menu a.active-link::after { width: 100% !important; }

/* Botón Crisis */
.crisis-btn {
    background-color: #e63946; color: white !important;
    padding: 10px 20px; border-radius: 50px;
    font-weight: 600 !important; font-size: 0.9rem !important;
    display: flex; align-items: center; gap: 8px; text-decoration: none;
    transition: transform 0.2s ease, background-color 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
}
.crisis-btn:hover { background-color: #d62828; transform: scale(1.05); }

/* Botón Menú Móvil */
.mobile-menu-btn {
    display: none; background: none; border: none;
    font-size: 1.8rem; color: var(--text-main); cursor: pointer;
    -webkit-tap-highlight-color: transparent; outline: none;
}
.mobile-menu-btn:focus { outline: none; }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    height: 90vh;
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: white;
    transition: background-image 1s ease-in-out;
    position: relative;
    margin-top: -90px; padding-top: 90px;
}
.hero::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); z-index: 1; }
.hero-content { position: relative; z-index: 2; }
.hero-content h1 { font-size: 5rem; letter-spacing: -2px; text-shadow: 0 5px 15px rgba(0,0,0,0.5); margin: 0; }
.hero-content p { font-size: 1.5rem; letter-spacing: 3px; margin-top: 10px; font-weight: 300; }

/* =========================================
   4. BENTO GRID (SERVICIOS)
   ========================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 60px 20px; }
.section-title { text-align: center; font-size: 3rem; margin-bottom: 50px; color: var(--text-main); }

.services-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    grid-template-rows: repeat(2, 320px); 
    gap: 24px; 
}

.service-card-link { text-decoration: none; display: contents; }

.service-card {
    background: var(--white); 
    border-radius: 32px; 
    padding: 30px;
    position: relative; 
    overflow: hidden; 
    transition: var(--transition);
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    border: 1px solid rgba(0,0,0,0.03); 
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

/* ACOMODO ESCRITORIO */
.service-card.therapy { grid-column: span 2; grid-row: span 2; }
.service-card.physical-activity { grid-column: span 2; grid-row: span 1; background-color: var(--pastel-green); }
.service-card.locations { grid-column: span 2 !important; grid-row: span 1 !important; }

/* TEXTOS E IMÁGENES */
.card-info { position: relative; z-index: 10; height: 100%; display: flex; flex-direction: column; }
.card-info h3 { font-size: 1.8rem; margin-bottom: 10px; color: var(--text-main); }
.card-info p { font-size: 1rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 15px; max-width: 60%; }
.read-more { margin-top: auto; font-weight: 700; color: var(--color-acento); display: flex; align-items: center; gap: 5px; }

.card-img-wrapper { position: absolute; right: -20px; bottom: -20px; width: 220px; height: 180px; z-index: 1; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; transform: rotate(-5deg); transition: var(--transition); }

/* Ajustes normales */
.service-card.locations .card-img-wrapper { width: 240px !important; height: 190px !important; right: -20px !important; bottom: -20px !important; }

.service-card-link:hover .service-card { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.service-card-link:hover img { transform: rotate(0deg) scale(1.05); }

/* =========================================================
   AJUSTE TARJETA TERAPIA (PORTADA) - ESCRITORIO
   ========================================================= */
.service-card.therapy { 
    padding-bottom: 0 !important; 
    justify-content: space-between; 
}

.service-card.therapy .card-img-wrapper { 
    position: relative !important; 
    width: calc(100% + 60px) !important; 
    height: 400px !important; 
    right: auto !important; 
    bottom: auto !important; 
    margin: 30px -30px 0 -30px !important; 
    z-index: 1; 
}

.service-card.therapy .card-img-wrapper img { 
    transform: none !important; 
    border-radius: 0 !important; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center; 
}

.service-card.therapy .read-more { margin-bottom: 20px; z-index: 10; }


/* =========================================
   5. SECCIÓN DE VIDEOS (CARRUSEL & CENTRADO)
   ========================================= */
.video-section {
    padding: 80px 0;
    background-color: #ffffff;
    overflow: hidden;
}

.section-title, .section-subtitle {
    padding: 0 20px; /* Aseguramos margen en títulos */
}

/* CARRUSEL (Scroll Horizontal) - Institucionales */
.shorts-grid {
    display: flex;
    overflow-x: auto;
    gap: 30px; 
    padding: 20px 20px 40px 20px;
    justify-content: center; /* Centrado en escritorio */
    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin: 0 auto;
}

/* Ocultar barra scroll */
.shorts-grid::-webkit-scrollbar { display: none; }
.shorts-grid { -ms-overflow-style: none; scrollbar-width: none; }


/* CENTRADO (Para Testimonios) - ESTO ES LO QUE FALTABA */
.shorts-centered {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap; 
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ESTILO DE TARJETA (VIDEO) */
.video-card {
    min-width: 260px;
    max-width: 260px;
    flex: 0 0 auto;
    scroll-snap-align: center;
    background: #fbfbfd;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* FORMATO VERTICAL 9:16 */
.video-wrapper-vertical {
    position: relative;
    padding-bottom: 177.77%;
    height: 0;
    overflow: hidden;
    background: #000;
}
.video-wrapper-vertical iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

.video-info { padding: 15px; text-align: center; }
.video-info h3 { font-size: 1rem; margin-bottom: 4px; color: var(--text-main); font-weight: 700; }
.video-info p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }


/* =========================================
   6. GOOGLE REVIEWS
   ========================================= */
.testimonials-section { padding: 80px 20px; background-color: #f8f9fa; text-align: center; }
.google-header { margin-bottom: 50px; display: inline-flex; align-items: center; gap: 15px; }
.google-logo-img { height: 40px; width: auto; } 
.rating-score { font-size: 2rem; font-weight: 700; color: #1d1d1f; }
.rating-stars-header { color: #fbbc04; font-size: 1.2rem; }

/* Grid de Testimonios */
.testimonials-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    max-width: 1200px; 
    margin: 0 auto; 
    text-align: left; 
}

.google-card { 
    background: white; 
    padding: 30px; 
    border-radius: 16px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
    border: 1px solid rgba(0,0,0,0.03); 
    transition: transform 0.3s ease; 
    display: flex; 
    flex-direction: column; 
}
.google-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.google-card img { max-width: 100%; height: auto; }

.reviewer-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.reviewer-avatar { width: 45px; height: 45px; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.reviewer-info h4 { margin: 0; font-size: 1rem; color: #1d1d1f; }
.reviewer-info span { font-size: 0.8rem; color: #86868b; }
.card-stars { color: #fbbc04; font-size: 0.9rem; margin-bottom: 15px; }
.review-text { font-size: 0.95rem; line-height: 1.6; color: #444; flex-grow: 1; }
.google-icon-small { margin-top: 15px; width: 20px; opacity: 0.6; align-self: flex-end; }
.google-btn-link { display: inline-block; padding: 12px 30px; background-color: white; color: #555; text-decoration: none; border: 1px solid #ddd; border-radius: 50px; font-weight: 600; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.google-btn-link:hover { background-color: #fbbc04; color: white; border-color: #fbbc04; transform: translateY(-2px); }


/* =========================================
   7. SECCIONES INTERNAS
   ========================================= */
.mission-vision-section { padding: 100px 20px; background-color: #fbfbfd; }
.mv-container { max-width: 1100px; margin: 0 auto; }
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.mv-card { background: white; padding: 50px; border-radius: 30px; box-shadow: 0 10px 40px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.03); transition: transform 0.3s ease; }
.mv-card:hover { transform: translateY(-5px); }
.mv-card.highlight { background: var(--color-acento); color: white; }
.mv-card.highlight h3, .mv-card.highlight p, .mv-card.highlight .icon-box { color: white; }
.icon-box { font-size: 2rem; color: var(--color-acento); margin-bottom: 25px; }
.mv-card h3 { font-size: 2rem; margin-bottom: 20px; letter-spacing: -0.5px; }
.mv-card p { font-size: 1.1rem; line-height: 1.6; color: var(--text-secondary); }

.manifesto-section { padding: 100px 20px; background-color: #1d1d1f; color: white; text-align: center; }
.manifesto-container { max-width: 800px; margin: 0 auto; }
.manifesto-title { font-size: 3rem; font-weight: 700; margin-bottom: 30px; background: linear-gradient(to right, #fff, #a1a1a6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.manifesto-text { font-size: 1.2rem; line-height: 1.6; color: #d2d2d7; margin-bottom: 20px; }
.highlight-stat { color: var(--color-acento); font-weight: 700; font-size: 1.4rem; }

.story-section { padding: 100px 20px; background-color: white; }
.story-container { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 60px; }
.story-text { flex: 1; }
.story-text h2 { font-size: 2.5rem; color: var(--color-acento); margin-bottom: 20px; }
.story-text h3 { font-size: 1.2rem; color: #1d1d1f; margin-bottom: 20px; font-weight: 600; }
.story-text p { font-size: 1.05rem; line-height: 1.7; color: #555; margin-bottom: 15px; text-align: justify; }
.story-img-wrapper { flex: 1; height: 600px; position: relative; }
.story-img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.15); }

/* Contact Page */
.contact-wrapper { display: flex; min-height: calc(100vh - 90px); }
.contact-form-side { flex: 1; padding: 60px; display: flex; align-items: center; justify-content: center; background: white; }
.form-content { max-width: 500px; width: 100%; }
.subtitle-small { color: var(--color-acento); font-weight: 700; letter-spacing: 2px; font-size: 0.8rem; display: block; margin-bottom: 15px; }
.form-content h1 { font-size: 3rem; line-height: 1.1; margin-bottom: 15px; color: var(--text-main); }
.intro-text { color: var(--text-secondary); margin-bottom: 40px; font-size: 1.1rem; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; color: #333; }
.styled-form input, .styled-form textarea { width: 100%; padding: 15px; border: 2px solid #f0f0f0; border-radius: 12px; font-size: 1rem; transition: all 0.3s ease; background: #fafafa; font-family: inherit; }
.styled-form input:focus, .styled-form textarea:focus { border-color: var(--color-acento); background: white; outline: none; }
.submit-btn { background-color: var(--color-acento); color: white; border: none; padding: 15px 35px; border-radius: 50px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: transform 0.2s; width: 100%; display: flex; justify-content: center; gap: 10px; }
.submit-btn:hover { background-color: #00565e; transform: scale(1.02); }
.direct-contact { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }
.direct-contact p { margin-bottom: 10px; color: #555; display: flex; align-items: center; gap: 10px; }
.contact-image-side { flex: 1; position: relative; background-color: #f0f0f0; }
.bg-image { width: 100%; height: 100%; object-fit: cover; }
.map-card { position: absolute; bottom: 40px; left: 40px; right: 40px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 25px; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.15); }
.map-frame { border-radius: 15px; overflow: hidden; margin-top: 15px; }


/* =========================================
   8. SECCIÓN TEAM (NUESTRO EQUIPO)
   ========================================= */
.team-section {
    padding: 100px 20px;
    background-color: #ffffff;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.team-card {
    flex: 0 1 300px;
    width: 100%;
    max-width: 300px;
    background-color: #fbfbfd;
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.member-img-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 25px auto;
    position: relative;
}

.member-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.member-info h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 5px;
    font-weight: 700;
}

.member-role {
    display: block;
    color: var(--color-acento);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.member-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =========================================
   9. FOOTER & REDES
   ========================================= */
.site-footer { background-color: var(--pastel-blue); color: var(--text-main); padding: 80px 0 40px; margin-top: 0; font-size: 0.95rem; border-top: 1px solid rgba(0,0,0,0.05); }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.contact-info { flex: 1.5; min-width: 250px; }
.contact-info p { margin-bottom: 12px; line-height: 1.6; color: var(--text-secondary); }
.contact-info .label { color: var(--color-acento); font-weight: 700; margin-right: 5px; }
.links-column { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 12px; }
.links-column a { color: var(--text-main); text-decoration: none; transition: all 0.3s ease; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.links-column a i { width: 20px; text-align: center; color: var(--color-acento); opacity: 0.7; }
.links-column a:hover { color: var(--color-acento); transform: translateX(5px); }
.links-column a:hover i { opacity: 1; }

/* Redes Sociales */
.footer-socials { margin-top: 25px; display: flex; gap: 15px; }
.footer-socials a { 
    background-color: white !important; 
    color: var(--color-acento) !important; 
    font-size: 1.2rem !important; 
    width: 45px !important; 
    height: 45px !important; 
    border-radius: 50% !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    text-decoration: none; 
}
.footer-socials a:hover { background-color: var(--color-acento) !important; color: white !important; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,109,119,0.2); }

.copyright-text { margin-top: 30px; color: var(--text-secondary); font-size: 0.9rem; }
.phone-link { color: var(--text-main); text-decoration: none; border-bottom: 1px dotted var(--color-acento); transition: 0.3s; }
.phone-link:hover { color: var(--color-acento); border-bottom: 1px solid var(--color-acento); }

.sponsors-row { width: 100%; margin-top: 50px; padding-top: 30px; border-top: 1px solid rgba(0,0,0,0.05); text-align: center; }
.sponsors-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); margin-bottom: 20px; display: block; font-weight: 700; }
.sponsors-grid { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; }
.sponsor-img { height: 40px; width: auto; filter: grayscale(100%); opacity: 0.6; transition: all 0.3s ease; }
.sponsor-img:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }

.whatsapp-float { position: fixed; bottom: 30px; right: 30px; background-color: #25d366; color: white; width: 65px; height: 65px; border-radius: 50%; text-align: center; font-size: 35px; box-shadow: 0 5px 20px rgba(0,0,0,0.3); z-index: 10000; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: all 0.3s ease; }
.whatsapp-float:hover { transform: scale(1.1); background-color: #20ba5a; }


/* =========================================
   10. RESPONSIVE DESIGN (MÓVIL TOTAL)
   ========================================= */
@media (max-width: 900px) {
    /* Menú */
    .mobile-menu-btn { display: block; }
    .nav-menu { position: absolute; top: 100%; left: 0; width: 100%; background-color: white; flex-direction: column; align-items: center; padding: 20px 0; gap: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-top: 1px solid #f0f0f0; display: none; opacity: 0; transform: translateY(-10px); transition: all 0.3s ease; }
    .nav-menu.active { display: flex; opacity: 1; transform: translateY(0); }

    /* Servicios */
    .services-grid { display: grid !important; grid-template-columns: 100% !important; grid-template-rows: auto !important; }
    .service-card { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: auto !important; height: auto !important; width: 100% !important; padding-bottom: 0 !important; }
    .card-info p { max-width: 100%; margin-bottom: 20px; }
    .card-img-wrapper { position: relative; right: auto; bottom: auto; width: calc(100% + 70px) !important; margin-left: -35px; margin-bottom: 0; margin-top: 20px; height: 250px !important; transform: none; }
    .card-img-wrapper img { border-radius: 0 0 32px 32px; transform: none !important; }
    .service-card.therapy .card-img-wrapper, .service-card.locations .card-img-wrapper { width: calc(100% + 70px) !important; height: 250px !important; position: relative !important; right: auto !important; bottom: auto !important; margin: 20px -35px 0 !important; }
    .hero-content h1 { font-size: 3rem !important; width: 100%; padding: 0 15px; word-wrap: break-word; }

    /* AJUSTE TERAPIA MÓVIL (AUMENTADO A 650px) */
    .service-card.therapy .card-img-wrapper { 
        height: 650px !important; 
        margin: 20px -30px 0 -30px !important;
    }

    /* Contacto */
    .contact-wrapper { flex-direction: column !important; height: auto !important; }
    .contact-form-side, .contact-image-side { width: 100% !important; flex: none !important; padding: 0 !important; }
    .contact-form-side { padding: 40px 20px !important; }
    .contact-image-side { display: flex; flex-direction: column; height: auto !important; min-height: auto !important; }
    .contact-image-side .bg-image { height: 300px !important; width: 100% !important; object-fit: cover; }
    .map-card { position: relative !important; width: 90% !important; margin: -50px auto 50px auto !important; left: auto !important; bottom: auto !important; right: auto !important; top: auto !important; border-radius: 20px; z-index: 10; }

    /* Misión y Visión Móvil (1 Columna) */
    .mv-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
    .mv-card { padding: 30px !important; }

    /* Who We Are Móvil (Columna) */
    .story-container { flex-direction: column !important; gap: 30px !important; }
    .story-img-wrapper { height: 300px !important; width: 100% !important; }

    /* VIDEOS MÓVIL: NO CENTRAR (PARA QUE HAYA SCROLL NATURAL) */
    .shorts-grid {
        justify-content: flex-start; /* Empieza a la izquierda para poder deslizar */
    }
}
