/* Reset and basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(to bottom, #e0f7fa, #ffe0b2, #ffcc80);
    color: #3e3e3e;
    line-height: 1.6;
    font-size: 16px;
    padding: 20px;
    transition: background 0.5s ease;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 200, 124, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

header .logo {
    font-size: 1.5em;
    color: #5d4037;
    font-weight: bold;
}

nav {
    display: flex;
    gap: 15px;
}

nav a {
    text-decoration: none;
    color: #5d4037;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #ff6f00;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

nav a:hover {
    color: #ff6f00;
    transform: scale(1.05);
}

nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle div {
    width: 25px;
    height: 3px;
    background-color: #5d4037;
    margin: 4px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 60px;
        right: -100%;
        height: 100vh;
        width: 200px;
        background-color: rgba(255, 200, 124, 0.95);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        transition: right 0.3s ease;
    }

    nav.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }
}

main {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

article {
    max-width: 1200px;
    width: 100%;
}

article h2, article h3, article h4 {
    color: #5d4037;
    margin: 40px 0 20px;
    position: relative;
}

article h2 {
    font-size: 2em;
    border-bottom: 2px solid #ff6f00;
    padding-bottom: 10px;
}

article h3 {
    font-size: 1.5em;
    border-bottom: 1.5px solid #ff6f00;
    padding-bottom: 8px;
}

article h4 {
    font-size: 1.25em;
    border-bottom: 1px solid #ff6f00;
    padding-bottom: 5px;
}

section {
    background: rgba(255, 235, 205, 0.5);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

section p {
    margin-bottom: 15px;
    color: #4e342e;
}

section p span {
    font-weight: 600;
    color: #ff6f00;
    text-shadow: 0 0 3px rgba(255,111,0,0.5);
}

section img {
    display: block;
    max-width: 900px;
    min-width: 500px;
    width: 100%;
    margin: 20px auto;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

nav a {
    cursor: pointer;
}

footer {
    width: 100%;
    background-color: rgba(94, 53, 15, 0.9);
    color: #fff176;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    position: relative;
}

footer a {
    color: #fff176;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ffd54f;
}

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

section, header, footer {
    animation: fadeIn 1s ease forwards;
}

@media (max-width: 1200px) {
    section {
        padding: 15px;
    }

    article h2 {
        font-size: 1.8em;
    }

    article h3 {
        font-size: 1.3em;
    }

    article h4 {
        font-size: 1.1em;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    section img {
        min-width: 100%;
    }

    header {
        flex-direction: space-between;
    }

    nav {
        width: 100%;
        height: auto;
    }

    footer {
        font-size: 0.9em;
    }
}
