@font-face {
    font-family: 'OpenDyslexic';
    src: url('font/OpenDyslexicAlta-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: rgba(42, 48, 0, 1);
    --text-color: #D45500;
    --content-bg: #FFE8D1;
    --logo-height: 200px;
    --menu-font-size: 1.5rem;
    --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.3);
    --gallery-img-height: 200px;
    /*--preview-max-width: 300px;*/
    --preview-height: 200px;
    --border-radius-sm: 0.5rem;
    --border-radius-lg: 1rem;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    font-family: 'OpenDyslexic', system-ui, -apple-system, sans-serif;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

#logo {
    height: var(--logo-height);
    width: auto;
    transition: height 0.3s ease;
}

.menu {
    display: flex;
    gap: 4rem;
    font-size: var(--menu-font-size);
    transition: all 0.3s ease;
}

.menu-item {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.menu-item.active {
    color: var(--content-bg);
}

main {
    padding-top: calc(var(--logo-height) + 2rem);
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section.active {
    display: block;
    opacity: 1;
}

.content {
    background-color: var(--content-bg);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.welcome-text {
    margin-top: 1rem;
    line-height: 1.6;
}

h1 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Gallery styles */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.folder {
    background-color: var(--content-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.folder:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.folder-header {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

.folder-preview {
    width: 100%;
    max-width: var(--preview-max-width);
    height: var(--preview-height);
    object-fit:cover;
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}



.folder-title {
    padding: 1rem;
    color: var(--text-color);
    text-align: center;
    font-size: 1.2rem;
    margin: 0;
}

.folder-description {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.folder-content {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background-color: var(--content-bg);
}

.folder.open {
    grid-column: 1 / -1;
}

.folder.open .folder-content {
    display: grid;
}

.image-item {
    aspect-ratio: 1;
    height: var(--gallery-img-height);
    overflow: hidden;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.image-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: var(--border-radius-sm);
}

.image-item:hover img {
    transform: scale(1.1);
    z-index: 1;
}

/* Menu burger */
#menu-toggle {
    display: none;
}

#menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
}

.close {
    position: absolute;
    top: 1rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close:hover {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
    :root {
        --logo-height: 200px;
        --menu-font-size: 1.3rem;
        --gallery-img-height: 180px;
        /*--preview-max-width: 250px;*/
        --preview-height: 180px;
    }
    
    .menu {
        gap: 3rem;
    }
}

@media (max-width: 1024px) {
    :root {
        --logo-height: 160px;
        --menu-font-size: 1.2rem;
        --gallery-img-height: 160px;
        /*--preview-max-width: 220px;*/
        --preview-height: 160px;
    }
    
    .menu {
        gap: 2.5rem;
    }
}

@media (max-width: 900px) {
    :root {
        --logo-height: 120px;
        --menu-font-size: 1.1rem;
        --gallery-img-height: 140px;
        /*--preview-max-width: 200px;*/
        --preview-height: 140px;
    }
    
    .menu {
        gap: 2rem;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --logo-height: 80px;
        --menu-font-size: 1.2rem;
        --gallery-img-height: 120px;
        /*--preview-max-width: 180px;*/
        --preview-height: 120px;
    }

    .nav-container {
        padding: 0.5rem 1rem;
    }

    #menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        margin-left: auto;
    }

    #menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px 0;
        background-color: var(--text-color);
        transition: all 0.3s ease;
    }

    #menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    #menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    #menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--bg-color);
        padding: 1rem;
        gap: 1rem;
        display: none;
        box-shadow: var(--shadow-lg);
        text-align: center;
    }

    .menu.active {
        display: flex;
    }

    .menu-item {
        padding: 0.5rem 0;
    }

    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}