/* ====================================================
   NAV.CSS  — Unified navbar, used on every page
   ==================================================== */

/* ── Global Box-Sizing for Header ── */
.hero-section-top, .hero-section-top * {
    box-sizing: border-box;
}

/* ── Wrapper ── */
.hero-section-top {
    width: 100%;
    position: absolute; /* Detached from document flow to float universally */
    top: 0;
    left: 0;
    z-index: 1000; 
    padding: 18px 5% 0;
}

/* ── Bar ── */
.nav-bar-main-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* ── Logo ── */
.nav-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background-image: url("../images/POTENT-LOGO.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 75%;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    transition: transform 0.3s ease;
}

.nav-logo:hover { transform: scale(1.06); }

/* ── Pill ── */
.nav-links-and-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 10px 22px;
    background-color: #f0f4ff;
    border-radius: 50px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    flex: 1;
    max-width: 520px;
    margin-left: auto;
}

/* ── Links ── */
.nav-links {
    display: flex;
    gap: 22px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #1a1060;
    font-weight: 600;
    font-size: 0.93rem;
    position: relative;
    transition: color 0.25s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #dd7732;
    border-radius: 2px;
    transition: width 0.25s ease;
}

.nav-links a:hover { color: #dd7732; }
.nav-links a:hover::after { width: 100%; }

/* Active page highlight */
.nav-links a.active {
    color: #dd7732;
}
.nav-links a.active::after { width: 100%; }

/* ── Contact Button ── */
.nav-contact a {
    text-decoration: none;
    color: #1a1060;
    font-weight: 600;
    font-size: 0.88rem;
    border: 1.5px solid #1a1060;
    padding: 6px 16px;
    border-radius: 50px;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    white-space: nowrap;
}

.nav-contact a:hover {
    background: #dd7732;
    border-color: #dd7732;
    color: #fff;
}

/* ── Hamburger (hidden on desktop) ── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    padding: 9px 11px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.25s ease;
}

.nav-hamburger:hover { background: rgba(255,255,255,0.22); }

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X animation */
.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile dropdown menu ── */
.nav-mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.38s ease, opacity 0.3s ease, padding 0.3s ease;
    background: rgba(10, 12, 40, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    
    /* Absolute positioning so it overlays content below instead of pushing it down */
    position: absolute;
    top: calc(100% + 12px); 
    left: 5%;
    width: 90%; 
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    padding: 0 20px;
}

.nav-mobile-menu.open {
    max-height: 300px;
    opacity: 1;
    padding: 14px 20px;
}

.nav-mobile-menu a {
    text-decoration: none;
    color: #e8eaff;
    font-size: 1rem;
    font-weight: 600;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: block;
}

.nav-mobile-menu a:last-child { border-bottom: none; }

.nav-mobile-menu a:hover {
    color: #dd7732;
    padding-left: 6px;
}

/* ====================================================
   RESPONSIVE BREAKPOINTS
   ==================================================== */

/* Tablets — shrink the pill a bit */
@media (max-width: 960px) {
    .hero-section-top {
        padding: 16px 4% 0;
    }

    .nav-links-and-contact {
        gap: 18px;
        padding: 9px 18px;
    }

    .nav-links { gap: 16px; }

    .nav-links a { font-size: 0.86rem; }
}

/* Small tablets / large phones — switch to hamburger */
@media (max-width: 768px) {
    .nav-links-and-contact {
        display: none;            /* hide pill */
    }

    .nav-hamburger {
        display: flex;            /* show hamburger */
    }

    .nav-mobile-menu {
        display: flex;            /* enable dropdown */
    }
}

/* Phones */
@media (max-width: 480px) {
    .hero-section-top {
        padding: 14px 5% 0;
    }

    .nav-logo {
        width: 44px;
        height: 44px;
    }
    
    .nav-mobile-menu {
        /* Ensure the dropdown matches the phone wrapper padding */
        width: 90%;
        left: 5%;
    }
}