/* ============================================
   GluSteady — Personal Glycemic Index™ Pages
   Shared styles matching main site branding
   Design System: Poppins, Coral/Peach/Gold
   ============================================ */

:root {
    --coral: #E8634A;
    --coral-deep: #D4553D;
    --peach: #F79D65;
    --gold: #F7CE68;
    --dark: #1A1A2E;
    --dark-warm: #12121F;
    --text: #333333;
    --text-muted: #666666;
    --off-white: #F8F8F8;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --brand-gradient: linear-gradient(135deg, #E8634A 0%, #F79D65 60%, #F7CE68 100%);
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: var(--off-white);
    line-height: 1.625;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- NAVIGATION ---- */
.site-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}
.site-nav.scrolled {
    background: rgba(255,255,255,0.80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    padding: 1rem 0;
}
.nav-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
@media (min-width: 640px) {
    .nav-inner { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
    .nav-inner { padding: 0 2rem; }
}
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: #4B5563;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}
.nav-links a:hover { color: var(--coral); }
.nav-links a.active {
    color: var(--coral);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--coral);
    border-radius: 1px;
}
.nav-cta {
    background: var(--brand-gradient) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    transition: box-shadow 0.2s, transform 0.15s !important;
    box-shadow: 0 4px 14px rgba(232,99,74,0.3);
}
.nav-cta:hover {
    box-shadow: 0 0 30px -10px rgba(232,99,74,0.4) !important;
    transform: translateY(-1px);
}
.nav-cta::after { display: none !important; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- BREADCRUMBS ---- */
.breadcrumbs {
    padding: 6.5rem 2rem 0;
    max-width: 900px;
    margin: 0 auto;
}
.breadcrumbs a, .breadcrumbs span {
    font-size: 0.84rem;
    color: var(--text-muted);
    text-decoration: none;
}
.breadcrumbs a:hover { color: var(--coral); }
.breadcrumbs .sep { margin: 0 0.5rem; }

/* ---- LAYOUT ---- */
section { padding: 5rem 2rem; }
.container { max-width: 900px; margin: 0 auto; }
.container-wide { max-width: 1100px; margin: 0 auto; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }

.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- HERO ---- */
.pgi-hero {
    padding: 2.5rem 2rem 5rem;
    background: linear-gradient(165deg, #FFFFFF 0%, var(--off-white) 50%, #FFF5F0 100%);
    position: relative;
    overflow: hidden;
}
.pgi-hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232,99,74,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.pgi-hero .container { text-align: center; position: relative; }

.badge {
    display: inline-block;
    background: var(--brand-gradient);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 2.5rem;
    line-height: 1.75;
}

/* ---- BUTTONS ---- */
.btn-primary {
    display: inline-block;
    background: var(--brand-gradient);
    color: white;
    padding: 0.875rem 2.25rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(232,99,74,0.3);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px -10px rgba(232,99,74,0.5);
}

.btn-white {
    display: inline-block;
    background: white;
    color: var(--coral);
    padding: 0.875rem 2.25rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ---- CARDS ---- */
.card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-cream {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card-cream:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--brand-gradient);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

/* ---- GRIDS ---- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* ---- COMPARISON CARDS ---- */
.card-bad { border-left: 4px solid #EF4444; }
.card-good { border-left: 4px solid #22C55E; }
.card-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}
.card-bad .card-label { color: #EF4444; }
.card-good .card-label { color: #22C55E; }

/* ---- DARK CALLOUT ---- */
.callout-dark {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-warm) 100%);
    color: white;
    padding: 3rem;
    border-radius: 0.75rem;
    margin: 2rem 0;
}
.callout-dark h3 { color: var(--peach); }
.callout-dark p { color: rgba(255,255,255,0.85); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2rem; }
.stat-item { text-align: center; }
.stat-number { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 2.5rem; color: var(--coral); }
.stat-label { font-size: 0.84rem; color: rgba(255,255,255,0.6); margin-top: 0.25rem; }

/* ---- STEPS ---- */
.steps { margin-top: 2.5rem; }
.step {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    align-items: start;
}
.step-num {
    width: 60px;
    height: 60px;
    background: var(--brand-gradient);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}
.step-content h3 { margin-bottom: 0.4rem; }
.step-content p { color: var(--text-muted); }

/* ---- SECTIONS ---- */
.section-cream {
    background: var(--off-white);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

/* ---- PROSE ---- */
.prose { max-width: 720px; }
.prose p { margin-bottom: 1.25rem; }
.prose strong { color: var(--text); }
.prose em { font-style: italic; }

/* ---- FAQ ---- */
.faq-item { border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.faq-q {
    font-weight: 600;
    color: var(--text);
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    user-select: none;
    -webkit-user-select: none;
}
.faq-q::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--coral);
    transition: transform 0.3s;
    flex-shrink: 0;
}
.faq-q.active::after { transform: rotate(45deg); }
.faq-a {
    color: var(--text-muted);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-a.open {
    max-height: 400px;
    padding-top: 1rem;
}

/* ---- CTA BANNER ---- */
.cta-banner {
    background: var(--brand-gradient);
    text-align: center;
    border-radius: 0.75rem;
    margin: 3rem auto;
    max-width: 1100px;
    padding: 4rem 2rem;
}
.cta-banner h2 { color: white; }
.cta-banner p { color: rgba(255,255,255,0.9); max-width: 500px; margin: 0 auto 2rem; }

/* Inline CTA within articles */
.inline-cta {
    background: var(--brand-gradient);
    color: white;
    padding: 2.5rem;
    border-radius: 0.75rem;
    text-align: center;
    margin: 3rem 0;
}
.inline-cta h3 { color: white; font-size: 1.4rem; margin-bottom: 0.75rem; }
.inline-cta p { color: rgba(255,255,255,0.9); margin-bottom: 1.5rem; }

/* ---- CALLOUT BOX ---- */
.callout {
    background: var(--off-white);
    border-left: 4px solid var(--coral);
    padding: 1.5rem 2rem;
    border-radius: 0 0.75rem 0.75rem 0;
    margin: 2rem 0;
}
.callout p { margin-bottom: 0; }
.callout strong { color: var(--coral); }

/* ---- COMPARISON TABLE ---- */
.cmp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.94rem;
}
.cmp-table th {
    background: var(--dark);
    color: white;
    padding: 0.9rem 1rem;
    text-align: left;
    font-weight: 600;
}
.cmp-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}
.cmp-table tr:nth-child(even) td { background: var(--off-white); }

/* ---- BLOG CARDS ---- */
.blog-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.blog-card .tag {
    display: inline-block;
    background: var(--brand-gradient);
    color: white;
    padding: 0.2rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.blog-card h2, .blog-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}
.blog-card p { color: var(--text-muted); font-size: 0.94rem; }
.blog-card .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    opacity: 0.7;
}

/* ---- ARTICLE HEADER ---- */
.article-header {
    padding: 2rem 2rem 3rem;
    max-width: 760px;
    margin: 0 auto;
}
.article-meta {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.article-header h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 1rem;
}
.article-header .subtitle {
    font-size: 1.12rem;
    color: var(--text-muted);
    line-height: 1.75;
}
.article-body {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}
.article-body h2 { font-size: 1.7rem; margin: 3rem 0 1rem; }
.article-body h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
.article-body p { margin-bottom: 1.25rem; }

/* ---- FOOTER ---- */
footer {
    background: white;
    border-top: 1px solid var(--border-light);
    padding: 3rem 0 0;
    font-size: 0.875rem;
}
footer .container {
    max-width: 80rem;
    padding: 0 2rem;
}
.site-footer {
    background: white;
    border-top: 1px solid var(--border-light);
    padding: 3rem 0 0;
    font-size: 0.875rem;
}
.footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 640px) {
    .footer-inner { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
    .footer-inner { padding: 0 2rem; }
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}
.footer-brand {}
.footer-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.75rem;
}
.footer-tagline {
    color: #6B7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.site-footer .footer-disclaimer {
    color: #9CA3AF;
    font-size: 0.75rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 360px;
}
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}
.footer-social a {
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #F3F4F6;
}
.footer-social a:hover {
    color: var(--coral);
    transform: translateY(-2px);
    background: #FEE2E2;
}
.footer-social svg {
    width: 18px;
    height: 18px;
}
.footer-brand .social-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.footer-brand .social-icons a {
    color: #9ca3af;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}
.footer-brand .social-icons a:hover {
    color: var(--coral);
}
.footer-brand .social-icons svg {
    width: 20px;
    height: 20px;
}
.footer-col h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 1rem;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    margin-bottom: 0.75rem;
}
.footer-col ul li a {
    color: #4B5563;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--coral); }

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
}
.compliance-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.compliance-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--off-white);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
}
.compliance-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.footer-copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #9CA3AF;
    text-align: center;
}
@media (min-width: 768px) {
    .footer-copyright {
        flex-direction: row;
        justify-content: space-between;
    }
}
.footer-copyright a {
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-copyright a:hover { color: var(--coral); }

/* Legacy footer classes (keep for compatibility) */
.site-footer .footer-links {
    margin-top: 0.75rem;
}
.site-footer .footer-links a {
    margin: 0 0.5rem;
    color: #4B5563;
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer .footer-links a:hover { color: var(--coral); }
.site-footer .footer-tm {
    margin-top: 0.75rem;
    font-size: 0.74rem;
    color: #9CA3AF;
}

/* ---- PAGE HEADER ---- */
.page-header {
    padding: 2rem 2rem 3rem;
    max-width: 900px;
    margin: 0 auto;
}
.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.75rem;
}
.page-header p { color: var(--text-muted); font-size: 1.08rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }
    .nav-links.open { display: flex; }
    .nav-links a.active::after { display: none; }
    .nav-toggle { display: flex; }

    .grid-2, .grid-3, .stat-row { grid-template-columns: 1fr; }
    .step { grid-template-columns: 52px 1fr; }
    .step-num { width: 48px; height: 48px; font-size: 1.2rem; }

    section { padding: 3.5rem 1.5rem; }
    .callout-dark { padding: 2rem; }
    .cta-banner { margin: 2rem 1rem; padding: 3rem 1.5rem; }

    .cmp-table { font-size: 0.82rem; }
    .cmp-table th, .cmp-table td { padding: 0.6rem 0.7rem; }
}

@media (max-width: 480px) {
    .pgi-hero { padding: 1.5rem 1.25rem 3rem; }
    h1 { font-size: 2rem; }
    .hero-sub { font-size: 1rem; }
    .btn-primary, .btn-white { padding: 0.8rem 1.8rem; font-size: 0.95rem; }
}
