﻿/* === GLOBAL RESET === */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background-color: #f4f4f4;
    font-family: "Roboto", sans-serif;
}

.hero-wrapper {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

.container {
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}

/* === NAVIGATION === */
.nav {
    display: block;
    position: relative;
    z-index: 10;
}

.nav-list {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    color: #2c3e50;
    border-radius: 6px;
    position: relative;
    transition: all 0.25s ease-in-out;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #3498db;
}

/* === DROPDOWN === */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > .nav-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}


.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    min-width: 220px;
    width: max-content;
    max-width: 100vw;
    z-index: 20;
    padding: 8px 0;
    box-sizing: border-box;
    overflow: hidden;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.dropdown-list::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 28px;
    border: 6px solid transparent;
    border-bottom-color: #fff;
    filter: drop-shadow(0 -2px 4px rgba(0,0,0,.04));
}

.nav-dropdown.open > .dropdown-list {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-list li {
    list-style: none;
    padding: 0;
}

.dropdown-list li a {
    font-size: 15px;
    font-weight: 500;
    display: block;
    padding: 10px 16px;
    color: #2c3e50;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-list li a:hover {
    background-color: #ecf0f1;
    color: #3498db;
}

/* === HEADER === */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    padding: 6px 12px;
    position: relative;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px;
}

.logo {
    height: 60px;
    width: auto;
}

/* === BURGER === */
.burger {
    display: none;
    position: relative;
    width: 32px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 11;
}

.burger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #2c3e50;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger span:nth-child(1) {
    top: 0;
}

.burger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.burger span:nth-child(3) {
    bottom: 0;
}

.burger.open span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.burger.open span:nth-child(2) {
    opacity: 0;
}

.burger.open span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* === ADMIN BUTTONS === */
.admin-nav-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.admin-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-nav-button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
    text-align: center;
    min-width: 120px;
}

.admin-nav-button:hover {
    background-color: #0056b3;
}

.admin-nav-button.logout {
    background-color: #dc3545;
}

.admin-nav-button.logout:hover {
    background-color: #a71d2a;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    html, body {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .nav-dropdown {
        width: 100%;
        box-sizing: border-box;
    }

        .nav-dropdown > .nav-link {
            width: 100%;
            text-align: center;
            justify-content: center;
        }

    .hero-wrapper {
        flex: 1 0 auto;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .burger {
        display: flex;
    }

    .header {
        border-radius: 0;
        margin: 0;
    }

    .header-inner {
        justify-content: space-between;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100vw;
        overflow-x: hidden;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 12px 12px;
        z-index: 10;
    }

    .nav.open {
        display: flex;
        justify-content: center;
        animation: fadeIn 0.2s ease-in-out;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
        padding: 20px 0;
    }

    .nav-link {
        font-size: 20px;
        width: 100%;
        text-align: center;
    }

    .nav-dropdown .dropdown-list {
        left: 0 !important;
        right: auto;
        position: static;
        display: none;
        width: 100%;
        max-width: 100%;
        margin: 0;
        transform: none;
        opacity: 1;
        box-shadow: none;
        border-radius: 0;
        pointer-events: auto;
    }

    .nav-list {
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .dropdown-list {
        position: static;
        width: 100%;
        max-width: 100% !important;
        overflow-x: auto;
        word-break: break-word;
        white-space: normal;
    }



    .nav-dropdown.open .dropdown-list {
        display: block;
    }

    .dropdown-list li a {
        padding-left: 24px;
        text-align: center;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
