/* 
    :root es donde definimos nuestras variables globales.
    Si cambiamos un color aquí, se cambiará en toda la web.
    ¡Es como un panel de control!
*/
:root {
    --color-text-main: #fefde2;
    /* Color crema claro para el texto principal */
    --color-text-secondary: #E0E0E0;
    /* Gris claro (no usado actualmente) */
    --color-accent: #d9825c;
    /* Color terracota para botones y bordes */
    --color-accent-light: #f0b357;
    /* Color terracota para botones y bordes */

    --color-dark-overlay: rgba(0, 0, 0, 0.4);
    /* Una capa negra transparente para poner encima de la foto y que se lea el texto */

    --font-heading: 'Montserrat', sans-serif;
    /* Fuente para títulos */
    --font-body: 'Montserrat', sans-serif;
    /* Fuente para el resto */

    --color-bg-dark: #2c2c2c;
    /* Color de fondo oscuro para secciones de contraste */
    --color-bg-purple: #a1a2cd;
    /* Color lila para el footer (aprox) */
}

/* 
    El asterisco * selecciona TODOS los elementos.
    Reseteamos los márgenes y rellenos para tener control total.
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Hace que el tamaño de las cajas incluya el borde y relleno */
}

/* Estilos generales para todo el cuerpo de la página */
body {
    font-family: var(--font-body);
    /* Usamos la fuente definida arriba */
    color: var(--color-text-main);
    /* Usamos el color crema */
    line-height: 1.6;
    /* Espacio entre líneas para que se lea mejor */
    background-color: #fefde20d;
    /* Un fondo muy sutil si se ve algo */
}

/* Imágenes responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === ESTILOS DE LA SECCIÓN HERO (PORTADA) === */

.hero {
    position: relative;
    /* Necesario para poder poner la capa oscura encima */
    height: 100vh;
    /* 100vh significa 100% de la altura de la pantalla (Viewport Height) */
    width: 100%;

    /* Imagen de fondo */
    background-image: url('../img/hero-bg.png');
    background-size: cover;
    /* La imagen cubre todo el espacio sin deformarse */
    background-position: center;
    /* La imagen se centra */
    background-repeat: no-repeat;
    /* La imagen no se repite tipo mosaico */

    /* Flexbox: Una técnica moderna para centrar cosas fácilmente */
    display: flex;
    align-items: center;
    /* Centra verticalmente */
    justify-content: center;
    /* Centra horizontalmente */
    text-align: center;
    /* Alinea el texto al centro */
}

/* Esta es la capa oscura (overlay) encima de la foto */
.hero::before {
    content: '';
    /* Elemento vacío necesario */
    position: absolute;
    /* Se coloca encima de la sección .hero */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-dark-overlay);
    /* El color negro transparente */
    z-index: 1;
    /* Nivel 1: Por encima de la foto */
}

/* Contenedor del texto */
.hero-content {
    position: relative;
    z-index: 2;
    /* Nivel 2: Por encima de la capa oscura (Nivel 1) para que se vea */
    padding: 2rem;
    max-width: 800px;

    /* Animación de entrada */
    animation: fadeIn 1.5s ease-out;
    /* Nombre, duración, tipo de movimiento */
}

/* Texto pequeño "CENTRO AMALIA" */
.overline {
    font-size: 0.9rem;
    letter-spacing: 3px;
    /* Separa las letras */
    text-transform: uppercase;
    /* Todo en mayúsculas */
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Título principal H1 */
h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    /* Tamaño grande */
    font-weight: 400;
    /* Grosor normal */
    line-height: 1.2;
    margin-bottom: 1.5rem;
    /* Sombre para que se lea mejor sobre fondos claros */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Subtítulo */
.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    /* Letra finita */
    margin-bottom: 3rem;
    color: var(--color-text-main);
    opacity: 0.9;
}

/* Estilos del botón */
/* Estilos base del botón */
.btn-base {
    display: block;
    width: fit-content;
    padding: 1rem 2.5rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin: 0 auto;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Nuevo estilo: Botón Relleno (Filled) - Para "Primera consulta gratuita" */
.btn-filled {
    background-color: var(--color-accent);
    color: #fff;
    /* Texto blanco en reposo */
    border: 1px solid var(--color-accent);
}

.btn-filled:hover {
    background-color: transparent;
    color: var(--color-accent);
}

/* Nuevo estilo: Botón Borde (Outline) - Para "Reservar cita" */
.btn-outline {
    background-color: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    margin-top: 1rem;
    /* Espacio entre botones si están apilados */
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: #fff;
}

/* Texto descriptivo extra en el Hero (Psicología...) */
.hero-desc {
    font-size: 1.5rem;
    /* Un poco más grande */
    font-weight: 500;
    color: var(--color-text-main);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

/* Texto descriptivo secundario (Adultos...) */
.hero-desc-sub {
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text-main);
    margin-bottom: 2.5rem;
    /* Separación antes de los botones */
    display: block;
    letter-spacing: 1px;
}

/* Texto de confianza debajo del botón principal */
.hero-trust-text {
    font-size: 0.75rem;
    color: var(--color-text-main);
    opacity: 0.9;
    margin-top: 0.8rem;
    margin-bottom: 1.5rem;
    /* Separación con el siguiente botón si lo hubiera */
    font-weight: 300;
    letter-spacing: 0.5px;
    display: block;
}

/* Definición de la animación 'fadeIn' */
@keyframes fadeIn {
    from {
        opacity: 0;
        /* Empieza invisible */
        transform: translateY(20px);
        /* Empieza un poco más abajo */
    }

    to {
        opacity: 1;
        /* Acaba visible */
        transform: translateY(0);
        /* Acaba en su sitio */
    }
}

/* === SECCIÓN DE MISIÓN (FRASE) === */

.mission {
    background-color: var(--color-bg-dark);
    /* Fondo oscuro */
    padding: 12rem 2rem;
    /* Més alçada per donar més aire i protagonisme */
    text-align: center;
    /* Texto centrado */
    color: var(--color-text-main);
    /* Color claro para el texto */
}

.mission h2 {
    font-size: 2.2rem;
    /* Tamaño grande pero no tanto como el H1 */
    font-weight: 300;
    /* Letra fina y elegante */
    line-height: 1.4;
    /* Altura de línea */
    max-width: 800px;
    /* Ancho máximo para que no se estire demasiado */
    margin: 0 auto;
    /* Centra el bloque de texto horizontalmente */
}

/* === SECCIÓN SOBRE NOSOTROS (ABOUT) === */
.about {
    background-color: #fefde2;
    /* Fondo crema claro */
    color: #333;
    /* Texto oscuro para que se lea sobre crema */
    display: flex;
    /* Ponemos texto e imagen lado a lado */
    flex-wrap: wrap;
    /* Si no cabe (móvil), que baje */
    padding: 4rem 2rem;
    align-items: center;
}

.about-text {
    flex: 1;
    /* Ocupa la mitad */
    padding: 2rem;
    min-width: 300px;
}

.about-text .overline {
    color: var(--color-accent);
    /* Terracota */
    opacity: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.separator {
    width: 60px;
    height: 2px;
    background-color: var(--color-accent);
    margin-bottom: 1.5rem;
}

/* Imágenes de la sección About */
.about-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Cambiado a vertical (una sobre otra) */
    gap: 1.5rem;
}

.about-images img {
    width: 100%;
    height: auto;
    /* Altura automática para mantener proporción */
    max-height: 400px;
    object-fit: cover;
    border-radius: 4px;
}

/* === SECCIÓN DE SERVICIOS (SERVICES) === */
.services {
    position: relative;
    padding: 6rem 2rem;
    overflow: hidden;
    color: #fefde2;
    /* Color crema pedido por el usuario */
    text-align: center;
}

.services-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.services-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Un poco más oscuro para contraste */
    z-index: 1;
}

.services-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
}

.separator-center {
    width: 60px;
    height: 2px;
    background-color: #fefde2;
    /* Color crema */
    margin: 1rem auto 3rem auto;
}

.services-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.service-item {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
}

.service-subtitle {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    color: #fefde2;
    text-transform: none;
    letter-spacing: 0.5px;
}

.service-desc {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.5;
    opacity: 0.85;
    max-width: 280px;
    margin: 0 auto;
}

.icon-circle {
    margin-bottom: 1rem;
    width: 80px;
    height: 80px;
    /* Quitamos el borde del círculo si queremos que el icono sea el protagonista, 
       pero el usuario pidió "contornos", así que mantenemos el estilo limpio. */
    border: 1px solid #fefde2;
    /* Borde crema */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.icon-circle svg {
    width: 40px;
    height: 40px;
    stroke: #fefde2;
    /* Color del trazo crema */
    stroke-width: 1.5;
    fill: none;
    /* Sin relleno, solo contorno */
}

/* === SECCIÓN EQUIPO (TEAM) === */
.team {
    background-color: #1a1a1a;
    /* Casi negro */
    padding: 6rem 2rem;
    text-align: center;
}

.team h2 {
    color: var(--color-text-main);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.team-intro {
    font-size: 1rem;
    color: #888;
    margin-bottom: 4rem;
    font-weight: 300;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Un poco más ancho para las bios */
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.team-member {
    text-align: left;
    /* Alineación izquierda para un tono más humano y legible */
}

.team-member img {
    width: 100%;
    height: 320px;
    /* Un poco más alto para elegancia */
    object-fit: cover;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: grayscale(10%);
}

.team-member:hover img {
    transform: scale(1.02);
    filter: grayscale(0%);
}

.team-member h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: var(--color-text-main);
}

.team-role {
    font-size: 0.85rem;
    color: var(--color-accent-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.team-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.team-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: background-color 0.3s ease;
}

.team-member:hover {
    cursor: pointer;
}

.cta-team {
    display: inline-block;
    color: #fefde2;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    margin-top: 1rem;
}

.team-link:hover .cta-team {
    color: var(--color-accent-light);
    border-bottom: 1px solid var(--color-accent-light);
    padding-left: 5px;
}

/* === CONTACTO Y FOOTER === */
.contact-footer {
    background-color: var(--color-text-main);
    /* Color lila */
    color: white;
}

.contact-info-block {
    padding: 4rem 2rem;
    text-align: center;
    background-color: #8e8db0;
    /* Mismo que el right */
}

.contact-details {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.detail-item h4 {
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Estilos para el contenedor del formulario de HubSpot */
#hubspot-form-container {
    background: white;
    padding: 2rem;
    margin: 3rem auto 0;
    /* Margen auto a los lados para centrar */
    border-radius: 8px;
    color: black;
    max-width: 600px;
    /* Ancho máximo para que no sea enorme */
    width: 90%;
    /* Ancho en móvil (dejando margen) */
}

/* === RESPONSIVE (MÓVIL) === */
/* Reglas que solo aplican si la pantalla es menor de 768px (tablets y móviles) */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
        /* Hacemos el título más pequeño en móvil */
    }

    /* En móvil, reducimos un poco el relleno de la sección de misión */
    .mission {
        padding: 4rem 1.5rem;
    }

    .about,
    .contact-split {
        flex-direction: column;
    }
}

/* === MODAL STYLES === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.01);
    /* Fosc/translúcid */
    backdrop-filter: blur(4px);
    /* Efecte premium de desenfocament */
    display: none;
    /* Amagat per defecte */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #fff;
    color: #333;
    width: 100%;
    max-width: 550px;
    padding: 3rem;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5rem;
    line-height: 0.5;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
}

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

.modal-title {
    font-size: 2.2rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

.modal-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.4;
}

.modal-info {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2rem;
    display: block;
}

/* Ajustes para el formulario de HubSpot dentro del modal */
#hubspot-modal-form {
    width: 100%;
    margin-top: 1rem;
}

/* Estilos para el botón cuando es trigger */
.modal-trigger {
    border: none;
    font-family: inherit;
}

/* Responsive */
@media (max-width: 500px) {
    .modal-card {
        padding: 2rem 1.5rem;
    }

    .modal-title {
        font-size: 1.8rem;
    }
}

/* === ABOUT CTA (SOFT CONVERSION) === */
.about-cta {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    animation: fadeIn 1.5s ease-out;
}

.cta-phrase-ancora {
    color: #333;
    /* Mateix color que el paràgraf */
    font-size: 1rem;
    margin-top: 2rem;
    line-height: 1.6;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.cta-phrase-ancora:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    opacity: 0.8;
}

.btn-secondary-simple {
    background-color: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0.5px;
    margin: 0;
    border-radius: 4px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary-simple:hover {
    background-color: var(--color-accent);
    color: #fff;
}

.cta-microcopy {
    font-size: 0.75rem;
    color: #777;
    margin: -0.5rem 0 0 0;
    opacity: 0.9;
    font-weight: 300;
}

/* === CONVERSION BRIDGE === */
.conversion-bridge {
    background-color: #f9f8f4;
    /* Un beige muy suave, casi blanco */
    padding: 6rem 2rem;
    text-align: center;
}

.bridge-content {
    max-width: 800px;
    margin: 0 auto;
}

.bridge-content h2 {
    font-size: 2.2rem;
    color: var(--color-bg-purple);
    margin-bottom: 0.5rem;
}

.bridge-content p {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* === REFUERZO FORMULARIO CONTACTO === */
.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-header p {
    font-size: 1rem;
    color: #333;
    font-weight: 300;
}

.form-microcopy {
    text-align: center;
    font-size: 0.85rem;
    color: #333;
    margin-top: 1.5rem;
    font-weight: 300;
}

/* Ajustes adicionales para el contenedor del formulario */
#hubspot-form-container {
    max-width: 600px;
    margin: 2rem auto 0 auto;
}

/* === GLOBAL FOOTER === */
.main-footer {
    background-color: #f9f8f4;
    /* Mismo beige suave que el conversion bridge */
    padding: 4rem 2rem;
    color: #4b4a6d;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-logo img {
    height: 60px;
    width: auto;
    opacity: 0.9;
}

.footer-whatsapp .whatsapp-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #25D366;
    /* WhatsApp Green */
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.footer-whatsapp .whatsapp-link:hover {
    transform: scale(1.05);
}

.footer-legal {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.9rem;
}

.footer-legal a {
    color: #4b4a6d;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-legal a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-legal span {
    color: #ccc;
}

.footer-copyright {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 1rem;
}

/* Responsive Footer */
@media (max-width: 600px) {
    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-legal span {
        display: none;
    }
}

/* === PRICING PAGE === */
.pricing-page {
    background-color: var(--color-text-main);
    /* Soft pink/lilac matching the image */
    min-height: 100vh;
    padding: 4rem 2rem;
    font-family: 'Montserrat', sans-serif;
    color: #333;
}

.pricing-title {
    text-align: center;
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}


.pricing-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.pricing-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #000;
    font-weight: 700;
}

.pricing-card .card-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    flex-grow: 1;
    /* Pushes price down */
}

.pricing-card .price {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: #000;
}

.pricing-card .features-title {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 2rem;
    padding: 0;
}

.pricing-card ul li {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.pricing-card ul li::before {
    content: "✓";
    color: var(--color-accent);
    font-weight: bold;
}

.btn-pricing {
    background-color: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    /* Pill shape */
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: auto;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.btn-pricing:hover {
    background-color: #c07250;
    /* Slightly darker terracotta */
}


/* Quan ja no hi caben 4 → forcem 2 columnes (evita el 3+1) */
@media (min-width: 700px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mòbil → 1 columna */
@media (min-width: 1100px) {
    .pricing-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}