/* Dark theme timeline styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    margin: 0;
    padding: 30px 20px;
    min-height: 100vh;
}

h1 {
    text-align: center;
    color: #58a6ff;
    margin-bottom: 50px;
    font-size: 2.2em;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
}
 
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
	background-color: antiquewhite;
	border-radius:25px;
}

/* Vertical line on the left */
.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, #58a6ff, #3fb950, #f85149, #a371f7, #d29922);
    top: 0;
    bottom: 0;
    left: 18px;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(88, 166, 255, 0.4);
}

/* Period / Chapter block */
.period {
    margin-bottom: 50px;
    position: relative;
    cursor: pointer;
}

/* Hide events by default - accordion effect */
.events-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-left: 30px;
}

/* Show events on hover with smooth accordion */
.period:hover .events-container {
    max-height: 2500px; /* Sufficiently large to fit content */
    transition: max-height 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.period-header {
    background: color-mix(in srgb, var(--period-color, #58a6ff) 38%, #161b22);
    border: 2px solid #30363d;
    border-left: 6px solid var(--period-color, #58a6ff);
    border-radius: 8px;
    padding: 14px 22px;
    margin-bottom: 10px;
    margin-left: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.period:hover .period-header {
    transform: scale(1.02) translateX(5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--period-color, #58a6ff);
}

.period-title {
    margin: 0 0 4px 0;
    font-size: 1.45em;
    color: #f0f6fc;
    font-weight: 600;
}

.period-years {
    color: #CCCCCC;
    font-size: 0.95em;
    font-weight: 500;
}

/* Events */
.event {
    position: relative;
    margin-bottom: 22px;
    padding-left: 50px;
}

/* Dot on the timeline */
.event::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 18px;
    width: 18px;
    height: 18px;
    background: #0d1117;
    border: 4px solid var(--period-color, #58a6ff);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}
/* No events message */
.no-events {
    padding: 20px 30px;
    font-style: italic;
    color: #666;
    text-align: center;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #888;
}

/* Connector line */
.event::after {
    content: '';
    position: absolute;
    left: 28px;
    top: 26px;
    width: 22px;
    height: 2px;
    background: var(--period-color, #58a6ff);
    opacity: 0.6;
}

.content {
    background: color-mix(in srgb, var(--period-color, #58a6ff) 75%, #ddd);
    border: 1px solid #30363d;
    border-left: 4px solid var(--period-color, #58a6ff);
    border-radius: 8px;
    padding: 16px 22px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: default;
    position: relative;
}

.content:hover {
    transform: translateX(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    border-color: var(--period-color, #58a6ff);
}

.date {
    font-size: 1em;
    color: black;
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.title {
    margin: 0 0 10px 0;
    color: #f0f6fc;
    font-size: 1.15em;
    font-weight: 600;
}

.description {
    margin: 0;
    line-height: 1.55;
    color: black;
    font-size: 0.97em;
    position: relative;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #f8f9fa;
    max-width: 820px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 45px 50px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    position: relative;
    color: #212529;
    line-height: 1.75;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 25px;
    font-size: 38px;
    cursor: pointer;
    color: #6c757d;
    font-weight: bold;
}

.modal-close:hover {
    color: #212529;
}

.modal-content h2 {
    margin: 0 0 30px 0;
    color: #1f3a6e;
    font-size: 2.1em;
    font-weight: 600;
}

.modal-content p, .modal-text {
    font-size: 1.25em;
    line-height: 1.85;
    color: #212529;
}

/* Read More Link */
.read-more {
    color: #0d6efd;
    font-weight: bold;
    cursor: pointer;
    font-size: 18px;
    text-decoration: none;
    margin-left: 8px;
}

.read-more:hover {
    color: #0b5ed7;
}

/* Banner Header */
.banner {
    position: relative;
    height: 15vh;
    min-height: 350px;
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.75)),
                url('https://source.unsplash.com/random/2000x1200/?ocean,adventure,sailing') center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.4));
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.banner .title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3.2rem, 8vw, 5.5rem);
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.05;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    letter-spacing: -2px;
}

.banner .subtitle {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.35;
}
.banner .subsubtitle {
    font-family: 'Inter', system-ui, sans-serif;
    font-size:18px;
    font-weight: 800;
    margin: 0;
    opacity: 0.95;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.35;
	padding-top: 10px;
	color: red;
}

.banner-content {
    animation: fadeInUp 1.2s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .timeline { padding-left: 20px; }
    .timeline::before { left: 10px; }
    .event { padding-left: 40px; }
    .event::before { left: 2px; }
    .event::after { left: 20px; width: 18px; }
    .period-header, .events-container { margin-left: 20px; }
    h1 { font-size: 1.6em; }
}