/* ============================================================
   MISA Event Hub — Layout & Component Styles
   Principle: Surgical changes only. No drive-by refactoring.
   ============================================================ */

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--misa-font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--misa-text-primary);
    background: var(--misa-bg-surface);
}

h1, h2, h3, h4, h5, h6 { color: var(--misa-text-dark); }
a { text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Container ─── */
.container {
    max-width: var(--misa-container);
    margin: 0 auto;
    padding: 0 var(--misa-gap);
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.site-header {
    background: var(--misa-bg-surface);
    border-bottom: 1px solid #eef2f6;
    position: sticky;
    top: 0;
    z-index: 200;
}
.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: var(--misa-gap);
}
.header-left {
    display: flex;
    align-items: center;
    gap: var(--misa-gap);
    flex: 1;
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--misa-text-dark);
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
    flex-shrink: 0;
}
.header-logo img { height: 34px; width: auto; }
.header-site-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--misa-text-secondary);
    border-left: 1px solid #d1d5db;
    padding-left: 12px;
}

/* Search */
.header-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}
.header-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--misa-text-muted);
}
.search-input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 40px;
    border: 1.5px solid #d1d5db;
    border-radius: var(--misa-radius-md);
    font-family: var(--misa-font);
    font-size: 14px;
    color: var(--misa-text-primary);
    background: var(--misa-bg-subtle);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.search-input::placeholder { color: var(--misa-text-muted); }
.search-input:focus {
    border-color: var(--misa-brand-link);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(38, 98, 255, 0.12);
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    border-radius: var(--misa-radius-md);
    font-family: var(--misa-font);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: #000;
    color: #fff;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 400;
}
.btn-primary:hover { background: #222; }

.btn-secondary {
    background: #fff;
    color: var(--misa-brand-link);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1.6px solid var(--misa-brand-link);
}
.btn-secondary:hover { background: var(--misa-bg-light-blue); }

.btn-blue {
    background: var(--misa-brand-link);
    color: #fff;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    border-radius: var(--misa-radius-md);
}
.btn-blue:hover { background: var(--misa-brand-hover); }

/* ═══════════════════════════════════════════
   HOME HERO — MISA Blue Gradient (clean, no animation)
   Token spec: --misa-blue-deep: #0a1444, --misa-blue-dark: #0d1b5e, --misa-blue: #0033A0
   ═══════════════════════════════════════════ */
.hero-home {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1444 0%, #0d1b5e 50%, #0033A0 100%);
    padding: 48px 24px 80px 24px;
    text-align: center;
    color: #fff;
}

/* Subtle grid overlay matching image.png reference */
.hero-home::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Faint radial glow center-right */
.hero-home::after {
    content: '';
    position: absolute;
    top: -20%; right: 0;
    width: 60%; height: 200%;
    background: radial-gradient(ellipse at center, rgba(59, 125, 255, 0.18) 0%, transparent 65%);
    pointer-events: none;
}

.hero-home .container { position: relative; z-index: 2; }

.hero-home h1 {
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 8px;
}
.hero-home p {
    font-size: 15px;
    color: rgba(255,255,255,0.70);
    max-width: 460px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════
   SEARCH DROPDOWN
   ═══════════════════════════════════════════ */
.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--misa-radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 500;
    overflow: hidden;
    display: none;
}
.search-dropdown.is-open { display: block; }
.search-dropdown-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f4f8;
    transition: background 0.1s;
    text-decoration: none;
    color: inherit;
}
.search-dropdown-item:last-child { border-bottom: none; }
.search-dropdown-item:hover { background: #f0f7ff; }
.search-dropdown-item strong {
    font-size: 14px;
    font-weight: 600;
    color: #0d1b5e;
}
.search-dropdown-item span {
    font-size: 12px;
    color: var(--misa-text-muted);
}
.search-no-results {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--misa-text-muted);
    text-align: center;
}

/* ═══════════════════════════════════════════
   HOME — EVENTS SECTION
   ═══════════════════════════════════════════ */
.events-section {
    padding: 60px 0;
}
.events-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--misa-text-dark);
    margin-bottom: 28px;
}

/* Event Grid 2 Columns */
.event-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--misa-gap);
}
@media (max-width: 768px) { .event-grid { grid-template-columns: 1fr; } }

/* Event Card with image */
.event-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--misa-radius-md);
    color: var(--misa-text-primary);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.event-card:hover {
    box-shadow: var(--misa-shadow-md);
    transform: translateY(-3px);
}
.event-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #1e3a8a, #2662ff);
}
.event-card-body {
    padding: 18px 20px 20px;
}
.event-card-dept {
    font-size: 11px;
    font-weight: 700;
    color: var(--misa-brand-link);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}
.event-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--misa-text-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}
.event-card-meta {
    font-size: 13px;
    color: var(--misa-text-muted);
    display: flex;
    gap: 16px;
}

/* ═══════════════════════════════════════════
   LANDING PAGE — TOP BANNER SECTION
   ═══════════════════════════════════════════ */
.event-top-banner {
    width: 100%;
    max-height: 420px;
    overflow: hidden;
    background: #1a2d9a;
    line-height: 0;
}
.event-top-banner img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
    display: block;
}
@media (max-width: 768px) {
    .event-top-banner { max-height: 220px; }
    .event-top-banner img { max-height: 220px; }
}

/* ═══════════════════════════════════════════
   EVENT LANDING — HERO (Split Layout)
   ═══════════════════════════════════════════ */
.hero-event {
    background: linear-gradient(100deg, #1a2d9a 0%, #2662ff 100%);
    padding: 60px 0 80px;
}
.hero-event-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 48px;
    align-items: start;
}
@media (max-width: 900px) {
    .hero-event-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.hero-event-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.hero-event h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    margin-bottom: 20px;
}
.hero-event-body p {
    font-size: 14px;
    color: rgba(255,255,255,0.80);
    margin-bottom: 8px;
    line-height: 1.6;
}
.hero-event-body strong { color: rgba(255,255,255,0.95); }

/* Right: Floating Info Card */
.hero-event-card {
    background: #fff;
    border-radius: var(--misa-radius-md);
    padding: 28px;
    box-shadow: var(--misa-shadow-lg);
    position: sticky;
    top: 80px;
}
.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--misa-text-secondary);
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.info-row:last-of-type { border-bottom: none; }
.info-row svg { flex-shrink: 0; color: var(--misa-brand-link); }
.card-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--misa-text-dark);
    text-align: center;
    padding: 16px 0 12px;
}
.card-price-sub { font-size: 12px; font-weight: 400; color: var(--misa-text-muted); }

/* ═══════════════════════════════════════════
   SECTION WRAPPERS
   ═══════════════════════════════════════════ */
.section { padding: 60px 0; }
.section-subtle { background: var(--misa-bg-subtle); }
.section-light-mint { background: var(--misa-bg-light-mint); }

.section-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--misa-text-dark);
    margin-bottom: 24px;
}

/* ═══════════════════════════════════════════
   AI AGENTS TABLE
   ═══════════════════════════════════════════ */
.misa-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--misa-radius-sm);
    overflow: hidden;
    box-shadow: var(--misa-shadow-sm);
    border: 1px solid #e2e8f0;
}
.misa-table thead { background: var(--misa-bg-subtle); }
.misa-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--misa-text-dark);
    border-bottom: 1px solid #e2e8f0;
}
.misa-table td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--misa-text-primary);
    border-bottom: 1px solid #f0f4f8;
    vertical-align: top;
}
.misa-table tbody tr:last-child td { border-bottom: none; }
.misa-table tbody tr:hover td { background: var(--misa-bg-subtle); }
.misa-table-link {
    color: var(--misa-brand-link);
    font-weight: 500;
    font-size: 13px;
}
.misa-table-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   OTHER EVENTS (3-col grid on landing page)
   ═══════════════════════════════════════════ */
.other-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--misa-gap);
}
@media (max-width: 900px) { .other-events-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .other-events-grid { grid-template-columns: 1fr; } }

.other-event-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--misa-radius-md);
    overflow: hidden;
    color: var(--misa-text-primary);
    transition: box-shadow 0.2s, transform 0.2s;
}
.other-event-card:hover {
    box-shadow: var(--misa-shadow-md);
    transform: translateY(-2px);
}
.other-event-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #1e3a8a, #2662ff);
}
.other-event-card-body {
    padding: 14px 16px 16px;
}
.other-event-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--misa-brand-link);
    margin-bottom: 6px;
    line-height: 1.4;
}
.other-event-card p { font-size: 12px; color: var(--misa-text-muted); }

/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 32px 0;
}
.page-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--misa-radius-sm);
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--misa-text-primary);
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.page-btn:hover { background: var(--misa-bg-light-blue); color: var(--misa-brand-link); }
.page-btn.active { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 20px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--misa-text-muted);
}
@media (max-width: 640px) {
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ═══════════════════════════════════════════
   FAB — Floating Support Button
   ═══════════════════════════════════════════ */
.fab-support {
    position: fixed;
    bottom: 80px; right: 36px;
    background: linear-gradient(135deg, #60a5fa, #2662ff);
    color: #fff;
    padding: 12px 22px;
    border-radius: var(--misa-radius-pill);
    font-weight: 600; font-size: 14px;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 16px rgba(38,98,255,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 300;
}
.fab-support:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(38,98,255,0.45);
    color: #fff;
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE (comprehensive)
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .container { padding: 0 16px; }

    /* Header mobile */
    .header-inner { height: auto; flex-wrap: wrap; padding: 12px 0; gap: 12px; }
    .header-left { flex-wrap: wrap; gap: 12px; }
    .header-search { max-width: 100%; flex: 1 1 200px; }

    /* Home hero mobile */
    .hero-home { padding: 44px 0 40px; }
    .hero-home h1 { font-size: 28px; }
    .hero-home p { font-size: 14px; }

    /* Event hero mobile */
    .hero-event { padding: 40px 0 48px; }
    .hero-event h1 { font-size: 22px; }
    .hero-event-card { position: static; }

    /* Section headings */
    .events-section { padding: 40px 0; }
    .section { padding: 40px 0; }

    /* FAB mobile */
    .fab-support { bottom: 20px; right: 20px; padding: 10px 16px; font-size: 13px; }

    /* Misa table mobile: horizontal scroll */
    .misa-table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
    .hero-home h1 { font-size: 24px; }
    .hero-event h1 { font-size: 20px; }
    .event-card-img { height: 130px; }
}
