/* ==========================================================================
   Modern Navbar Styles for CoolComputing.com
   Adapted from pn2 blocks-custom.css
   ========================================================================== */

/* Brand color variables */
:root {
    --brand-color: #0066cc;
    --brand-color-light: #3399ee;
}

/* Modern Navbar Base */
.modern-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, var(--brand-color, #0066cc) 0%, var(--brand-color-light, #3399ee) 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
}

/* Add padding to body to account for fixed navbar */
body { padding-top: 60px; }

.navbar-container {
    max-width: 1400px;
    height: 60px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Navbar Brand/Logo Styling */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    padding: 0.5rem 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
    margin-right: 2rem;
}

.navbar-brand:hover {
    opacity: 0.9;
    text-decoration: none;
    color: white;
}

/* Logo placeholder - will be replaced with actual logo later */

.navbar-site-name {
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    white-space: nowrap;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    z-index: 1001;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hamburger-menu span {
    display: block;
    width: 22px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

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

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

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

/* Share button overrides to match navbar */
.share-btn {
    top: 6px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}
.share-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}
.share-btn svg {
    fill: white !important;
}

/* Navbar Links Container */
.navbar-links {
    display: flex;
    align-items: center;
    flex: 1;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none !important;
    list-style-type: none !important;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 0.25rem;
}

.nav-menu > li {
    margin: 0;
    padding: 0;
    list-style: none !important;
    list-style-type: none !important;
}

.nav-menu > li > a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-radius: 4px;
}

.nav-menu > li > a:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    color: white;
}

/* Navbar Search */
.navbar-search {
    display: flex;
    align-items: center;
    margin-left: 6%;
    margin-right: 0.5rem;
}

.navbar-search form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0 0.5rem;
    transition: background 0.2s;
}

.navbar-search form:focus-within {
    background: rgba(255, 255, 255, 0.25);
}

.navbar-search input[type="text"] {
    background: transparent;
    border: none;
    color: white;
    padding: 0.4rem 0.5rem;
    font-size: 13px;
    width: 160px;
    outline: none;
}

.navbar-search input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.navbar-search button[type="submit"] {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
}

.navbar-search button[type="submit"]:hover {
    color: white;
}


/* Thin scrollbar styling */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.25) transparent;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(0,0,0,0.4); }

/* Mobile Styles */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
        order: -1;
        margin-right: 0.75rem;
    }

    .navbar-brand {
        margin-right: auto;
        font-size: 1rem;
    }

    .navbar-site-name {
        font-size: 1rem;
    }

    .navbar-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--brand-color, #0066cc) 0%, var(--brand-color-light, #3399ee) 100%);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .navbar-links.active {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu > li > a {
        padding: 0.875rem 1.5rem;
        border-radius: 0;
    }

    .nav-menu > li:last-child {
        border-bottom: none;
    }

    /* Navbar search in mobile */
    .navbar-search {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-search form {
        margin: 0.5rem 1rem;
        width: calc(100% - 2rem);
    }

    .navbar-search input[type="text"] {
        width: 100%;
    }

}
