*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ==============================
   Design Tokens
============================== */

:root {
    --bg-main: #1f2227;

    --glass-bg: rgba(255,255,255,0.08);
    --glass-strong: rgba(255,255,255,0.14);
    --glass-border: rgba(255,255,255,0.22);

    --text-main: #f5f7fa;
    --text-soft: rgba(245,247,250,0.85);
    --text-muted: rgba(245,247,250,0.65);

    --accent: #7c5cff;
    --accent-light: #a28bff;
    --accent-glow: rgba(124,92,255,0.35);

    --shadow-lg: 0 25px 60px rgba(0,0,0,0.35);
    --shadow-md: 0 16px 35px rgba(0,0,0,0.25);
    --shadow-sm: 0 8px 20px rgba(0,0,0,0.18);

    --blur-lg: blur(26px);
    --blur-md: blur(18px);
    --blur-sm: blur(12px);
}

/* ==============================
   Base
============================== */

.admin-link {
    font-size: 0.65rem;
    margin-left: 6px;
    text-decoration: none;
    color: rgba(255,255,255,0.18);
    opacity: 0.25;
    transition: opacity 0.2s ease;
}

.admin-link:hover {
    opacity: 0.7;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Open Sans", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(124,92,255,0.25) 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(124,92,255,0.18) 0%, transparent 35%),
        radial-gradient(circle at 50% 100%, rgba(124,92,255,0.15) 0%, transparent 40%),
        linear-gradient(180deg, #2c3138 0%, #1f2227 60%, #191c21 100%);
    color: var(--text-main);
    line-height: 1.5;
    min-width: 320px;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.page-wrap {
    width: min(1200px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 24px;
}

/* ==============================
   Glass Base Components
============================== */

.hero-card,
.directory-section,
.box,
.footer {
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.12),
        rgba(255,255,255,0.06)
    );
    backdrop-filter: var(--blur-lg);
    -webkit-backdrop-filter: var(--blur-lg);
    border: 1px solid var(--glass-border);
    box-shadow:
        var(--shadow-lg),
        inset 0 1px 0 rgba(255,255,255,0.18);
}

/* ==============================
   Hero
============================== */

.hero-card {
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 24px;
}

.hero-top {
    text-align: center;
    padding: 22px 20px 18px;
    background: rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.hero-logo {
    max-width: 300px;
    width: 100%;
    height: auto;
}

.hero-banner {
    position: relative;
    min-height: 320px;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.55)),
        url('/images/people-2557579_1920.jpg') no-repeat center center;
    background-size: cover;
}

.hero-overlay {
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 32px;
}

.hero-content {
    max-width: 660px;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.20),
        rgba(255,255,255,0.08)
    );
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 22px;
    padding: 24px 26px;
    box-shadow:
        0 16px 32px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.25);
}

.hero-content h1 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    color: #fff;
}

.hero-content p {
    margin: 0;
    color: var(--text-soft);
}

/* ==============================
   Layout
============================== */

.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==============================
   Section
============================== */

.directory-section {
    border-radius: 24px;
    padding: 24px;
}

.section-head {
    margin-bottom: 22px;
}

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #fff;
}

.section-head h2::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    margin-top: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    box-shadow: 0 0 20px var(--accent-glow);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==============================
   Directory Toolbar
============================== */

.directory-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.directory-search-wrap {
    flex: 1;
    min-width: 0;
}

.directory-search {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    background: rgba(255,255,255,0.07);
    color: #fff;
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.directory-search::placeholder {
    color: rgba(255,255,255,0.55);
}

.directory-search:focus {
    border-color: rgba(124, 92, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
    background: rgba(255,255,255,0.10);
}

.directory-meta {
    flex: 0 0 auto;
    color: rgba(255,255,255,0.84);
    font-weight: 600;
    white-space: nowrap;
}

.directory-empty {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.82);
}

/* ==============================
   Directory Grid
============================== */

.station-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

/* ==============================
   Directory Card
============================== */

.directory-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.directory-card:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 92, 255, 0.34);
    background: rgba(255,255,255,0.08);
    box-shadow:
        0 16px 30px rgba(0,0,0,0.25),
        0 0 18px rgba(124,92,255,0.12);
}

.directory-card-logo {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255,255,255,0.95);
    overflow: hidden;
    padding: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.25),
        0 8px 20px rgba(0,0,0,0.14);
}

.directory-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.directory-card-content {
    min-width: 0;
}

.directory-card-content h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    line-height: 1.25;
    color: #fff;
}

.directory-card-content p {
    margin: 0;
    color: rgba(255,255,255,0.66);
    font-size: 0.92rem;
    line-height: 1.3;
    word-break: break-word;
}

.directory-card-meta  {
    font-size: 0.70rem;
}

.directory-card[hidden] {
    display: none !important;
}

.directory-empty[hidden] {
    display: none !important;
}

.directory-categories {
  margin-top: 16px;
}

.directory-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.directory-tab {
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.directory-tab.active {
  background: #7c5cff;
}

.directory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.directory-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.2s;
}

.directory-chip:hover {
  background: rgba(255,255,255,0.12);
}

.directory-chip.active {
  background: #7c5cff;
}

/* ==============================
   Info Boxes
============================== */

.box-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.box {
    padding: 24px;
    border-radius: 24px;
}

.box h3 {
    margin: 0 0 14px;
}

.box p {
    margin: 0 0 20px;
    color: var(--text-soft);
}

.box-button {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    color: #fff;
    border-radius: 12px;
    padding: 11px 18px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(124,92,255,0.35);
    transition: all .18s ease;
}

.box-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(124,92,255,0.45);
}

.box-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.box-actions .box-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    text-align: center;
}

.box-button-secondary {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: none;
}

.box-button-secondary:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
    box-shadow: none;
}

/* ==============================
   Footer
============================== */

.footer {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 20px;
    text-align: center;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ==============================
   Utility
============================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==============================
   Responsive
============================== */

@media (max-width: 900px) {
    .box-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .directory-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .directory-meta {
        white-space: normal;
    }

    .station-directory-grid {
        grid-template-columns: 1fr;
    }

    .hero-overlay {
        padding: 22px;
    }

    .hero-content {
        padding: 20px 22px;
    }
}

@media (max-width: 640px) {
    .box-actions {
        grid-template-columns: 1fr;
    }

    .page-wrap {
        width: min(100%, calc(100% - 16px));
        padding: 14px 0 20px;
    }

    .directory-section,
    .box {
        padding: 18px;
        border-radius: 20px;
    }

    .hero-card {
        border-radius: 20px;
    }

    .hero-top {
        padding: 18px 14px 14px;
    }

    .hero-banner,
    .hero-overlay {
        min-height: 250px;
    }

    .hero-overlay {
        padding: 14px;
    }

    .hero-content {
        padding: 16px;
        border-radius: 16px;
    }

    .directory-card {
        padding: 12px;
        min-height: 84px;
    }

    .directory-card-logo {
        width: 56px;
        height: 56px;
        flex: 0 0 56px;
    }
}

@media (max-width: 420px) {
    .directory-section,
    .box,
    .footer {
        border-radius: 18px;
    }

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

    .hero-content p {
        font-size: 0.95rem;
    }

    .section-head h2 {
        font-size: 1.4rem;
    }

    .directory-search {
        min-height: 46px;
        padding: 11px 12px;
    }
}

@media (max-width: 380px) {
    .directory-card {
        gap: 10px;
    }

    .directory-card-content h3 {
        font-size: 0.96rem;
    }

    .directory-card-content p {
        font-size: 0.88rem;
    }
}