/* ── Tecnet Events — single-event.php + archive-event.php ── */
/* Mirrors src/routes/events/index.tsx + src/routes/events/$slug.tsx */

.tn-event-container {
    width: 90%;
    max-width: 1260px;
    margin: 0 auto;
}

/* ── Hero (single event) ── */
.tn-event-hero {
    position: relative;
    isolation: isolate;
    min-height: 700px;
    overflow: hidden;
    border-bottom: 1px solid var(--tn-border);
    display: flex;
    flex-direction: column;
}
/* Mobile only: header-clearance offset moves to the section itself
   instead of living in .tn-event-hero__inner's own (asymmetric) padding
   — that asymmetry was biasing the "centered" content to sit visibly
   lower than the section's actual middle on short phone screens. Tablet
   and up keep the original padding structure below, unchanged. */
@media (max-width: 767px) {
    .tn-event-hero { padding-top: 135px; }
}
@media (min-width: 1024px) {
    .tn-event-hero { min-height: 92vh; }
}
.tn-event-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -20;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.tn-event-hero__wash {
    position: absolute;
    inset: 0;
    z-index: -10;
    background: linear-gradient(100deg, rgba(6,8,16,0.92) 0%, rgba(6,8,16,0.72) 45%, rgba(6,8,16,0.35) 75%, rgba(6,8,16,0.15) 100%);
}
.tn-event-hero__inner {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 32px 0; /* mobile: symmetric, header clearance now lives on .tn-event-hero itself */
}
@media (min-width: 768px) {
    .tn-event-hero__inner { padding: 195px 0 64px; } /* unchanged from before */
}
.tn-event-hero__content { max-width: 720px; }
.tn-event-hero__eyebrow {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #e58a8a;
}
.tn-event-hero__title {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: #ffffff;
    font-size: clamp(2.25rem, 5vw, 3.75rem);
}
.tn-event-hero__sub {
    margin: 24px 0 0;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.65;
    color: rgba(255,255,255,0.9);
}
.tn-event-hero__meta {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
}
.tn-event-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
}
.tn-event-hero__meta-item svg { flex-shrink: 0; }
.tn-event-hero__cta {
    margin-top: 36px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--tn-accent);
    color: #ffffff !important;
    padding: 12px 12px 12px 28px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s;
}
.tn-event-hero__cta:hover { background: var(--tn-accent-h); }
.tn-event-hero__cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

/* ── About + Register ── */
.tn-event-about {
    border-bottom: 1px solid var(--tn-border);
    background: linear-gradient(135deg, #EDD9D6 0%, #FAF7F7 45%, #E8D5D0 100%);
}
.tn-event-about__inner { padding: 72px 0; display: flex; flex-direction: column; gap: 64px; }
@media (min-width: 1024px) { .tn-event-about__inner { padding: 100px 0; gap: 96px; } }

.tn-event-about__head { display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px; }
@media (min-width: 1024px) { .tn-event-about__head { flex-direction: row; align-items: flex-end; gap: 48px; } }
.tn-event-about__h2, .tn-event-register__h2, .tn-event-outcomes__h2, .tn-event-agenda__h2 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.06;
    color: var(--tn-fg);
    font-size: clamp(1.9rem, 4vw, 3.2rem);
}
.tn-event-accent {
    background: linear-gradient(90deg, #a13d3d 0%, #c44a4a 55%, #e58a8a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.tn-event-about__audience { font-size: 18px; font-weight: 300; line-height: 1.6; color: rgba(26,26,34,0.75); }
.tn-event-about__p { font-size: 18px; font-weight: 300; line-height: 1.75; color: rgba(26,26,34,0.75); margin: 0 0 20px; }
.tn-event-about__p:last-child { margin-bottom: 0; }

.tn-event-register__grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .tn-event-register__grid { grid-template-columns: repeat(12, 1fr); gap: 64px; } }
.tn-event-register__left { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 1024px) { .tn-event-register__left { grid-column: span 5; } }
.tn-event-register__meta { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.tn-event-register__meta-item { display: flex; align-items: center; gap: 12px; font-size: 20px; color: rgba(26,26,34,0.7); }
.tn-event-register__meta-icon {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 12px;
    background: rgba(161,61,61,0.1); color: var(--tn-accent); flex-shrink: 0;
}
.tn-event-register__panel {
    background: rgba(252,252,252,1);
    border: 1px solid var(--tn-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 7px 20px 1px rgba(0,0,0,0.05);
}
@media (min-width: 1024px) { .tn-event-register__panel { grid-column: 7 / span 6; padding: 48px; } }
.tn-event-register__external { text-align: center; }
.tn-event-register__external p:first-child { font-size: 18px; font-weight: 600; color: var(--tn-fg); margin: 0; }
.tn-event-register__external p:nth-child(2) { font-size: 14px; color: #666; margin: 8px 0 0; }
.tn-event-register__external-btn {
    margin-top: 24px;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--tn-accent); color: #fff !important;
    padding: 12px 24px; border-radius: 100px;
    font-size: 15px; font-weight: 600; text-decoration: none !important;
    transition: background 0.2s;
}
.tn-event-register__external-btn:hover { background: var(--tn-accent-h); }

/* ── Outcomes ── */
.tn-event-outcomes { border-bottom: 1px solid var(--tn-border); background: rgba(252,246,244,0.3); }
.tn-event-outcomes__inner { padding: 72px 0; }
@media (min-width: 1024px) { .tn-event-outcomes__inner { padding: 100px 0; } }
.tn-event-outcomes__head { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
@media (min-width: 1024px) { .tn-event-outcomes__head { grid-template-columns: repeat(12,1fr); gap: 48px; } }
.tn-event-outcomes__head-left { }
@media (min-width: 1024px) { .tn-event-outcomes__head-left { grid-column: span 5; } }
.tn-event-outcomes__head-right { font-size: 18px; font-weight: 300; line-height: 1.7; color: rgba(26,26,34,0.75); }
@media (min-width: 1024px) { .tn-event-outcomes__head-right { grid-column: 7 / span 6; padding-top: 24px; } }
.tn-event-outcomes__row {
    display: flex; align-items: baseline; gap: 24px;
    padding: 24px 0; border-top: 1px solid var(--tn-border);
}
@media (min-width: 1024px) { .tn-event-outcomes__row { gap: 48px; } }
.tn-event-outcomes__list { border-bottom: 1px solid var(--tn-border); }
.tn-event-outcomes__num { font-family: monospace; font-size: 12px; color: rgba(26,26,34,0.3); flex-shrink: 0; width: 24px; }
.tn-event-outcomes__text { font-size: 19px; font-weight: 300; line-height: 1.4; color: rgba(26,26,34,0.8); margin: 0; letter-spacing: -0.01em; }
.tn-event-outcomes__dot { margin-left: auto; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: rgba(161,61,61,0.3); }

/* ── Speaker ── */
.tn-event-speaker { border-bottom: 1px solid var(--tn-border); background: #FCFCFC; }
.tn-event-speaker__inner { padding: 56px 0; }
@media (min-width: 1024px) { .tn-event-speaker__inner { padding: 96px 0; } }
.tn-event-speaker__row { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1024px) { .tn-event-speaker__row { flex-direction: row; align-items: center; } }
/* Fixed aspect-ratio crop instead of stretching the photo to match the
   dark card's height — the same simple pattern used for photos
   elsewhere on the Events page (e.g. .tn-event-card__image). Stretching
   to an arbitrary tall height forced a brutal, unpredictable crop on any
   photo that isn't already a tall portrait (a landscape headshot ended
   up zoomed in on half a face); a fixed ratio crops sanely regardless
   of the source photo's own orientation. */
.tn-event-speaker__photo { border-radius: 24px; overflow: hidden; flex-shrink: 0; width: 100%; aspect-ratio: 4 / 5; }
@media (min-width: 1024px) { .tn-event-speaker__photo { width: 380px; } }
.tn-event-speaker__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tn-event-speaker__card {
    flex: 1; background: var(--tn-dark); border-radius: 24px;
    padding: 32px; display: flex; flex-direction: column; justify-content: center;
}
@media (min-width: 1024px) { .tn-event-speaker__card { padding: 48px; } }
.tn-event-speaker__h2 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.tn-event-speaker__h2 .tn-event-accent { background: linear-gradient(90deg,#e58a8a,#a13d3d); -webkit-background-clip: text; background-clip: text; }
.tn-event-speaker__meta { margin-top: 32px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); }
.tn-event-speaker__name { font-size: 24px; font-weight: 700; color: #fff; margin: 0; }
.tn-event-speaker__title { font-size: 15px; color: rgba(255,255,255,0.65); margin: 4px 0 0; }
.tn-event-speaker__bio { font-size: 15px; color: rgba(255,255,255,0.8); line-height: 1.7; margin: 20px 0 0; }
.tn-event-speaker + .tn-event-speaker .tn-event-speaker__inner { padding-top: 0; }

/* ── Agenda ── */
.tn-event-agenda { border-bottom: 1px solid var(--tn-border); background: rgba(242,243,245,0.4); }
.tn-event-agenda__inner { padding: 72px 0; }
@media (min-width: 1024px) { .tn-event-agenda__inner { padding: 100px 0; } }
.tn-event-agenda__grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 48px; }
@media (min-width: 1024px) { .tn-event-agenda__grid { grid-template-columns: 1fr 1fr; } }
.tn-event-agenda__item {
    display: flex; flex-direction: column; gap: 8px;
    padding: 24px; border-radius: 16px; border: 1px solid var(--tn-border);
    background: rgba(252,252,252,1); box-shadow: 0 6px 20px 0 rgba(0,0,0,0.06);
    transition: border-color 0.2s;
}
.tn-event-agenda__item:hover { border-color: rgba(161,61,61,0.25); }
@media (min-width: 768px) { .tn-event-agenda__item { flex-direction: row; align-items: center; gap: 24px; } }
.tn-event-agenda__time { font-family: monospace; font-weight: 700; color: var(--tn-accent); flex-shrink: 0; width: 96px; font-size: 16px; }
.tn-event-agenda__sep { display: none; width: 1px; height: 24px; background: var(--tn-border); flex-shrink: 0; }
@media (min-width: 768px) { .tn-event-agenda__sep { display: block; } }
.tn-event-agenda__title { font-size: 19px; font-weight: 500; color: rgba(26,26,34,0.8); }

/* ── Registration button used across sections (small pill) ── */
.tn-event-btn-arrow {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════
   ARCHIVE — /events/
══════════════════════════════════════════ */
.tn-events-hero {
    position: relative; isolation: isolate; overflow: hidden;
    border-bottom: 1px solid var(--tn-border);
    min-height: 640px; display: flex; flex-direction: column;
}
/* Mobile only: see the matching comment on .tn-event-hero above. */
@media (max-width: 767px) {
    .tn-events-hero { padding-top: 135px; }
}
@media (min-width: 1024px) { .tn-events-hero { min-height: 84vh; } }
.tn-events-hero__bg { position: absolute; inset: 0; z-index: -20; background-size: cover; background-position: center; }
.tn-events-hero__wash { position: absolute; inset: 0; z-index: -10; background: linear-gradient(100deg, rgba(6,8,16,0.92) 0%, rgba(6,8,16,0.72) 45%, rgba(6,8,16,0.35) 75%, rgba(6,8,16,0.15) 100%); }
.tn-events-hero__inner { flex: 1; display: flex; align-items: center; padding: 32px 0; }
@media (min-width: 768px) {
    .tn-events-hero__inner { padding: 195px 0 48px; } /* unchanged from before */
}
.tn-events-hero__eyebrow { margin: 0 0 16px; font-size: 14px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #e58a8a; }
.tn-events-hero__title { margin: 0; max-width: 760px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; color: #fff; font-size: clamp(2.1rem, 4.5vw, 3.6rem); }
.tn-events-hero__meta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.tn-events-hero__meta-item { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.95); }
.tn-events-hero__excerpt { margin-top: 20px; max-width: 620px; font-size: 17px; font-weight: 300; line-height: 1.6; color: rgba(255,255,255,0.9); }
.tn-events-hero__cta {
    margin-top: 32px; display: inline-flex; align-items: center; gap: 12px;
    background: var(--tn-accent); color: #fff !important; padding: 12px 12px 12px 28px;
    border-radius: 100px; font-size: 15px; font-weight: 600; text-decoration: none !important;
}
.tn-events-hero__cta:hover { background: var(--tn-accent-h); }

.tn-events-list { background: var(--tn-muted); }
.tn-events-list__inner { padding: 72px 0; }
@media (min-width: 1024px) { .tn-events-list__inner { padding: 96px 0; } }
.tn-events-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .tn-events-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .tn-events-grid { grid-template-columns: 1fr 1fr 1fr; } }

.tn-event-card {
    display: flex; flex-direction: column; overflow: hidden;
    border-radius: 24px; border: 1px solid var(--tn-border); background: #fff;
    text-decoration: none !important; color: inherit;
    transition: box-shadow 0.2s;
}
.tn-event-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.tn-event-card__image { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--tn-border); }
.tn-event-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tn-event-card__badge {
    position: absolute; top: 16px; left: 16px;
    padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 700;
    background: rgba(255,255,255,0.92); color: var(--tn-fg);
}
.tn-event-card__badge--past { background: rgba(26,26,34,0.75); color: #fff; }
.tn-event-card__body { flex: 1; display: flex; flex-direction: column; padding: 24px; }
.tn-event-card__cat { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tn-accent); }
.tn-event-card__title { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--tn-fg); }
.tn-event-card__meta { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.tn-event-card__meta-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #555; }
.tn-event-card__cta { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--tn-border); font-size: 14px; font-weight: 600; color: var(--tn-accent); display: flex; align-items: center; gap: 6px; }

.tn-events-empty { text-align: center; padding: 64px; border: 1px dashed var(--tn-border); border-radius: 24px; color: #777; }

/* ── Calendar-add popup (single event) ── */
.tn-cal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(10,10,18,0.72);
    animation: tn-cal-fade-in 0.2s ease forwards;
}
@keyframes tn-cal-fade-in { from { opacity: 0; } to { opacity: 1; } }
.tn-cal-modal { position: relative; width: 100%; max-width: 420px; border-radius: 24px; background: #fff; padding: 32px; box-shadow: 0 25px 60px rgba(0,0,0,0.35); }
.tn-cal-modal__close { position: absolute; top: 20px; right: 20px; width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; cursor: pointer; color: rgba(26,26,34,0.4); font-size: 16px; }
.tn-cal-modal__close:hover { background: rgba(26,26,34,0.08); color: rgba(26,26,34,0.7); }
.tn-cal-modal__icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(161,61,61,0.1); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.tn-cal-modal h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: var(--tn-fg); }
.tn-cal-modal p { margin: 0 0 24px; font-size: 14px; color: #666; line-height: 1.5; }
.tn-cal-modal__options { display: flex; flex-direction: column; gap: 12px; }
.tn-cal-modal__option {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-radius: 16px; border: 1px solid var(--tn-border);
    font-size: 14px; font-weight: 600; color: var(--tn-fg); text-decoration: none !important;
    cursor: pointer; background: #fff; transition: border-color 0.2s, background 0.2s;
}
.tn-cal-modal__option:hover { border-color: rgba(26,26,34,0.3); background: rgba(26,26,34,0.02); }
.tn-cal-modal__option span { display: flex; align-items: center; gap: 12px; }
