/* ============================================================
   PAGES/CSS/conocenos.css
   Iglesia MMM · Presbiterio 18
   ============================================================ */

/* ------------------------------------------------------------
   Variables locales
   ------------------------------------------------------------ */
:root {
    --c-bg:        #0A0F1C;
    --c-bg-alt:    #111827;
    --c-surface:   #FFFFFF;
    --c-line:      #E5E7EB;
    --c-text:      #1F2937;
    --c-text-soft: #6B7280;
    --c-brand:     #FF6A00;
    --c-brand-2:   #FF8C42;
    --c-teal:      #00BFA6;
    --c-warm:      #FF9E4A;
    --radius-sm:   10px;
    --radius:      16px;
    --radius-lg:   22px;
    --shadow-sm:   0 4px 14px rgba(0,0,0,.06);
    --shadow:      0 12px 32px rgba(0,0,0,.10);
    --shadow-lg:   0 30px 80px rgba(0,0,0,.35);
    --tr:          .3s cubic-bezier(.4, 0, .2, 1);
}

/* ------------------------------------------------------------
   Contenedor global
   ------------------------------------------------------------ */
.conocenos {
    background: var(--c-surface);
    color: var(--c-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

.conocenos .section {
    padding: clamp(60px, 8vw, 110px) 0;
}

.conocenos .section--alt {
    background: #F8FAFC;
}

.conocenos .container {
    width: min(1200px, 92%);
    margin-inline: auto;
}

/* ------------------------------------------------------------
   Cabeceras de sección
   ------------------------------------------------------------ */
.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(40px, 5vw, 64px);
}
.section-head--left {
    text-align: left;
    margin-left: 0;
}

.section-tag {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-brand);
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 106, 0, .10);
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    line-height: 1.15;
    color: #0A0F1C;
    margin: 0 0 12px;
}

.section-subtitle {
    color: var(--c-text-soft);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   HERO DE PÁGINA
   ============================================================ */
.page-hero {
    position: relative;
    padding: clamp(90px, 12vw, 160px) 0 clamp(60px, 8vw, 100px);
    background: #0A0F1C;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.page-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,106,0,.35), transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(0,191,166,.28), transparent 55%),
        linear-gradient(135deg, #0A0F1C 0%, #111827 100%);
}

.page-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: .5;
}

.page-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.page-hero__eyebrow {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--c-brand);
    padding: 6px 14px;
    border: 1px solid rgba(255,106,0,.4);
    border-radius: 999px;
    margin-bottom: 22px;
}

.page-hero__title {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.05;
    margin: 0 0 20px;
    letter-spacing: -.01em;
}
.page-hero__title em {
    font-style: italic;
    color: var(--c-brand);
}

.page-hero__desc {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.65;
    color: rgba(255,255,255,.78);
    max-width: 620px;
    margin: 0 0 32px;
}

.page-hero__breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    color: rgba(255,255,255,.7);
}
.page-hero__breadcrumb a {
    color: var(--c-brand);
    text-decoration: none;
    transition: color var(--tr);
}
.page-hero__breadcrumb a:hover { color: #fff; }
.page-hero__breadcrumb i { font-size: .65rem; opacity: .6; }

/* ============================================================
   INTRO
   ============================================================ */
.intro__grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.intro__title {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.2;
    color: #0A0F1C;
    margin: 12px 0 22px;
}
.intro__title span {
    color: var(--c-brand);
    font-style: italic;
}

.intro__text {
    font-size: 1.03rem;
    line-height: 1.75;
    color: #374151;
    margin: 0 0 16px;
}

/* --- Imagen SIN fondo, con drop shadow --- */
.intro__media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    /* Sin background, sin border-radius, sin overflow hidden */
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    padding: 0;
}

.intro__media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 10px 25px rgba(0,0,0,.18))
        drop-shadow(0 4px 10px rgba(0,0,0,.10));
    transition: transform var(--tr), filter var(--tr);
}

.intro__media:hover img {
    transform: translateY(-4px);
    filter:
        drop-shadow(0 18px 40px rgba(0,0,0,.22))
        drop-shadow(0 6px 14px rgba(0,0,0,.12));
}

/* ============================================================
   IDENTIDAD (Misión · Visión · Propósito)
   ============================================================ */
.identidad__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.identity-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--tr), box-shadow var(--tr);
    display: flex;
    flex-direction: column;
}
.identity-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

/* --- Media SIN fondo oscuro --- */
.identity-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #F3F4F6; /* fondo neutro muy claro para que la imagen respire */
}

.identity-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease, filter .6s ease;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,.10));
}
.identity-card:hover .identity-card__media img {
    transform: scale(1.06);
    filter: drop-shadow(0 10px 22px rgba(0,0,0,.16));
}

.identity-card__num {
    position: absolute;
    top: 14px;
    right: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(6px);
    padding: 4px 12px;
    border-radius: 999px;
    z-index: 2;
}

.identity-card__body {
    padding: 22px 24px 26px;
}
.identity-card__body h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0A0F1C;
    margin: 0 0 10px;
}
.identity-card__body p {
    color: #4B5563;
    font-size: .97rem;
    line-height: 1.65;
    margin: 0;
}

/* Variantes de color */
.identity-card--teal  .identity-card__num { background: rgba(0,191,166,.85); }
.identity-card--warm  .identity-card__num { background: rgba(255,158,74,.9); }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline-section {
    background: #fff;
    overflow: hidden;
}

.timeline-wrapper {
    position: relative;
    margin-top: 12px;
}

.timeline-track {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 24px max(24px, calc((100vw - 1200px) / 2)) 32px;
    scrollbar-width: thin;
    scrollbar-color: var(--c-brand) transparent;
    cursor: grab;
}
.timeline-track::-webkit-scrollbar { height: 6px; }
.timeline-track::-webkit-scrollbar-track { background: transparent; }
.timeline-track::-webkit-scrollbar-thumb {
    background: var(--c-brand);
    border-radius: 4px;
}
.timeline-track.is-dragging { cursor: grabbing; user-select: none; }

.timeline-card {
    flex: 0 0 260px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--c-line);
    overflow: hidden;
    transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
    display: flex;
    flex-direction: column;
}
.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(255,106,0,.4);
}

.timeline-card__media {
    display: block;
    padding: 0;
    border: 0;
    background: #0A0F1C;
    cursor: zoom-in;
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}
.timeline-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease, opacity .5s ease;
}
.timeline-card__media:hover img {
    transform: scale(1.08);
    opacity: .9;
}

.timeline-card__year {
    display: inline-block;
    margin: 14px 16px 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: .95rem;
    letter-spacing: .05em;
    color: var(--c-brand);
}
.timeline-card__year--today { color: var(--c-teal); }

.timeline-card h4 {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0A0F1C;
    margin: 6px 16px 8px;
    line-height: 1.3;
}
.timeline-card p {
    font-size: .88rem;
    line-height: 1.55;
    color: #6B7280;
    margin: 0 16px 18px;
}

.timeline-card--today {
    border-color: var(--c-teal);
    box-shadow: 0 8px 24px rgba(0,191,166,.18);
}

/* Controles */
.timeline-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 6px;
    padding-bottom: 20px;
}
.timeline-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    background: #0A0F1C;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: transform var(--tr), background var(--tr);
    display: grid;
    place-items: center;
}
.timeline-btn:hover {
    background: var(--c-brand);
    transform: scale(1.08);
}
.timeline-btn:active { transform: scale(.96); }

.timeline-hint {
    color: #6B7280;
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.timeline-hint i { color: var(--c-brand); }

/* ============================================================
   HISTORIA DETALLADA
   ============================================================ */
.historia__grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.historia__title {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.2;
    color: #0A0F1C;
    margin: 12px 0 22px;
}
.historia__title span {
    display: block;
    color: var(--c-brand);
    font-style: italic;
}

.historia__text p {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
    margin: 0 0 14px;
}
.historia__text strong { color: #0A0F1C; }

.historia__content .btn {
    margin-top: 18px;
}

/* --- Imagen SIN fondo, con drop shadow --- */
.historia__media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    padding: 0;
}

.historia__media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 10px 25px rgba(0,0,0,.18))
        drop-shadow(0 4px 10px rgba(0,0,0,.10));
    transition: transform var(--tr), filter var(--tr);
}

.historia__media:hover img {
    transform: translateY(-4px);
    filter:
        drop-shadow(0 18px 40px rgba(0,0,0,.22))
        drop-shadow(0 6px 14px rgba(0,0,0,.12));
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 999px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--tr), background var(--tr), color var(--tr), box-shadow var(--tr);
}
.btn--primary {
    background: var(--c-brand);
    color: #fff;
    box-shadow: 0 10px 24px rgba(255,106,0,.35);
}
.btn--primary:hover {
    background: #E85F00;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(255,106,0,.45);
}

/* ============================================================
   MODALES
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.modal.is-open { display: flex; }

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    animation: fadeIn .25s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
    from { opacity: 0; transform: scale(.94); }
    to   { opacity: 1; transform: scale(1); }
}

.modal__panel {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: var(--radius);
    width: min(1000px, 92vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: popIn .3s cubic-bezier(.4, 0, .2, 1);
}
.modal__panel--pdf { height: 90vh; }

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: #0A0F1C;
    color: #fff;
}
.modal__header h3 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal__header h3 i { color: var(--c-brand); }

.modal__close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: background var(--tr);
}
.modal__close:hover { background: rgba(255,255,255,.12); }

.modal__iframe {
    flex: 1;
    width: 100%;
    border: 0;
    background: #fff;
}

.modal__image {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    cursor: zoom-out;
    animation: popIn .3s cubic-bezier(.4, 0, .2, 1);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .intro__grid,
    .historia__grid {
        grid-template-columns: 1fr;
    }
    .intro__media,
    .historia__media {
        order: -1;
        max-width: 520px;
        margin-inline: auto;
        width: 100%;
    }
    .identidad__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .conocenos .section {
        padding: 56px 0;
    }
    .identidad__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .page-hero {
        padding: 90px 0 60px;
    }
    .page-hero__title {
        font-size: 2.1rem;
    }
    .timeline-card {
        flex: 0 0 220px;
    }
    .timeline-track {
        gap: 16px;
        padding-left: 18px;
        padding-right: 18px;
    }
    .timeline-controls {
        gap: 12px;
    }
    .timeline-btn {
        width: 40px;
        height: 40px;
    }
    .modal__panel { border-radius: 12px; }
    .modal__header h3 { font-size: .9rem; }
}

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

.timeline-btn:focus-visible,
.modal__close:focus-visible,
.btn:focus-visible,
.timeline-card__media:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 3px;
}