/* ==========================================
   global.css — Aspire Pharmaceuticals
   Shared styles loaded by every page.

   Sections:
     1. CSS Variables (:root)
     2. Font Declarations (@font-face)
     3. Base Reset & Focus
     4. Header (full bar + pill-mode + hover expand)
     5. Footer
     6. Hamburger & Mobile Nav Overlay
     7. Site Search Overlay
     8. Shared Responsive (@media 900px)

   Dependencies: none
   Used by: index.html, learn-more.html, products.html
   ========================================== */

/* ==========================================
   ROOT VARIABLES
   ========================================== */
:root {
    --primary-blue: #113EA0;
    --dark-navy: #00143A;
    --turquoise: #35CBCC;
    --sterile-grey: #DEDFE0;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: rgba(0, 20, 58, 0.1);
}

/* ==========================================
   FONT FACES
   ========================================== */
@font-face {
    font-family: 'Space Grotesk';
    src: url('../assets/fonts/SpaceGrotesk-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('../assets/fonts/ProximaNova-Regular.otf') format('opentype');
    font-weight: 400;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('../assets/fonts/ProximaNova-Bold.otf') format('opentype');
    font-weight: 700;
}

/* ==========================================
   UNIVERSAL BOX SIZING
   ========================================== */
*, *::before, *::after { box-sizing: border-box; }

/* ==========================================
   FOCUS VISIBLE
   ========================================== */
*:focus-visible {
    outline: 2px solid var(--turquoise);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ==========================================
   HEADER
   ========================================== */
#header {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5vw;
    box-sizing: border-box;
    background: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(222, 223, 224, 0.5);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#header.pill-mode {
    top: 20px;
    right: 5vw;
    left: auto;
    width: 60px;
    height: 60px;
    padding: 0;
    border-radius: 30px;
    background: transparent;
    border: 2px solid var(--turquoise);
    box-shadow: 0 5px 15px rgba(53, 203, 204, 0.2);
    justify-content: flex-end;
    overflow: hidden;
    display: flex;
    align-items: center;
}

#header.pill-mode .logo-container {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 0.1s;
}

#header.pill-mode .header-actions {
    width: 100%;
    justify-content: flex-end;
    padding: 0;
    gap: 0;
}

#header.pill-mode nav {
    opacity: 0;
    max-width: 0px;
    pointer-events: none;
    transition: opacity 0.4s ease, max-width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), padding 0.4s ease, margin 0.4s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
}

#header.pill-mode .search-icon {
    width: 56px;
    height: 56px;
    margin: 0;
    background-color: transparent;
    background-image: url('../assets/images/pill-collapse.webp');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#header.pill-mode .icon-search { display: none; }

#header.pill-mode:hover {
    width: auto;
    max-width: fit-content;
    padding: 0;
    padding-left: 20px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid var(--turquoise);
    justify-content: flex-end;
}

#header.pill-mode:hover .header-actions {
    justify-content: flex-end;
    padding-right: 0px;
}

#header.pill-mode:hover nav {
    opacity: 1;
    max-width: 800px;
    pointer-events: all;
    padding-left: 0;
    margin-right: 1.5rem;
}

#header.pill-mode:hover .search-icon {
    width: 56px;
    height: 56px;
    background-image: none;
    background-color: var(--turquoise);
}

#header.pill-mode:hover .icon-search { display: block; }

#header.pill-mode:hover .icon-menu {
    display: none !important;
}

/* Pill home button */
.pill-home-btn {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    border-radius: 50%;
    flex-shrink: 0;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
}
.pill-home-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.pill-home-btn:hover {
    color: var(--turquoise);
    background: rgba(53, 203, 204, 0.12);
}
#header.pill-mode .pill-home-btn { display: none; }
#header.pill-mode:hover .pill-home-btn {
    display: flex;
    margin-right: 0.75rem;
}

.logo-container img {
    height: 42px;
    width: auto;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.search-icon {
    width: 40px;
    height: 40px;
    background-color: var(--turquoise);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    flex-shrink: 0;
}
.search-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--white);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2.5rem;
    white-space: nowrap;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark-navy);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.25s ease;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-blue);
}

.nav-home-icon {
    display: flex;
    align-items: center;
    color: var(--dark-navy);
    transition: color 0.3s ease;
}
.nav-home-icon:hover {
    color: var(--primary-blue);
}

/* ==========================================
   FOOTER
   ========================================== */
#site-footer {
    background: var(--white);
    border-top: 2px solid var(--primary-blue);
    padding: 4rem 0 0;
    position: relative;
    overflow: hidden;
}

.footer-monogram {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 900;
    color: rgba(17, 62, 160, 0.04);
    letter-spacing: 0.15em;
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.footer-logo {
    height: 36px;
    width: auto;
    margin-bottom: 1.2rem;
    display: block;
}

.footer-tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0 0 0.6rem;
}

.footer-desc {
    font-family: 'Proxima Nova', sans-serif;
    font-size: 0.82rem;
    line-height: 1.65;
    color: rgba(0, 20, 58, 0.55);
    margin: 0;
}

.footer-col-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--primary-blue);
    margin: 0 0 1rem;
}

.footer-nav-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.footer-nav-col ul li a {
    font-family: 'Proxima Nova', sans-serif;
    font-size: 0.88rem;
    color: rgba(0, 20, 58, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav-col ul li a:hover { color: var(--primary-blue); }

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.footer-contact-item i {
    font-size: 1rem;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.footer-contact-item a,
.footer-contact-item span {
    font-family: 'Proxima Nova', sans-serif;
    font-size: 0.86rem;
    color: rgba(0, 20, 58, 0.8);
    text-decoration: none;
    line-height: 1.4;
}

.footer-contact-item a:hover { color: var(--primary-blue); }

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 1.2rem 60px 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--sterile-grey);
    position: relative;
    z-index: 2;
}

.footer-bottom span {
    font-family: 'Proxima Nova', sans-serif;
    font-size: 0.78rem;
    color: rgba(0, 20, 58, 0.35);
}

.footer-sep {
    color: rgba(0, 20, 58, 0.2);
    font-size: 0.78rem;
}

/* ==========================================
   HAMBURGER & MOBILE NAV
   ========================================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--dark-navy);
    z-index: 1100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.mobile-nav-overlay.open { display: flex; }

.mobile-nav-overlay a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.2s ease;
}

.mobile-nav-overlay a:hover { color: var(--turquoise); }

.mobile-nav-close {
    position: absolute;
    top: 28px;
    right: 40px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

/* ==========================================
   SITE-WIDE SEARCH OVERLAY
   ========================================== */
.site-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 20, 58, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}
.site-search-overlay.active {
    display: flex;
}
.site-search-modal {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    width: 90%;
    max-width: 640px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: searchModalIn 0.25s ease;
}
@keyframes searchModalIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.site-search-close {
    float: right;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(0, 20, 58, 0.4);
    cursor: pointer;
    transition: color 0.2s;
}
.site-search-close:hover {
    color: var(--dark-navy);
}
.site-search-modal h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin: 0 0 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.site-search-input-wrap {
    position: relative;
    margin-bottom: 1.5rem;
}
.site-search-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 20, 58, 0.35);
    font-size: 1.1rem;
    pointer-events: none;
}
#site-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: rgba(17, 62, 160, 0.04);
    border: 1px solid rgba(17, 62, 160, 0.12);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Proxima Nova', sans-serif;
    color: var(--dark-navy);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.25s ease;
}
#site-search-input:focus {
    border-color: var(--turquoise);
}
#site-search-input::placeholder {
    color: rgba(0, 20, 58, 0.35);
}
.site-search-result {
    display: block;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid rgba(17, 62, 160, 0.08);
    transition: all 0.2s ease;
}
.site-search-result:hover {
    background: rgba(17, 62, 160, 0.04);
    border-color: var(--turquoise);
}
.site-search-result-page {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--turquoise);
    margin-bottom: 0.3rem;
}
.site-search-result-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 0.2rem;
}
.site-search-result-desc {
    font-family: 'Proxima Nova', sans-serif;
    font-size: 0.82rem;
    color: rgba(0, 20, 58, 0.55);
    line-height: 1.5;
}
.site-search-empty {
    text-align: center;
    padding: 2rem;
    color: rgba(0, 20, 58, 0.4);
    font-family: 'Proxima Nova', sans-serif;
    font-size: 0.9rem;
}
.site-search-hint {
    text-align: center;
    padding: 2rem;
    color: rgba(0, 20, 58, 0.3);
    font-family: 'Proxima Nova', sans-serif;
    font-size: 0.85rem;
}

/* ==========================================
   SHARED RESPONSIVE — MOBILE
   ========================================== */
@media (max-width: 900px) {
    nav { display: none !important; }
    .hamburger { display: flex; }

    .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-wrap: wrap; }
}

/* ==========================================
   A11Y UTILITIES
   ========================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
