:root {
    --dark-brown: #5E3D1E;
    --light-brown: #B88B4A;
    --beige: #F2E3C6;
    --text-color: #F2E3C6;
}

body {
    margin: 0;
    padding: 0;
    background: var(--dark-brown);
    font-family: Arial, sans-serif;
    color: var(--text-color);
}

/* Navigation */
.nav {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: var(--dark-brown);
    border-bottom: 2px solid var(--light-brown);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--beige);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.nav-buttons {
    display: flex;
    gap: 1.5rem;
}

.nav-btn {
    background: transparent;
    border: 2px solid var(--light-brown);
    padding: 0.5rem 2rem;
    border-radius: 25px;
    color: var(--beige);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.nav-btn:hover, 
.nav-btn.active {
    background: var(--light-brown);
    color: var(--dark-brown);
    transform: translateY(-2px);
}

.burger-menu {
    display: none;
    cursor: pointer;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--beige);
    margin-bottom: 5px;
    transition: all 0.3s ease;
}


/* Hero Section */
.hero {
    height: 100vh;
    padding-top: 80px; /* Account for fixed nav */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background-image: url('https://www.panaynews.net/wp-content/uploads/2019/06/Jose-Rizal.png');
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Adjust the opacity as needed */
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--beige);
    font-size: clamp(40px, 6vw, 64px);
    margin: 0 0 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.explore-btn {
    background: var(--light-brown);
    color: var(--dark-brown);
    padding: 1rem 3rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.explore-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(184, 139, 74, 0.3);
}

/* Sections */
section {
    padding: 80px 2rem;
    min-height: 100vh;
    display: none;
}

section:nth-child(odd) {
    background: var(--dark-brown);
}

section:nth-child(even) {
    background: #402A16;
}

section#timeline {
    display: block;
}

section h2 {
    color: var(--beige);
    font-size: 48px;
    text-align: center;
    margin: 0 0 4rem;
}

/* Timeline */
.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding: 40px 0;
}

.timeline-item {
    margin-bottom: 4rem;
    position: relative;
    display: flex;
    align-items: flex-start;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--light-brown);
    border-radius: 2px;
    transform: translateX(-50%);
    z-index: -1;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--dark-brown);
    border: 4px solid var(--light-brown);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-content {
    width: 45%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 139, 74, 0.2);
    transform: translateX(0);
    opacity: 1;
    transition: all 0.5s ease;
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 55%;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 20px;
    border-top: 10px solid transparent;
    border-right: 20px solid rgba(184, 139, 74, 0.2);
    border-bottom: 10px solid transparent;
}

.timeline-item:nth-child(even) .timeline-content::before {
    content: '';
    position: absolute;
    right: -20px;
    top: 20px;
    border-top: 10px solid transparent;
    border-left: 20px solid rgba(184, 139, 74, 0.2);
    border-bottom: 10px solid transparent;
}

.president-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.president-image {
    flex: 0 0 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--light-brown);
}

.president-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.president-details {
    flex: 1;
    min-width: 300px;
}

.president-details h3 {
    color: var(--beige);
    font-size: 28px;
    margin: 0 0 0.5rem;
}

.term {
    color: var(--beige);
    font-size: 18px;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.title {
    font-size: 20px;
    color: var(--beige);
    margin-bottom: 1rem;
}

.description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.achievements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.achievements li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.4;
}

.achievements li::before {
    content: '•';
    color: var(--beige);
    position: absolute;
    left: 0;
    top: -1px;
    font-size: 1.5em;
}

/* Achievement Cards */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 139, 74, 0.2);
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
}

.achievement-card h3 {
    color: var(--beige);
    font-size: 24px;
    margin-bottom: 1.5rem;
}

.achievement-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.achievement-card li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.achievement-card li::before {
    content: '•';
    color: var(--beige);
    position: absolute;
    left: 0;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    border: 3px solid var(--light-brown);
    overflow: hidden;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item p {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    margin: 0;
    font-size: 0.9rem;
}

/* Facts */
.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.fact-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 139, 74, 0.2);
    transition: transform 0.3s ease;
}

.fact-card:hover {
    transform: translateY(-5px);
}

.fact-card h3 {
    color: var(--beige);
    font-size: 24px;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    margin-top: 4rem;
}

/* Responsive Styles */
@media screen and (max-width: 1200px) {
    .container {
        width: 95%;
        margin: 0 auto;
    }
}

@media screen and (max-width: 1024px) {
    .timeline-container {
        padding: 20px;
    }

    .timeline-content {
        width: 90%;
        margin: 0 auto !important;
        transition: all 0.3s ease;
    }

    .timeline-item::before,
    .timeline-item::after {
        display: none;
    }

    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        display: none;
    }

    .achievements-grid,
    .facts-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
        gap: 2rem;
    }
}

@media screen and (max-width: 768px) {
    /* Navigation */
    .burger-menu {
        display: block;
        z-index: 1000;
    }

    .nav-buttons {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(94, 61, 30, 0.95);
        backdrop-filter: blur(10px);
        padding: 1.5rem;
        flex-direction: column;
        align-items: center;
        transform: translateY(-150%);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .nav-buttons.active {
        transform: translateY(0);
    }

    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -8px);
    }

    /* Hero */
    .hero {
        height: calc(100vh - 70px);
    }

    .hero h1 {
        font-size: 36px;
        padding: 0 20px;
        margin-bottom: 1.5rem;
    }

    /* Timeline */
    .president-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .president-details {
        min-width: unset;
    }

    /* Achievement Cards and Facts */
    .achievements-grid,
    .facts-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .achievement-card,
    .fact-card {
        margin: 0 20px;
        transition: transform 0.3s ease;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 0 20px;
        gap: 2rem;
    }

    .gallery-item {
        transition: transform 0.3s ease;
    }
}

@media screen and (max-width: 480px) {
    /* Container */
    .container {
        padding: 1rem;
    }

    /* Logo */
    .logo {
        font-size: 18px;
        letter-spacing: 0.5px;
    }

    /* Navigation */
    .nav-btn {
        padding: 0.8rem 1.5rem;
        width: 90%;
        text-align: center;
        margin: 0.5rem 0;
    }

    /* Hero */
    .hero h1 {
        font-size: 28px;
    }

    .explore-btn {
        padding: 0.8rem 2rem;
        font-size: 16px;
        width: 80%;
        max-width: 250px;
    }

    /* Section Titles */
    section h2 {
        font-size: 32px;
        margin-bottom: 2.5rem;
        padding: 0 10px;
    }

    /* Timeline */
    .timeline-content {
        padding: 1.5rem;
    }

    .president-image {
        flex: 0 0 180px;
        height: 180px;
        margin-bottom: 1rem;
    }

    .president-details h3 {
        font-size: 24px;
        margin-bottom: 0.8rem;
    }

    .term {
        font-size: 16px;
        margin-bottom: 0.8rem;
    }

    .title {
        font-size: 18px;
        margin-bottom: 1rem;
    }

    /* Cards */
    .achievement-card,
    .fact-card {
        padding: 1.5rem;
        margin: 0.8rem 20px;
    }

    .achievement-card h3,
    .fact-card h3 {
        font-size: 20px;
        margin-bottom: 1rem;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
        padding: 0 15px;
    }

    .gallery-item p {
        font-size: 0.9rem;
        padding: 0.8rem;
        background: rgba(0, 0, 0, 0.8);
    }

    /* Footer */
    footer {
        padding: 1.5rem;
        margin-top: 2.5rem;
        background: rgba(0, 0, 0, 0.4);
    }
}

/* Handle very small screens */
@media screen and (max-width: 320px) {
    .hero h1 {
        font-size: 24px;
    }

    .timeline-content {
        width: 95%;
        padding: 1.2rem;
    }

    .president-image {
        flex: 0 0 150px;
        height: 150px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
}

/* Landscape Mode Fix */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 20px;
    }

    .nav-buttons.active {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* Print Optimization */
@media print {
    .nav,
    .burger-menu,
    .hero-buttons {
        display: none;
    }

    .hero {
        height: auto;
        padding: 40px 0;
    }

    .timeline-item,
    .achievement-card,
    .fact-card {
        break-inside: avoid;
    }
}