/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    --primary-color: #4a5d4e;   /* Verde bosque suave */
    --accent-color:  #8da399;
    --text-color:    #333;
    --bg-light:      #f9fbf9;
    --white:         #ffffff;
    --font-main:     'Jura', sans-serif;
    --transition:    all 0.3s ease;
    --shadow:        0 4px 15px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
    font-size: 16px; /* Evita zoom automático en inputs de iOS */
}

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

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 0;
}
/* =========================================
   2. HEADER Y NAVEGACIÓN (RESPONSIVE)
   ========================================= */

/* Contenedor principal del encabezado */
.main-header {
    background-color: rgba(255, 255, 255, 0.98);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 70px;
    display: flex;
    align-items: center;
}

/* Contenedor interno para alineación de elementos */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* Bloque del Logo (Imagen + Texto) */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

/* Imagen del logo */
.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

/* Texto del logo */
.logo span {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
}

/* Botón de Menú Hamburguesa */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
    padding: 0;
}

/* Líneas de la hamburguesa */
.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: var(--transition);
}

/* Animación: Convertir hamburguesa en X al abrir */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Menú de navegación móvil (Panel lateral) */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Oculto inicialmente a la derecha */
    width: 80%;
    height: 100vh;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    list-style-type: none;
    transition: 0.4s ease-in-out;
    box-shadow: -5px 0px 15px rgba(0, 0, 0, 0.1);
}

/* Clase de activación para mostrar el menú móvil */
.nav-menu.active {
    right: 0;
}

/* Estilos de los enlaces del menú */
.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Submenú en móvil (Dropdown) */
.submenu {
    list-style-type: none;
    text-align: center;
    background-color: #f0f4f2;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 15px;
    padding-right: 15px;
    border-radius: 5px;
}

.submenu li {
    margin-top: 10px;
    margin-bottom: 10px;
}

.submenu li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
}

.nav-item-dropdown {
    position: relative; /* Clave: actúa como ancla para el submenú */
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-parallax {
    height: 60vh; /* Altura optimizada para móvil */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    /* El parallax se activa en desktop vía Media Query */
}

.hero-overlay {
    background-color: rgba(0, 0, 0, 0.4);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero-content {
    text-align: center;
    color: var(--white);
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* =========================================
   4. COMPONENTES DE DISEÑO (INDEX, EQUIPO, AGENDA & BLOG)
   ========================================= */

/* ================================
   4.1 BLOQUES DE TEXTO Y SECCIONES BASE
================================ */
.welcome-section {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--white);
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: #f9f9f9;
}

.intro-text {
    font-size: 1.1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
    line-height: 1.6;
}

.editorial-title {
    font-family: 'PT Serif', serif;
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.italic {
    font-style: italic;
    color: var(--accent-color);
}
/* ================================
   4.2 SECCIONES SPLIT (LAYOUT)
================================ */

/* Contenedor base: En móvil siempre es una columna */
.split-section {
    display: flex;
    flex-direction: column; 
    gap: 40px;
    align-items: center;
    text-align: left;
}

.split-content h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 20px;
}

.split-content p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

/* Tratamiento de imagen editorial unificado */
.split-image img {
    width: 100%;
    aspect-ratio: 4 / 5; /* Formato retrato editorial */
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow);
    display: block;
    filter: sepia(8%); /* Calidez para humanizar perfiles */
}

/* ================================
   4.3 TARJETAS (GRID COMPONENTE)
================================ */
.cards-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.card-vertical {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: 450px; 
    margin: 0 auto;
}

.card-image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Zoom del 20% para asegurar que las orillas se salgan del cuadro */
    transform: scale(1.2);
    /* Centramos el zoom para que recorte uniformemente los cuatro lados */
    transform-origin: center;
    filter: sepia(8%);
}

.card-text {
    padding: 30px;
}

.card-text h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* ================================
   4.4 BOTONES Y CTA
================================ */
.btn-primary {
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    min-height: 44px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.cta-box {
    background-color: #f0f4f2;
    padding: 50px 30px;
    border-radius: 12px;
}


/* ================================
   4.5 COMPONENTES EMBEBIDOS (IFRAMES)
================================ */
.embed-container {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.embed-container iframe {
    width: 100%;
    display: block;
}

.embed-container--small {
    max-width: 800px;
}


/* ================================
   4.6 BLOG Y FEEDS
================================ */
.blog-feed-container {
    width: 100%;
    margin-bottom: 2rem;
}

.blog-feed-container iframe {
    width: 100%;
    border: 1px solid #eee;
    -webkit-overflow-scrolling: touch;
    display: block;
}


/* ================================
   4.7 UTILIDADES DE ESPACIADO
================================ */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

/* ================================
   4.8 CARRUSEL (SERVICIOS INTEGRADOS)
================================ */

/* Contenedor principal adaptable */
.carousel-container {
    position: relative;
    width: 100%;
    height: 500px; /* Altura ideal para leer el texto en móvil */
    overflow: hidden;
    background-color: var(--white);
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Enlace que envuelve toda la diapositiva */
.carousel-link {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    color: var(--white);
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Imagen con zoom para ocultar marcas de agua y dar profundidad */
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(5%) brightness(0.85); /* Un poco más oscuro para que el texto resalte */
    transform: scale(1.15);
    transform-origin: center;
    transition: transform 0.5s ease;
}

.carousel-link:hover img {
    transform: scale(1.2); /* Efecto sutil al pasar el mouse */
}

/* Pie de foto editorial (Información de la tarjeta) */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 30px 40px;
    /* Degradado de negro a transparente para legibilidad total */
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    text-align: center;
    z-index: 4;
}

.carousel-caption h3 {
    font-family: 'PT Serif', serif;
    font-size: 1.8rem;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.carousel-caption p {
    font-family: 'Jura', sans-serif;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 15px;
    line-height: 1.6;
    opacity: 0.9;
}

.click-hint {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--white);
    padding-bottom: 2px;
}

/* Botones de navegación minimalistas */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    color: var(--white);
    border: none;
    font-size: 1.2rem;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    transition: all 0.3s ease;
}

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

.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

/* Overlay de seguridad */
.carousel-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

/* Ajuste para Desktop (Sección 6 integrada conceptualmente) */
@media (min-width: 768px) {
    .carousel-container {
        height: 650px;
    }
    .carousel-caption h3 {
        font-size: 2.5rem;
    }
    .carousel-caption p {
        font-size: 1.2rem;
    }
}

/* ================================
   4.9 GALERÍA DÚO (TALLERES)
================================ */

.dual-gallery {
    display: grid;
    grid-template-columns: 1fr; /* Por defecto 1 columna (móvil) */
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item img {
    width: 100%;
    height: 300px; /* Altura fija para que coincidan */
    object-fit: cover;
    border-radius: 4px;
    filter: sepia(15%) brightness(0.9); /* Estética Mentalia */
    transition: transform 0.5s ease;
}

.gallery-item img:hover {
    transform: scale(1.02);
}

.gallery-description {
    max-width: 900px;
    margin: 0 auto;
}

.gallery-description p {
    font-family: 'Jura', sans-serif;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
    color: var(--text-color);
}

/* Versión Laptop / Tablet */
@media (min-width: 768px) {
    .dual-gallery {
        grid-template-columns: 1fr 1fr; /* Dos imágenes en el mismo eje */
    }
    
    .gallery-item img {
        height: 400px; /* Más altura en pantallas grandes */
    }
}

/* Utilidad para limitar el ancho del texto introductorio */
.max-width-700 {
    max-width: 700px;
    margin: 0 auto;
}

/* =========================================
   5. FOOTER
   ========================================= */

/* Contenedor principal del pie de página */
footer {
    background-color: #f1f1f1;
    padding-top: 60px;
    padding-bottom: 30px;
    border-top: 1px solid #e0e0e0;
}

/* Ajuste de disposición (Mobile-First: apilado vertical) */
.footer-container {
    width: 90%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 30px;
    text-align: center;
}

/* Contenedor de iconos de redes sociales */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 25px;
}

/* Estilo para los iconos de redes (imágenes que actúan como enlaces) */
.social-icon {
    width: 28px;
    height: 28px;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Efecto visual al interactuar con las redes */
.social-icon:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

/* Navegación de enlaces legales y secundarios */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Estilo de los links legales */
.footer-nav a {
    text-decoration: none;
    color: #666666;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

/* Bloque de copyright e información final */
.footer-info p {
    font-size: 0.85rem;
    color: #888888;
    margin-top: 10px;
    line-height: 1.4;
}

/* =========================================
   6. MEDIA QUERIES (RESPONSIVE DESIGN)
   ========================================= */

/* ================================
   BASE: MÓVIL (hasta 767px)
================================ */
@media (max-width: 767px) {
    .blog-feed-container iframe {
        height: 600px !important; 
    }

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


/* ================================
   TABLET Y ESCRITORIO (768px+)
================================ */
@media (min-width: 768px) {

    /* 6.1 Navegación */
    .hamburger {
        display: none;
    }

    .nav-menu {
        position: static;
        display: flex;
        flex-direction: row;
        width: auto;
        height: auto;
        gap: 30px;
        background-color: transparent;
        box-shadow: none;
        right: auto;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    /* Dropdown */
    .nav-item-dropdown {
        position: relative;
    }

    .nav-item-dropdown:hover .submenu {
        display: block;
    }

    .submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        background-color: var(--white);
        box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        border-radius: 4px;
        text-align: left;
        z-index: 1100;
    }

    .submenu li a {
        display: block;
        padding: 10px 20px;
        font-size: 0.9rem;
        color: var(--text-color);
        transition: background 0.3s ease;
    }

    .submenu li a:hover {
        background-color: var(--bg-light);
        color: var(--primary-color);
    }

    /* 6.2 Hero */
    .hero-parallax {
        height: 80vh;
        background-attachment: fixed;
    }

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

    /* 6.3 Layout general */
    .split-section {
        display: flex;
        flex-direction: row;
        gap: 60px;
        align-items: center;
        text-align: left;
    }

    .split-content,
    .split-image {
        flex: 1;
    }

    .split-reverse {
        flex-direction: row-reverse !important;
    }

    /* Cards (ADAPTABLE: Funciona para 2 o 3 tarjetas) */
    .cards-section {
        display: grid;
        /* auto-fit permite que las tarjetas se acomoden solas según el número que haya */
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
        gap: 30px;
        justify-content: center; 
        max-width: 1100px; 
        margin: 0 auto;          
    }

    /* Blog */
    .blog-feed-container iframe {
        height: 900px !important;
    }

    /* Contenedores centrados (Forms y Calendly) */
    .iframe-wrapper,
    .calendly-container {
        max-width: 800px; 
        margin: 0 auto;   
        border-radius: 8px;
        overflow: hidden; 
    }

    .calendly-inline-widget {
        width: 100%;
    }

    /* Carrusel de Servicios */
    .carousel-container {
        height: 550px;
    }

    /* 6.4 Footer */
    .footer-container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .footer-info {
        flex: 1;
        order: 1;
    }

    .footer-nav {
        flex: 1;
        order: 2;
        justify-content: center;
    }

    .footer-social {
        flex: 1;
        order: 3;
        justify-content: flex-end;
    }

    /* Carrusel */
    .carousel-container {
        height: 550px;
    }
}


/* ================================
   DESKTOP GRANDE (1024px+)
================================ */
@media (min-width: 1024px) {

    .container {
        padding-top: 100px;
        padding-bottom: 100px;
    }

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

    .intro-text {
        font-size: 1.25rem;
    }
}

/* ================================
   7. CONTACTO (ESTILOS ESPECÍFICOS)
================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: start;
}

.method-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: sepia(10%); /* Mantiene la estética Mentalia */
}

.method-item h4 {
    font-family: 'PT Serif', serif;
    color: var(--primary-color);
    margin-bottom: 2px;
    font-size: 1.1rem;
}

.method-item p, .method-item a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}

.method-item a:hover {
    color: var(--primary-color);
}

/* Pastillas de Redes Sociales */
.social-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.social-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: 'Jura', sans-serif;
    transition: var(--transition);
}

.social-pill img {
    width: 20px;
    height: 20px;
}

.social-pill:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Contenedor TikTok */
.tiktok-container {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
}

/* Responsive para Laptop */
@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}