/* ================================================================
   justheader.css – Shared navbar styles for justheader.php
   Matches the home page navbar appearance exactly.
   Used by staticpage_head.php for all dropdownstatic pages.
   ================================================================ */

/* --- CSS Variables -------------------------------------------- */
:root {
    --primary-color:   #8a42ff;
    --primary-light:   #9d5eff;
    --primary-dark:    #6a2fd4;
    --secondary-color: #2b2b36;
    --accent-color:    #00d4aa;
    --border-radius:   12px;
    --border-radius-sm: 8px;
    --transition:      all 0.3s ease;
}

/* --- Base reset (minimal, non-conflicting with Bootstrap) ------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', 'Poppins', sans-serif; overflow-x: hidden; }
a { text-decoration: none; transition: var(--transition); }

/* --- Header container ------------------------------------------ */
.main-header {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;          /* above Bootstrap's z-index-100 dropdowns */
    transition: var(--transition);
}

.main-header.scrolled {
    padding: 8px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* --- Navbar ---------------------------------------------------- */
.navbar { padding: 16px 0; }

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
}

.main-logo { object-fit: contain; }

/* --- Nav links ------------------------------------------------- */
.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px !important;
    margin: 0 4px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    color: var(--secondary-color) !important;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(138, 66, 255, 0.1);
    color: var(--primary-color) !important;
}

/* --- Dropdown toggle caret color ------------------------------ */
.nav-link.dropdown-toggle::after { border-top-color: var(--primary-color); }

/* --- Dropdown menu -------------------------------------------- */
.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    min-width: 200px;
    z-index: 1100;          /* always above header */
    background: #ffffff;
}

.dropdown-item {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color);
    padding: 10px 20px;
    transition: var(--transition);
    border-radius: 6px;
    margin: 2px 8px;
    width: calc(100% - 16px);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(138, 66, 255, 0.08);
    color: var(--primary-color);
}

/* --- Navbar toggler ------------------------------------------- */
.navbar-toggler {
    border: none;
    padding: 8px 10px;
    border-radius: var(--border-radius-sm);
}

.navbar-toggler:focus { box-shadow: none; }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28138%2C66%2C255%2C1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Buttons in header ---------------------------------------- */
.main-header .btn-primary,
.main-header .btn { border-radius: var(--border-radius-sm); font-weight: 600; }

.main-header .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    color: white;
    padding: 8px 20px;
}

.main-header .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(138, 66, 255, 0.3);
}

.main-header .btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 8px 20px;
}

.main-header .btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* --- Scroll-activated sticky animation ------------------------- */
@keyframes headerSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
.main-header { animation: headerSlideDown 0.4s ease; }

/* --- Responsive ----------------------------------------------- */
@media (max-width: 992px) {
    .navbar-collapse {
        background: #ffffff;
        border-radius: var(--border-radius);
        padding: 16px;
        margin-top: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .dropdown-menu {
        box-shadow: none;
        border: 1px solid rgba(138, 66, 255, 0.15);
        margin-left: 8px;
    }

    .nav-link { margin: 2px 0; }
}
