/* ============================================================
   SHARED SHELL — Algebra Studio™ by 10story Learning
   Colors: Purple #502D8C · Cyan #19C1E1 · Red #E03C26
   Font: Poppins · Content width: 900px
   ============================================================ */

:root {
    --purple: #502D8C;
    --purple-light: #6B3FA8;
    --purple-bg: #f6f3fa;
    --cyan: #19C1E1;
    --cyan-dark: #0ea5c4;
    --red: #E03C26;
    --text: #2c2c3a;
    --text-light: #5a5a6e;
    --text-muted: #8a8a9a;
    --border: #e2e0ea;
    --bg: #fdfcfe;
    --white: #ffffff;
    --content-width: 900px;
    --page-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 17px;
}

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-light); }

img { max-width: 100%; height: auto; }


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    width: 100%;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    text-decoration: none;
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}

.header-logo img {
    height: 52px;
    width: auto;
    display: block;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.nav-item {
    position: relative;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-item > a,
.nav-item > span {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    color: var(--text-light);
    text-decoration: none;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-item > a:hover,
.nav-item > span:hover,
.nav-item:hover > a,
.nav-item:hover > span {
    color: var(--purple);
    background: var(--purple-bg);
}

.nav-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-item:hover .nav-arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    padding: 10px;
    min-width: 320px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    transform: translateX(-50%) translateY(6px);
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: var(--purple-bg);
    color: var(--purple);
}

.dropdown-icon {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.dropdown-label {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.dropdown-desc {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.3;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 16px;
}

/* Order Kits button */
.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    background: transparent;
    color: var(--purple) !important;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: 8px;
    border: 2px solid var(--purple);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    margin-left: 6px;
}

.nav-btn:hover {
    background: var(--purple);
    color: var(--white) !important;
}


/* ============================================================
   BUTTONS (shared)
   ============================================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 24px;
    background: var(--purple);
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    border: 2px solid var(--purple);
}

.btn-primary:hover {
    background: var(--purple-light);
    border-color: var(--purple-light);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 24px;
    background: transparent;
    color: var(--purple);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    border: 2px solid var(--border);
    transition: border-color 0.2s, background 0.2s, transform 0.1s;
}

.btn-secondary:hover {
    border-color: var(--purple);
    background: var(--purple-bg);
    transform: translateY(-1px);
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: #1e1e2e;
    color: rgba(255,255,255,0.6);
    padding: 56px 24px 32px;
}

.footer-inner {
    max-width: var(--page-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,0.45);
    max-width: 280px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--cyan);
}

.footer-bottom {
    max-width: var(--page-width);
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,0.3);
}

.footer-bottom a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--cyan);
}


/* ============================================================
   RESPONSIVE (shared)
   ============================================================ */

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .header-nav { display: none; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}