/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: url('assets/images/drum-pattern.png') no-repeat center center fixed;
    background-size: 100% auto;
}


/* Header Container */
.site-header {
    background: linear-gradient(90deg, #DA792B, #FFA45B);
    /* Warm orange to soft orange */
    padding: 0 40px;
    height: 100px;
    /* Adjust height as needed */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* Concave arc curve effect */
    border-bottom-left-radius: 50% 20px;
    border-bottom-right-radius: 50% 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    /* Ensure header stays on top */
}

/* ... existing code ... */

/* Mission Section */
.mission-section {
    position: relative;
    padding: 20px 20px 60px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    /* Ensure pattern doesn't spill */
}

/* .mission-section::before removed */

.mission-title-wrapper {
    background: #FFA45B;
    padding: 12px 40px;
    border-radius: 8px 8px 0 0;
    position: relative;
    z-index: 2;
    margin-bottom: -10px;
    /* Slight overlap */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* ... existing code ... */

.functional-container {
    background-color: #FFF8E6;
    /* Light cream color */
    border: 2px solid #003366;
    border-radius: 20px;
    width: 100%;
    max-width: 1200px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* ... existing code ... */

.func-btn {
    background: linear-gradient(180deg, #ffa45b, #FF8C00);
    /* Adjusted gradient */
    border: none;
    border-radius: 10px;
    padding: 20px 10px;
    cursor: pointer;
    text-align: center;
    color: #003366;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.func-btn:hover,
.func-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(180deg, #ff9033, #e67e00);
    /* Slightly darker on hover */
}

/* Left Side: Logo & Slogan */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container {
    background: white;
    border-radius: 50%;
    padding: 5px;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.slogan {
    font-family: 'Alegreya SC', serif;
    font-weight: 700;
    text-transform: uppercase;
    color: #003366;
    /* Dark blue */
    line-height: 1.2;
    font-size: 20px;
    /* Slightly larger for the new font */
}

/* ... existing code ... */

.mission-title {
    color: #003366;
    margin: 0;
    font-family: 'Alegreya SC', serif;
    font-size: 22px;
    /* Slightly larger */
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Right Side: Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #003366;
    /* Dark blue */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    transition: opacity 0.3s;
}

.main-nav a:hover {
    opacity: 0.8;
}

/* Highlighted "Trang Chủ" */
.main-nav li.active a {
    background-color: #003366;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    /* Rectangular button */
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header {
        height: auto;
        flex-direction: column;
        padding: 20px;
        border-radius: 0 0 20px 20px;
    }

    .header-left {
        flex-direction: column;
        margin-bottom: 20px;
        text-align: center;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }
}

/* Hero Section */
/* Hero Section */
.hero-section {
    width: 100%;
    position: relative;
    margin-top: -20px;
    /* Pull up to hide white corners of header */
    overflow: hidden;
}

.hero-bg-img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-content {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.btn-discover {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    color: black;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-discover:hover {
    transform: translateY(-2px);
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Mission Section */
.mission-section {
    position: relative;
    padding: 20px 20px 60px;
    background: linear-gradient(to bottom, #FFC075, #ffffff00 150px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mission-title-wrapper {
    background: #FFA45B;
    padding: 12px 40px;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    margin-bottom: -10px;
    /* Slight overlap */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mission-title {
    color: #003366;
    margin: 0;
    font-size: 18px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.mission-box {
    background-size: cover;
    max-width: 900px;
    padding: 50px 40px 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 2px solid #003366;
    /* Adding the requested border */
    z-index: 1;
}

.mission-box p {
    color: #333;
    line-height: 1.8;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    text-align: justify;
    text-indent: 20px;
    /* Indent first line usually looks good for paragraphs like this */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        height: auto;
    }

    .mission-box {
        padding: 40px 20px 30px;
        margin: 0 10px;
    }

    .mission-box p {
        text-align: left;
    }
}

/* Functional Content Section */
.functional-section {
    position: relative;
    padding: 0 20px 60px;
    background: transparent;
    /* Was white */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.functional-container {
    background-color: #FFF8E6;
    /* Light cream color */
    border: 2px solid #003366;
    border-radius: 20px;
    width: 100%;
    max-width: 1200px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.functional-layout {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 30px;
    align-items: start;
}

/* Sidebar Buttons */
.functional-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.func-btn {
    background: linear-gradient(180deg, #FFD699, #FFB84D);
    border: none;
    border-radius: 10px;
    padding: 20px 10px;
    cursor: pointer;
    text-align: center;
    color: #003366;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.func-btn:hover,
.func-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(180deg, #FFC075, #FF8C00);
}

.func-btn i {
    font-size: 40px;
    margin-bottom: 5px;
}

.func-btn span {
    font-family: 'Alegreya SC', serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

/* Preview Area */
.functional-preview {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
}

.preview-placeholder img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Description Area */
.functional-description {
    text-align: left;
}

.func-desc-title {
    font-family: 'Alegreya SC', serif;
    color: #003366;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.functional-description p {
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
    font-style: italic;
    text-align: justify;
}

/* Responsive */
@media (max-width: 900px) {
    .functional-layout {
        grid-template-columns: 1fr;
    }

    .functional-sidebar {
        flex-direction: row;
        justify-content: space-around;
    }

    .func-btn {
        flex: 1;
        padding: 10px;
    }

    .func-btn i {
        font-size: 24px;
    }
}

/* More About Project Section */
.more-section {
    position: relative;
    padding: 0 20px 60px;
    background: transparent;
    /* Was white */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.more-container {
    background-color: #FFF8E6;
    /* Light cream */
    border-radius: 30px;
    /* More rounded as per image */
    width: 100%;
    max-width: 1200px;
    padding: 30px 50px 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.more-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.gallery-item {
    background-color: #ffa45b;
    /* The orange color */
    aspect-ratio: 16 / 10;
    /* Rectangular shape */
    border-radius: 4px;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Grid */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .more-container {
        padding: 30px 20px 30px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer Section */
.site-footer {
    background: linear-gradient(90deg, #DA792B, #FFA45B);
    /* Matching header */
    padding: 40px 20px 20px;
    margin-top: 50px;
    position: relative;
    /* Convex arc curve effect (inverted header) */
    border-top-left-radius: 50% 20px;
    border-top-right-radius: 50% 20px;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.footer-content {
    text-align: center;
    color: #003366;
    font-family: 'Alegreya SC', serif;
    font-weight: 700;
    font-size: 16px;
}

/* --------------------------
   Local History Timeline Page 
   -------------------------- */

.timeline-page-title {
    text-align: center;
    margin: 40px 0;
    color: #003366;
}

.timeline-page-title h1 {
    font-family: 'Alegreya SC', serif;
    font-size: 32px;
    margin-bottom: 5px;
    font-weight: 900;
    background-color: #ffb366;
    /* Light orange highlight background for title */
    display: inline-block;
    padding: 10px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.timeline-page-title h2 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #003366;
    margin-top: 10px;
    text-transform: uppercase;
    background-color: #dbeaff;
    /* Light blue subtitle bg */
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
}

/* Timeline Container */
.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding: 20px;
}

/* Vertical Line */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 150px;
    /* Offset to allow room for dates on the left */
    width: 2px;
    background: #ffb366;
    margin-left: -1px;
    z-index: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 180px;
    /* Space for line and badge */
    display: flex;
    flex-direction: column;
}

.timeline-badge {
    background: #ffa45b;
    color: #8B4500;
    /* Darker orange text */
    font-family: 'Alegreya SC', serif;
    font-weight: 800;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
    text-align: center;
    white-space: nowrap;

    /* Position relative to the item to handle varying content heights*/
    position: absolute;
    left: 70px;
    /* To the left of the line */
    top: 0px;
    width: 140px;
    /* Fixed width for alignment? Or let it expand? */
    /* Let's try centering it on the space left of line */
    /* If line is at 150px. Center of 0-150 is 75px. */
    left: 10px;
    width: 130px;
    text-align: right;
    padding-right: 20px;
    /* Pad to be close to line */
    background: transparent;
    /* Text only on left? No, user image has orange pill. */

    /* Correction based on user image:
       The pill is actually ON the content side, ABOVE the box? 
       Or is it a "Snake" timeline?
       
       Looking at image:
       Left side: Date Badge (Orange Pill 1698-1698)
       Center: Vertical Orange Line with Dot
       Right Side: Title + Content Box
       
       Wait, let me look closer at the image `uploaded_image_1767886629118.png`.
       Top Left: Badge "1698-1698"
       Center: Line, Dot
       Top Right: "THỜI TIỀN SỬ..." title + Box.
       
       Actually, the badge "1698-1698" is on the LEFT of the line.
       "TK I-VII" is on the LEFT.
       All badges are on the LEFT.
       All Content is on the RIGHT.
    */
    background: #ffa45b;
    width: auto;
    left: auto;
    right: calc(100% - 130px);
    /* 150px line - 20px gap */
    top: 0;
}

/* Redefine for strict Left-Right layout based on analysis */
.timeline-badge {
    position: absolute;
    right: calc(100% - 135px);
    /* Position to the left of the line (150px) */
    top: 0;
    background: #ffa45b;
    color: #fff;
    /* White text looks better on orange, or dark? Image uses Dark Red/Brown on Orange. */
    color: #8B0000;
    font-family: 'Alegreya SC', serif;
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
    white-space: nowrap;
    text-align: center;
}

/* The Dot on the Line */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 144px;
    /* Center on the 150px line */
    top: 8px;
    /* Align with badge/title top */
    width: 14px;
    height: 14px;
    background: #ffa45b;
    border: 3px solid #FFF8E6;
    /* Light ring */
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 2px #ffa45b;
}

/* Timeline Content */
/* .timeline-content { } Wrapper if needed later */

.timeline-title {
    font-family: 'Alegreya SC', serif;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-top: 5px;
    /* Align with Dot/Badge */
}

.timeline-box {
    background: #FFF8E6;
    /* Cream color */
    border: 1px solid #ffcc80;
    /* Subtle orange border */
    border-radius: 10px;
    padding: 15px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    align-items: flex-start;
}

.timeline-img {
    flex-shrink: 0;
    width: 150px;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
    background: #ccc;
    border: 1px solid #ddd;
}

.timeline-img .img-placeholder {
    width: 100%;
    height: 100%;
}

.timeline-box p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    margin: 0;
    font-style: italic;
    text-align: justify;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 20px;
        /* Move line to left */
    }

    .timeline-item {
        padding-left: 50px;
        /* Less padding */
        margin-bottom: 30px;
    }

    .timeline-item::before {
        left: 14px;
        /* Move dot */
        top: 0;
        /* Align top */
    }

    .timeline-badge {
        position: relative;
        right: auto;
        left: 0;
        margin-bottom: 10px;
        display: inline-block;
    }

    .timeline-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-img {
        width: 100%;
        height: 150px;
        margin-bottom: 10px;
    }
}