* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #79380B;     
    --secondary-color: #AD6D15;   
    --accent-color: #FBF5D2;      
    --btn-color: #f9e106;         
    --btn-hover: #e6b800;         
    --btn-text: #333333;         
    --heading-color: #333333;     
    --text-color: #333333;        
    --light-bg: #F5F5F5;          
    --white: #FFFFFF;             
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Navbar ===== */
.navbar {
    background: linear-gradient(135deg, #f78a1d, #ffea96);
    color: var(--text-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-family: "Playwrite GB J", cursive;
    font-optical-sizing: auto;
    font-style: normal;
}

.logo:hover {
    transform: scale(1.05);
}

.navbar .logo .logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex: 1;
    justify-content: center;
    position: relative;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: block;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--btn-color);
    color: var(--btn-text);
}

/* ===== Dropdown Menu ===== */
.dropdown {
    display: none;
    position: absolute;
    top: 35px;
    left: 0;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    min-width: 180px;
    width: max-content;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    overflow: hidden;
    z-index: 1000;
    list-style: none;
}
.dropdown::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}
.nav-links > li:hover > .dropdown,
.dropdown:hover {
    display: block;
}

.dropdown > li {
    display: block;
    list-style: none;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown > li:last-child {
    border-bottom: none;
}

.dropdown > li > a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px;
    color: #333333 !important;
    text-decoration: none;
    background-color: #ffffff;
    transition: var(--transition);
}

.dropdown > li > a:hover {
    background-color: var(--btn-color);
    color: var(--btn-text) !important;
    padding-left: 25px;
}

/* ===== THANH TÌM KIẾM TRONG NAVBAR ===== */
.navbar-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.15);
    margin-right: 1rem;
}

.navbar-search input {
    width: 160px;
    padding: 6px 14px;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    outline: none;
    color: var(--text-color);
}

.navbar-search button {
    padding: 6px 12px;
    background: var(--btn-color);
    border: none;
    cursor: pointer;
    color: var(--btn-text);
    font-size: 0.85rem;
    transition: var(--transition);
}

.navbar-search button:hover {
    background: var(--btn-hover);
}

/* ===== Authentication Section ===== */
.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-login {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

.btn-login:hover {
    background-color: var(--text-color);
    color: var(--white);
}

.btn-register {
    background-color: var(--btn-color);
    color: var(--btn-text);
}

.btn-register:hover {
    background-color: var(--btn-hover);
    transform: scale(1.05);
}

/* ===== Timeline Header ===== */
.timeline-header {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hinh-1.jpg');
    background-size: cover; /* Phóng to hình bao trọn toàn bộ khung */
    background-position: center; /* Căn hình luôn nằm ở giữa */
    background-repeat: no-repeat;
    color: var(--white);
    padding: 7rem 0; 
    text-align: center;
    position: relative;
}

.timeline-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.timeline-header p {
    font-size: 1.1rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ===== Filter Section ===== */
.filter-section {
    background-color: var(--light-bg);
    padding: 3rem 0;
    text-align: center;
}

.filter-section h2 {
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--btn-color);
    background-color: transparent;
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--btn-color);
    color: var(--btn-text);
    transform: scale(1.05);
}

/* ===== Timeline Main ===== */
.timeline-section {
    padding: 4rem 0;
    background-color: var(--white);
}

.timeline-wrapper {
    position: relative;
    padding: 2rem 0;
}

/* Center Line */
.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
}

/* Timeline Items */
.timeline-item {
    margin-bottom: 4rem;
    opacity: 1;
    transition: var(--transition);
}

.timeline-item.hidden {
    display: none;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: 52%;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 52%;
    margin-right: 0;
    text-align: left;
}

/* Timeline Marker (Year) */
.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.year {
    display: inline-block;
    background-color: var(--btn-color);
    color: var(--btn-text);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Timeline Content */
.timeline-content {
    position: relative;
    transition: var(--transition);
}

/* Timeline Card */
.timeline-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.timeline-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.timeline-image {
    width: 100%;
    height: 300px;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.timeline-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.timeline-card:hover .timeline-image img {
    transform: scale(1.1);
}

.timeline-card h3 {
    color: var(--heading-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.timeline-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Timeline Tags */
.timeline-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    background-color: var(--light-bg);
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--btn-color);
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #f78a1d, #ffea96);
    color: var(--text-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    padding: 0 1rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 0.3rem 0;
}

.footer-section a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.contact-item {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.3rem;
    color: var(--accent-color);
    min-width: 20px;
}

.contact-text {
    display: flex;
    flex-direction: column;
}

.contact-text strong {
    font-size: 0.9rem;
    display: block;
    margin-bottom: 3px;
}

.contact-text a {
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
}

.contact-text a:hover {
    color: var(--accent-color);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .timeline-wrapper::before {
        left: 30px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 80px;
        margin-right: 0;
        text-align: left;
    }


    .timeline-marker {
        left: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .timeline-header h1 {
        font-size: 1.8rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .timeline-wrapper::before {
        left: 20px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 60px;
        margin-right: 0;
        text-align: left;
    }

    .timeline-marker {
        left: 20px;
        top: -10px;
    }

    .year {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .timeline-image {
        height: 150px;
    }

    .timeline-card h3 {
        font-size: 1.1rem;
    }

    .timeline-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .timeline-wrapper {
        padding: 0;
    }

    .timeline-wrapper::before {
        left: 15px;
    }

    .timeline-marker {
        left: 15px;
        top: -5px;
    }

    .year {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 45px;
    }

    .timeline-card {
        padding: 1rem;
    }

    .timeline-image {
        height: 120px;
        margin-bottom: 0.8rem;
    }

    .timeline-card h3 {
        font-size: 1rem;
    }

    .timeline-date {
        font-size: 0.85rem;
    }

    .timeline-description {
        font-size: 0.85rem;
    }

    .tag {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
    }
}

/* ===== AUTH USER GREETING & LOGOUT ===== */
.user-greeting {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 20px;
}

.btn-logout {
    padding: 0.6rem 1.2rem;
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-color);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--text-color);
    color: white;
}