/* ══════════════════════════════════════════════════════════════
   BASE.CSS — Shared styles for all BioBlox pages
   Variables, Reset, Nav, Logo, Footer, Mobile Menu
   ══════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── CSS Variables ── */
:root {
    --pink: #ff6b9d;
    --purple: #c084fc;
    --blue: #60a5fa;
    --mint: #34d399;
    --yellow: #fbbf24;
    --orange: #fb923c;
    --coral: #f87171;
    --bg: #fef7ff;
    --bg-card: #ffffff;
    --text: #3b1f5e;
    --text-light: #5e4a80;
    --border: #f0e4f7;
    --shadow: rgba(192, 132, 252, .12);
}

/* ── Body ── */
body {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Page Wrapper ── */
.page-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════════════ */

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(16px);
    border-bottom: 3px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* ── Logo ── */
.logo {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.logo img {
    height: 90px;
    width: auto;
    object-fit: contain;
    margin: -20px 0;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 157, .3);
}

/* ── Nav Links ── */
.nav-links {
    display: flex;
    margin-left: auto;
    gap: 6px;
    list-style: none;
    align-self: stretch;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: .9rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 100px;
    transition: transform .25s, opacity .25s, box-shadow .25s;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .nav-links a:hover {
        color: white;
        background: linear-gradient(135deg, var(--pink), var(--purple));
        box-shadow: 0 4px 14px rgba(255, 107, 157, .25);
    }
}

.nav-links a.active {
    color: white;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 4px 14px rgba(255, 107, 157, .25);
}

/* ── Nav Dropdown ── */
.nav-dropdown {
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.nav-dropdown>a {
    cursor: pointer;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 18px);
    right: -20px;
    left: auto;
    background: rgba(255, 255, 255, .97);
    border: 2px solid var(--border);
    border-radius: 0 0 16px 16px;
    border-top: none;
    padding: 8px;
    min-width: 220px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .1);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s, opacity .25s, box-shadow .25s;
    z-index: 200;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px !important;
    border-radius: 12px !important;
    font-size: .85rem !important;
    font-weight: 600;
    color: var(--text-light) !important;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
    background: transparent !important;
    box-shadow: none !important;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    background: linear-gradient(135deg, var(--pink), var(--purple)) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(255, 107, 157, .25) !important;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE MENU
   ══════════════════════════════════════════════════════════════ */

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu span {
    width: 24px;
    height: 3px;
    background: var(--purple);
    border-radius: 3px;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */

footer {
    margin-top: auto;
    padding: 24px 32px;
    border-top: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    color: var(--text-light);
    background: rgba(255, 255, 255, .7);
    font-weight: 500;
}

footer a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    transition: opacity .2s;
}

footer a:hover {
    color: var(--pink);
}

/* ── Global Content Links (removes default underlines site-wide) ── */
.about-card a,
.about-feature a,
.faq-answer a,
.hero p a,
.bio-ideas-cta a,
section p a {
    color: var(--purple);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}

.about-card a:hover,
.about-feature a:hover,
.faq-answer a:hover,
.hero p a:hover,
.bio-ideas-cta a:hover,
section p a:hover {
    color: var(--pink);
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    nav {
        padding: 12px 16px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 12px 16px;
        z-index: 998;
        gap: 4px;
        border-bottom: 3px solid var(--border);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

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

    .nav-links a {
        padding: 12px 16px;
        display: block;
        width: auto;
        border-radius: 12px;
        text-align: left;
    }

    /* Mobile: Tools dropdown becomes inline sub-menu */
    .nav-dropdown {
        display: block;
        align-self: auto;
    }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: transparent;
        padding: 4px 0 4px 16px;
        min-width: unset;
        display: none;
        gap: 2px;
    }

    .nav-dropdown-menu::before {
        display: none;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: flex;
    }

    .nav-dropdown-menu li {
        list-style: none;
    }

    .nav-dropdown-menu a {
        padding: 10px 16px !important;
        font-size: .85rem !important;
        border-radius: 10px !important;
    }

    .mobile-menu {
        display: flex;
        position: relative;
        z-index: 1000;
    }

    footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 20px 16px;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (min-width: 641px) {
    .mobile-menu {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 60px;
    }
}