/* Reset and base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'MadimiOne-Regular', system-ui, -apple-system, sans-serif;
    /* background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%); */
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden; /* avoid accidental horizontal scroll on small screens */
    background-image: url('../../assets/images/Desktop - 2.png');
    background-size: cover; /* fill the screen */
    background-position: center;
    background-repeat: no-repeat;
}

/* Main container */
.main-header-container {
    display: flex;
    flex-direction: row;
    padding: 20px;
    max-width: 1200px;
    /* margin: 0 auto; */
    gap: 16px;
    /* position: relative; */
    align-items: center;
}

/* Logo section */
.logo-section {
    background: #373737;
    border-radius: 100px;
    padding: 7px 15px;
    display: flex;
    /* flex-direction: row; */
    margin-right: 100px;

    gap: 15px;
    /* align-items: center; */
    /* justify-content: flex-start; */
    width: fit-content;
    max-width: 300;
    height: 120px;
    box-shadow: -2.311px 1.992px 2.52px 0 rgba(17, 17, 17, 0.7),
        2.311px -1.992px 2.52px 0 rgba(93, 93, 93, 0.7);
}

.logo-icon-container {
    background: #373737;
    border-radius: 50px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -4.56px -4.56px 9.12px 0px rgba(74, 74, 74, 0.7),
        4.56px 4.56px 9.12px 0px rgba(36, 36, 36, 0.7);
}

.logo-icon {
    width: 80px;
    height: 76px;
    object-fit: contain;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    justify-content: center;
    width: 200px;
}

.app-title {
    color: #00cac7;
    font-family: 'MadimiOne-Regular', sans-serif;
    font-size: 64px;
    font-weight: 400;
    margin: 0;
    line-height: 1;
}

.app-subtitle {
    color: #ffffff;
    font-family: 'MadimiOne-Regular', sans-serif;
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    text-align: left;
}

/* Navigation bar */
.navigation-bar {
    background: #2f2f2f;
    border-radius: 30px;
    height: 100px;
    padding: 10px;
    /* box-shadow: 
        -10px -10px 20px 0px rgba(66, 66, 66, 0.3),
        10px 10px 20px 0px rgba(28, 28, 28, 0.7); */
}

.nav-sections {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
}

.primary-nav-section,
.secondary-nav-section {
    background: #2f2f2f;
    border-radius: 20px;
    padding: 15px;
    box-shadow: -7px -7px 14px 0px rgba(66, 66, 66, 0.7),
        7px 7px 14px 0px rgba(28, 28, 28, 0.7);
}

.nav-icons-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.secondary-nav-section {
    display: flex;
    flex-direction: row;
    gap: 13px;
    align-items: center;
    justify-content: center;
}

/* Unified nav icon button styling */
.nav-icon-button {
    background: #2f2f2f;
    border: none;
    border-radius: 50px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: -3.2px -3.2px 6.4px 0px rgba(66, 66, 66, 0.7),
        3.2px 3.2px 6.4px 0px rgba(28, 28, 28, 0.7);
}

.nav-icon-button:hover {
    transform: translateY(-2px);
    box-shadow: -5px -5px 10px 0px rgba(66, 66, 66, 0.8),
        5px 5px 10px 0px rgba(28, 28, 28, 0.8);
    background: #404040;
}

.nav-icon-button:active {
    transform: translateY(0);
    box-shadow: -2px -2px 4px 0px rgba(66, 66, 66, 0.6),
        2px 2px 4px 0px rgba(28, 28, 28, 0.6);
}

.nav-icon-button.active {
    background: #00cac7;
    box-shadow: 0 0 20px rgba(0, 202, 199, 0.5),
        -3.2px -3.2px 6.4px 0px rgba(66, 66, 66, 0.7),
        3.2px 3.2px 6.4px 0px rgba(28, 28, 28, 0.7);
}

/* Unified nav icon styling */
.nav-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.nav-icon-button:hover .nav-icon {
    filter: brightness(1.2);
}

.nav-icon-button.active .nav-icon {
    filter: brightness(1.5) drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* Responsive design */
@media (max-width: 768px) {
    /* Stack header vertically and remove excessive spacing */
    .main-header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
    }

    /* Compact logo area on mobile */
    .logo-section {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        height: auto;
        padding: 12px 16px;
        margin-right: 0; /* prevent pushing nav off-screen */
        width: 100%;
        text-align: left;
    }

    .logo-icon-container {
        width: 64px;
        height: 64px;
        border-radius: 32px;
    }

    .logo-icon {
        width: 52px;
        height: 50px;
    }

    .logo-text-container {
        align-items: flex-start;
        width: auto;
    }

    .app-title {
        font-size: 44px;
    }

    /* Make nav bar full-width and allow wrapping */
    .navigation-bar {
        width: 100%;
        height: auto; /* allow content height when icons wrap */
        padding: 10px;
    }

    .nav-sections {
        flex-direction: column;
        gap: 12px;
    }

    .primary-nav-section,
    .secondary-nav-section {
        padding: 12px;
    }

    .nav-icons-container {
        gap: 8px;
        flex-wrap: wrap; /* ensure icons flow onto next line */
        justify-content: center;
    }

    .nav-icon-button {
        width: 44px;
        height: 44px;
    }

    .nav-icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .navigation-bar {
        padding: 8px;
        position: sticky; /* keep nav visible at top when scrolling */
        top: 0;
        z-index: 100;
    }

    .nav-sections {
        gap: 10px;
    }

    .nav-icons-container {
        gap: 6px;
        flex-wrap: wrap;
    }

    .nav-icon-button {
        width: 42px;
        height: 42px;
    }

    .nav-icon {
        width: 26px;
        height: 26px;
    }

    .primary-nav-section,
    .secondary-nav-section {
        padding: 10px;
    }

    .app-title {
        font-size: 36px;
    }

    .app-subtitle {
        font-size: 14px;
    }
}

/* Focus styles for accessibility */
.nav-icon-button:focus {
    outline: 2px solid #00cac7;
    outline-offset: 2px;
}

.nav-icon-button:focus:not(:focus-visible) {
    outline: none;
}
