:root {
    --emerald-deep: #064e3b;
    --emerald-mid: #065f46;
    --gold-classic: #d4af37;
    --gold-light: #f3e5ab;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-canvas: #ffffff;
    --bg-soft: #f8fafc;
    --radius-xl: 40px;
    --radius-md: 16px;
    --shadow-lux: 0 25px 50px -12px rgba(6, 78, 59, 0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-canvas);
    line-height: 1.7;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.1;
}

/* --- Hero Trascendental --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 4rem 3rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 2s ease-out;
}

.hero-quote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 4.5vw, 2.5rem);
    font-style: italic;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: white;
}

.hero-author {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 700;
    color: var(--gold-classic);
    display: block;
}

/* --- Secciones Globales --- */
section {
    padding: 8rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.section-header {
    text-align: left;
    margin-bottom: 5rem;
}

.section-header h3 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--emerald-deep);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 1.2rem;
}

.section-header p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0;
}

/* --- Bloque Identidad y Botones --- */
.identity-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.8rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}

.btn-gold {
    background: var(--gold-classic);
    color: white;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.btn-gold:hover {
    background: var(--emerald-deep);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(6, 78, 59, 0.2);
}

.pro-nav .btn-gold {
    padding: 0.7rem 1.8rem;
    font-size: 0.75rem;
}

.btn-outline {
    border: 2px solid var(--emerald-deep);
    color: var(--emerald-deep);
}

.btn-outline:hover {
    background: var(--emerald-deep);
    color: white;
}

/* --- Pilares del Mensaje --- */
.pillar-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-md);
    border-top: 5px solid var(--gold-classic);
    box-shadow: var(--shadow-lux);
    text-align: center;
    transition: transform 0.3s ease;
}

.pillar-card:hover {
    transform: translateY(-10px);
}

.pillar-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

/* --- Testimonios --- */
.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.testimonial-item {
    display: flex;
    gap: 2rem;
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-md);
    align-items: center;
    box-shadow: var(--shadow-lux);
    transition: transform 0.3s ease;
}

.testimonial-item:hover {
    transform: translateY(-5px);
}

.testimonial-thumb {
    flex: 0 0 150px;
    aspect-ratio: 3/4;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    position: relative;
}

.testimonial-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.testimonial-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 78, 59, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: white;
    font-size: 2.5rem;
    text-decoration: none;
}

.testimonial-thumb:hover img {
    transform: scale(1.1);
}

.testimonial-thumb:hover .testimonial-video-overlay {
    opacity: 1;
    background: rgba(6, 78, 59, 0.5);
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--emerald-deep);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

.video-link:hover {
    color: var(--gold-classic);
}

.testimonial-text blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: 800;
    color: var(--emerald-deep);
    font-size: 0.9rem;
}

/* --- Noticias --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.news-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.news-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* --- Preguntas Frecuentes (FAQ) --- */
.faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: left;
}

/* --- Footer --- */
.pro-footer {
    background-color: #042f24;
    color: white;
    padding: 8rem 2rem 4rem 2rem;
    margin-top: 5rem;
}

.pro-footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.pro-footer a:hover {
    color: var(--gold-classic);
}

/* --- Preguntas Frecuentes (FAQ) --- */
.faq-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
    background-color: var(--bg-soft);
    border-radius: var(--radius-xl);
    padding: 5rem;
    box-shadow: var(--shadow-lux);
    width: 100%;
}

.faq-image-side {
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.faq-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.faq-accordion {
    text-align: left;
}

.faq-item {
    background: white;
    border-radius: 16px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(6, 78, 59, 0.08);
    border-color: var(--gold-classic);
}

.faq-item[open] {
    box-shadow: 0 15px 30px rgba(6, 78, 59, 0.1);
}

.faq-item summary {
    padding: 1.5rem 2rem;
    font-weight: 700;
    color: var(--emerald-deep);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '';
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23d4af37' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.4s ease;
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 2rem 2rem 2rem;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    border-top: 1px solid rgba(226, 232, 240, 0.3);
    margin-top: -0.5rem;
    padding-top: 1.5rem;
}

/* --- Recursos --- */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 10px rgba(6, 78, 59, 0.03);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.resource-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(6, 78, 59, 0.08);
    border-color: var(--gold-classic);
}

.resource-icon {
    flex: 0 0 64px;
    height: 64px;
    background: rgba(6, 78, 59, 0.04);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.resource-item:hover .resource-icon {
    background: var(--gold-light);
    transform: scale(1.05);
}

.resource-content h4 {
    margin: 0;
    color: var(--emerald-deep);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.resource-item:hover .resource-content h4 {
    color: var(--gold-classic);
}

.resource-item::after {
    content: '→';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    opacity: 0;
    color: var(--gold-classic);
    font-weight: 800;
    transition: all 0.3s ease;
}

.resource-item:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* --- Sticky Header --- */
nav.pro-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 2000 !important;
    padding: 2.5rem 4rem 1.5rem 4rem !important; /* Más aire arriba */
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.4s ease;
    background: transparent;
}

.pro-nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 1rem 4rem !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(6, 78, 59, 0.05);
}

.nav-logo {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 22px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-logo:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.nav-logo img {
    height: 52px; /* Un poco más grande para presencia */
    display: block;
}

nav.pro-nav .nav-links {
    display: flex !important;
    gap: 2.5rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

nav.pro-nav .nav-links a {
    text-decoration: none !important;
    color: white !important;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.pro-nav.scrolled .nav-links a {
    color: var(--emerald-deep) !important;
    text-shadow: none !important;
}

.nav-links a:hover {
    color: var(--gold-classic) !important;
}

/* --- Mobile Toggle --- */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 2100;
}

.nav-links.active ~ div .mobile-toggle {
    color: var(--emerald-deep) !important;
}

/* --- Menu Overlay --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

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

.pro-nav.scrolled .mobile-toggle {
    color: var(--emerald-deep);
}

/* --- Animaciones --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- SVG Icons --- */
.pillar-img {
    width: 100%;
    height: 140px;
    border-radius: 12px;
    object-fit: cover;
    margin: 0 0 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease;
}

.pillar-card:hover .pillar-img {
    transform: scale(1.03);
}

@keyframes pulse-emerald {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(6, 78, 59, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(6, 78, 59, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(6, 78, 59, 0);
    }
}

/* --- OPTIMIZACIÓN RESPONSIVA (MÓVIL) --- */
@media (max-width: 1024px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: fixed !important;
        top: 0 !important;
        left: auto !important;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        color: var(--emerald-deep);
        z-index: 2000;
    }

    .nav-links.active {
        right: 0 !important;
        animation: none !important;
    }

    nav.pro-nav .nav-links a {
        color: var(--emerald-deep) !important;
        font-size: 1.2rem;
        text-shadow: none !important;
    }

    nav.pro-nav,
    nav.pro-nav.scrolled {
        padding: 0.75rem 1rem !important;
    }

    .pro-nav .btn-gold {
        display: inline-flex !important;
        padding: 0.5rem 1rem;
        font-size: 0.65rem;
    }

    .nav-logo {
        padding: 6px 12px;
    }

    .nav-logo img {
        height: 36px;
    }

    :root {
        --radius-xl: 24px;
    }

    section {
        padding: 4rem 1.25rem !important;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .hero {
        min-height: 100vh;
        height: auto;
        padding-top: 100px;
        padding-bottom: 50px;
    }

    .hero-content {
        padding: 2.5rem 1.5rem !important;
        margin: 0 1rem;
        max-width: 100%;
        width: 100%;
    }

    /* Ajustes para la sección de eventos premium apilados */
    #proximo-evento {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #proximo-evento>div {
        display: flex !important;
        flex-direction: column !important;
        padding: 2.5rem 1.5rem !important;
        gap: 2rem !important;
        text-align: left !important;
    }

    #proximo-evento h3 {
        font-size: 1.8rem !important;
    }

    #proximo-evento .event-info-row {
        justify-content: flex-start !important;
    }

    #proximo-evento .event-btns-group {
        justify-content: flex-start !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    #proximo-evento .event-btns-group .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    #proximo-evento .event-image-box {
        height: 250px !important;
        order: -1 !important;
        /* Imagen arriba */
        width: 100% !important;
    }

    .hero-quote {
        font-size: 1.4rem !important;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }

    .hero-author {
        font-size: 0.9rem !important;
        letter-spacing: 0.2em !important;
    }

    /* Colapso de Grids */
    .identity-block,
    .news-grid,
    .testimonials-slider,
    .faq-container,
    [style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    /* Ajustes de FAQ en Móvil */
    .faq-container {
        padding: 1.5rem !important;
    }

    .faq-image-side {
        height: 220px !important;
        margin-bottom: 1rem;
    }

    .faq-accordion .section-header h3 {
        font-size: 1.8rem !important;
    }

    /* Ajustes de Secciones específicas */
    .identity-block {
        text-align: left;
    }

    .identity-content {
        order: 2;
    }

    .identity-block [style*="position: relative"] {
        order: 1;
        margin-bottom: 2rem;
    }

    /* Sección San Josemaría y Biografía */
    [style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Bloque de Intercesión (Verde) */
    [style*="background-color: var(--emerald-deep)"] {
        padding: 3rem 1.5rem !important;
        border-radius: var(--radius-xl) !important;
    }

    [style*="background-color: var(--emerald-deep)"] h3 {
        font-size: 2rem !important;
    }

    /* Tarjetas de Testimonios */
    .testimonial-item {
        flex-direction: column;
        text-align: left;
        padding: 2rem 1.5rem;
    }

    .testimonial-thumb {
        flex: 0 0 auto;
        width: 120px;
        margin: 0 0 1.5rem 0;
    }

    /* Optimización de Espacios y Secciones */
    section {
        padding: 3rem 1.25rem !important;
    }

    .section-header {
        margin-bottom: 2rem !important;
    }

    /* Tamaños de títulos en móvil */
    h2[style*="font-size: 2.8rem"], 
    h3[style*="font-size: 2.8rem"] {
        font-size: 1.8rem !important;
    }

    h2[style*="font-size: 2.0rem"],
    h2[style*="font-size: 1.8rem"] {
        font-size: 1.4rem !important;
    }

    /* Carrusel horizontal para Noticias, Testimonios y Recursos */
    .news-grid, .testimonials-slider, .resource-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 1.25rem !important;
        padding-bottom: 1.5rem !important;
        margin: 0 -1.25rem !important;
        padding-left: 1.25rem !important;
        scrollbar-width: none; /* Firefox */
        -webkit-overflow-scrolling: touch;
    }

    .news-grid::-webkit-scrollbar, 
    .testimonials-slider::-webkit-scrollbar,
    .resource-grid::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .news-card, .testimonial-item, .resource-item {
        flex: 0 0 85% !important;
        scroll-snap-align: start !important;
        margin-bottom: 0 !important;
    }

    .news-card img {
        height: 180px !important;
    }

    /* Ajuste de bloques de imagen y contenido */
    [style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
    }

    .meditation-image, .event-image-box {
        height: 250px !important;
        order: -1; /* Imagen arriba */
        width: 100% !important;
    }

    .meditation-content, .identity-content, .bio-content {
        padding: 2rem 1.5rem !important;
    }

    /* FAQ */
    .faq-item summary {
        padding: 1.2rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Sección Meditación */
    [style*="grid-template-columns: 1fr 1fr"] .meditation-content {
        padding: 3rem 1.5rem !important;
        text-align: left;
    }

    [style*="grid-template-columns: 1fr 1fr"] .meditation-image {
        min-height: 250px !important;
        order: -1;
    }

    /* Botones */
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    [style*="display: flex; gap: 1.5rem"] {
        flex-direction: column;
        gap: 1rem !important;
    }

    /* Footer Mobile */
    .pro-footer {
        padding: 4rem 1.5rem 2rem 1.5rem;
        text-align: center;
    }

    .pro-footer [style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    .pro-footer div {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
}
