/* ── GLOBAL THEME (IdBookstore Premium Awwwards Style) ── */
:root {
    --theme-bg: #FAFAF7;
    --theme-surface: #FFFFFF;
    --theme-surface-alt: #F0F4F1;
    --theme-text: #0D261C;
    --theme-text-muted: #4A6B5B;
    --theme-accent: #145C41;
    --theme-accent-hover: #0F4531;
    --theme-yellow: #F0C419;
    --theme-yellow-hover: #D6AF15;
    --theme-yellow-text: #0D261C;
    --theme-border: #E1E8E4;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-pill: 99px;
    
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

[data-theme="dark"] {
    --theme-bg: #070D0A;
    --theme-surface: #0E1712;
    --theme-surface-alt: #16241D;
    --theme-text: #F2F5F3;
    --theme-text-muted: #8A9E94;
    --theme-accent: #1E825C;
    --theme-accent-hover: #196E4E;
    --theme-yellow: #F0C419;
    --theme-yellow-hover: #D6AF15;
    --theme-yellow-text: #070D0A;
    --theme-border: #1E3027;
}

/* ── PUBLIC PAGE WRAPPER ── */
.public-root {
    background: var(--theme-bg);
    color: var(--theme-text);
    min-height: 100vh;
    font-family: var(--font-body);
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
}

/* ── HERO SECTION ── */
.public-hero {
    position: relative;
    padding: 180px 3rem 100px;
    overflow: hidden;
    background: var(--theme-surface-alt);
    border-bottom: 1px solid var(--theme-border);
}

.public-hero-bg {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(20,92,65,0.04) 0%, transparent 60%);
    pointer-events: none;
    animation: slow-pulse 8s infinite alternate;
}

[data-theme="dark"] .public-hero-bg {
    background: radial-gradient(circle at center, rgba(240,196,25,0.03) 0%, transparent 60%);
}

@keyframes slow-pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.public-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.public-label {
    display: inline-block;
    padding: 6px 16px;
    background: var(--theme-yellow);
    color: var(--theme-yellow-text);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--radius-pill);
    margin-bottom: 1.5rem;
}

.public-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--theme-text);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}
.public-title span { color: var(--theme-accent); font-style: italic; }

.public-desc {
    font-size: 1.25rem;
    color: var(--theme-text-muted);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* ── CONTENT TEMPLATE (LEGAL / ABOUT) ── */
.public-content-section {
    padding: 6rem 3rem;
}

.content-card {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-lg);
    padding: 4rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.03);
    max-width: 900px;
    margin: 0 auto;
}

.dynamic-html-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--theme-text);
}

.dynamic-html-content h2, .dynamic-html-content h3 {
    font-family: var(--font-heading);
    color: var(--theme-accent);
    margin: 2.5rem 0 1rem;
    font-weight: 700;
}
.dynamic-html-content p { margin-bottom: 1.5rem; }
.dynamic-html-content ul { margin-bottom: 1.5rem; padding-left: 2rem; }
.dynamic-html-content li { margin-bottom: 0.5rem; }
.dynamic-html-content strong { color: var(--theme-text); }

/* ── SUPPORT GRIDS ── */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.support-card {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.support-card:hover {
    transform: translateY(-5px);
    border-color: var(--theme-yellow);
    box-shadow: 0 10px 30px rgba(240, 196, 25, 0.1);
}

.sc-icon {
    width: 64px; height: 64px;
    border-radius: var(--radius-md);
    background: var(--theme-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--theme-accent);
    margin-bottom: 1.5rem;
    transition: background 0.3s, color 0.3s;
}

.support-card:hover .sc-icon {
    background: var(--theme-yellow);
    color: var(--theme-yellow-text);
}

.sc-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--theme-text);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.sc-desc {
    color: var(--theme-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.sc-link {
    color: var(--theme-accent);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .public-hero { padding: 120px 1.5rem 60px; }
    .public-content-section { padding: 3rem 1.5rem; }
    .content-card { padding: 2rem; }
}

/* ── SUBPAGE MINI NAV ── */
.subpage-nav {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    padding: 2rem 3rem;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subpage-back {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--theme-text);
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.3s, transform 0.3s;
}

.subpage-back:hover {
    color: var(--theme-yellow);
    transform: translateX(-3px);
}

.subpage-brand {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    font-style: italic;
    color: var(--theme-text);
    text-decoration: none;
}

.subpage-brand span {
    color: var(--theme-yellow);
    font-style: normal;
}

.subpage-spacer {
    width: 80px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .subpage-nav { padding: 1.25rem 1.5rem; }
    .subpage-brand { font-size: 1.2rem; }
    .subpage-spacer { width: 40px; }
    .public-hero { padding: 120px 1.5rem 60px; }
    .public-content-section { padding: 3rem 1.25rem; }
    .content-card { padding: 2rem 1.25rem; }
    .support-grid { grid-template-columns: 1fr; gap: 1.25rem; margin-top: 2rem; }
    .dynamic-html-content { font-size: 1rem; }
}

@media (max-width: 480px) {
    .subpage-nav { padding: 1rem; }
    .public-hero { padding: 100px 1rem 50px; }
    .public-title { font-size: clamp(2rem, 8vw, 3.5rem); }
    .public-desc { font-size: 1rem; }
    .public-content-section { padding: 2rem 1rem; }
    .content-card { padding: 1.5rem 1rem; }
}

/* ── MOBILE NAVBAR (SHARED) ── */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--theme-text);
    font-size: 1.5rem;
    padding: 8px;
    transition: color 0.3s;
}
.nav-hamburger:hover { color: var(--theme-yellow); }

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(var(--theme-bg), 0.98);
    backdrop-filter: blur(16px);
    z-index: 9000;
    flex-direction: column;
    padding: 2rem;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-nav-overlay.open { display: flex; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--theme-text);
    transition: transform 0.3s, color 0.3s;
}
.mobile-nav-close:hover {
    color: var(--theme-yellow);
    transform: rotate(90deg);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.mobile-nav-links a {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--theme-text);
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
}
.mobile-nav-links a:hover { 
    color: var(--theme-yellow); 
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .nav-hamburger { display: block; }
}
