/* -----------------------------------------
   SECURITY GATE
------------------------------------------ */

#security-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(180deg, #d8c99a 0%, #F4E9D2 60%, #e8d8a0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.5s ease;
}

#security-gate.gate-fade { opacity: 0; }

#gate-card {
    background: #fff;
    border: 2px solid #1E4D7B;
    box-shadow: 0 0 0 1px rgba(30, 77, 123, 0.2), 0 8px 40px rgba(0, 0, 0, 0.25);
    padding: 40px 48px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
}

#gate-card::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(217, 154, 43, 0.35);
    pointer-events: none;
}

#gate-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #1E4D7B;
    margin-bottom: 6px;
}

#gate-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #D99A2B;
    margin-bottom: 14px;
}

.gate-divider {
    font-size: 0.65rem;
    color: #D99A2B;
    letter-spacing: 0.2em;
    margin: 12px 0;
    user-select: none;
}

#gate-prompt {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #2A2A2A;
    margin-bottom: 14px;
}

#gate-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    letter-spacing: 0.25em;
    text-align: center;
    padding: 9px 14px;
    background: #F4E9D2;
    border: 1px solid #1E4D7B;
    color: #2A2A2A;
    outline: none;
    margin-bottom: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#gate-input:focus {
    border-color: #D99A2B;
    box-shadow: 0 0 0 2px rgba(217, 154, 43, 0.25);
}

#gate-submit {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 10px 36px;
    background: #1E4D7B;
    color: #fff;
    border: 1px solid #D99A2B;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin-bottom: 12px;
}

#gate-submit:hover {
    background: #163d62;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

#gate-error {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #8b1a1a;
    min-height: 1.2em;
    margin-top: 4px;
}

/* -----------------------------------------
   GLOBAL STYLES
------------------------------------------ */

body {
    margin: 0;
    background: #F4E9D2; /* parchment */
    font-family: 'Inter', sans-serif;
    color: #2A2A2A;
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3, h4 {
    font-family: 'Cinzel', serif;
    margin-top: 0;
}

/* -----------------------------------------
   HEADER + NAVIGATION
------------------------------------------ */

header {
    background: #1E4D7B; /* deep Mediterranean blue */
    color: white;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Cinzel', serif;
}

nav a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
}

nav a:hover {
    text-decoration: underline;
}

/* -----------------------------------------
   HERO SECTION
------------------------------------------ */

.hero {
    background: linear-gradient(
        rgba(0,0,0,0.45),
        rgba(0,0,0,0.45)
    ),
    url('../assets/images/mediterranean-map.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 80px 20px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    margin: 0;
}

.hero button {
    margin-top: 20px;
    padding: 12px 28px;
    background: #C9A44A; /* antique gold */
    border: none;
    color: #2A2A2A;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.hero button:hover {
    background: #d8b86a;
}

/* -----------------------------------------
   SECTION WRAPPER
------------------------------------------ */

section {
    padding: 40px 8%;
}

.section-title {
    font-size: 28px;
    margin-bottom: 20px;
}

/* -----------------------------------------
   MAP + SIDEBAR
------------------------------------------ */

.map-wrapper {
    display: flex;
    gap: 20px;
    min-height: 420px;
}

#map {
    flex: 2;
    height: 420px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.map-sidebar {
    flex: 1;
    background: white;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    overflow-y: auto;
    max-height: 420px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#journeysHeading {
    cursor: pointer;
}

#journeysHeading:hover {
    color: #D99A2B;
}

.play-btn {
    padding: 5px 12px;
    background: #1E4D7B;
    color: #fff;
    border: 1px solid #D99A2B;
    border-radius: 5px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.play-btn:hover {
    background: #163d62;
}

.play-btn.playing {
    background: #7a1a1a;
    border-color: #c0392b;
}

.play-btn.playing:hover {
    background: #5e1313;
}

select {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #aaa;
    font-size: 14px;
}

/* -----------------------------------------
   STOP LIST (journey itinerary)
------------------------------------------ */

.stop-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.stop-list--three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.stop-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s;
}

.stop-list-item:hover {
    background: #f0e8d0;
}

.stop-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    font-weight: 700;
}

.stop-city {
    font-size: 13px;
    color: #2A2A2A;
}

/* -----------------------------------------
   DETAILS PANEL
------------------------------------------ */

.details {
    margin-top: 10px;
    padding: 12px;
    background: #FFF7E6;
    border-radius: 8px;
    border: 1px solid #C9A44A;
    font-size: 14px;
}

.label {
    font-weight: 600;
}

.reference-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
}

.reference-links a {
    color: #1E4D7B;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid rgba(217, 154, 43, 0.4);
    padding-bottom: 3px;
}

.reference-links a:hover {
    color: #D99A2B;
    border-bottom-color: #D99A2B;
}

/* -----------------------------------------
   TIMELINE
------------------------------------------ */

.timeline-container {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    overflow-x: auto;
    white-space: nowrap;
}

.timeline-track {
    display: inline-flex;
    gap: 16px;
}

.timeline-card {
    display: inline-block;
    min-width: 220px;
    background: #F4E9D2;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #C9A44A;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.timeline-card:hover {
    transform: scale(1.03);
}

.timeline-card h4 {
    margin: 0 0 4px 0;
    font-family: 'Cinzel', serif;
    font-size: 16px;
}

.timeline-card small {
    font-size: 12px;
    color: #555;
}

/* -----------------------------------------
   LETTERS SECTION
------------------------------------------ */

.letters-shelf {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.scrolls {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.scroll {
    min-width: 150px;
    background: #F4E9D2;
    border: 2px solid #C9A44A;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.15s ease;
}

.scroll:hover {
    transform: scale(1.05);
}

.letter-details {
    margin-top: 12px;
    font-size: 14px;
    background: #FFF7E6;
    border-radius: 8px;
    border: 1px solid #C9A44A;
    padding: 10px;
}

/* -----------------------------------------
   PEOPLE SECTION
------------------------------------------ */

.people-box {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.people-web {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.person {
    background: #1E4D7B;
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.person:hover {
    background: #2f6aa8;
}

.person-details {
    margin-top: 12px;
    font-size: 14px;
    background: #FFF7E6;
    border-radius: 8px;
    border: 1px solid #C9A44A;
    padding: 10px;
}

/* -----------------------------------------
   MODAL (for timeline, letters, people)
------------------------------------------ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-box {
    background: #FFF7E6;
    width: 480px;
    max-width: 90%;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #C9A44A;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    animation: fadeIn 0.25s ease;
}

.modal-box h3 {
    margin-top: 0;
    font-family: 'Cinzel', serif;
}

.modal-close {
    float: right;
    cursor: pointer;
    font-size: 20px;
    color: #444;
}

.modal-close:hover {
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Journey stop numbered markers ─────────────────────── */
.journey-stop-icon {
    background: none !important;
    border: none !important;
}

.stop-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    user-select: none;
}

.stop-dot:hover {
    transform: scale(1.25);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}
