/* ============================================
   WebGuy IT — Legacy tool styles
   ============================================
   The subset of the old site's css/style.css (archived at /old/css/style.css)
   that the carried-over tools still rely on: signatures, referrals, branding,
   diag, chooser/tiers, game.

   Those pages now use the new site header/footer (Bootstrap + site.css), so
   every rule here is scoped under :where(.wg-legacy) — set via $mainClass = 'wg-legacy'
   on the page, which lands on <main>. That keeps the old global reset, img
   shadows, .btn/.hero/.container overrides etc. from leaking into the new
   navbar and footer. :where() adds zero specificity, so each rule keeps the
   exact weight it had in style.css and tool stylesheets still override it.

   Dropped from style.css: navigation, footer, back-to-top, and the old
   homepage-only sections (about, services, news, resellers, contact).
   The old fixed navbar offsets (.hero margin-top, .game-page top padding)
   are reduced because the new header is sticky, not fixed.

   Load AFTER site.css (i.e. via $extraCSS) and BEFORE any tool stylesheet.
   ============================================ */

/* Old palette — tool stylesheets (signatures.css, branding.css,
   referral.css, …) reference these. Names don't clash with site.css (--wg-*). */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #ecf0f1;
    --bg-dark: #34495e;
    --white: #ffffff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 15px;
}

/* ============================================
   GLOBAL STYLES & RESET (scoped)
   ============================================ */
:where(.wg-legacy),
:where(.wg-legacy) * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Pages that never loaded Bootstrap (everything except chooser/tiers) also
   get .wg-legacy-reset: Bootstrap's reboot puts margins/padding on these
   elements with element selectors, which outrank the * reset above. :is()
   gives this rule element weight, so it wins by load order, while any
   class-based rule in a tool stylesheet still overrides it. */
:where(.wg-legacy-reset) :is(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, blockquote, figure, pre, fieldset, legend) {
    margin: 0;
    padding: 0;
}

:where(.wg-legacy) {
    font-family: 'Nunito Sans', 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

:where(.wg-legacy) h1, :where(.wg-legacy) h2, :where(.wg-legacy) h3,
:where(.wg-legacy) h4, :where(.wg-legacy) h5, :where(.wg-legacy) h6 {
    font-family: 'Expletus Sans', 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: inherit;
}

:where(.wg-legacy) img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

:where(.wg-legacy) a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

:where(.wg-legacy) .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

:where(.wg-legacy) .section-header {
    text-align: center;
    margin-bottom: 50px;
}

:where(.wg-legacy) .section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

:where(.wg-legacy) .underline {
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 0 auto 20px;
    border-radius: 2px;
}

/* ============================================
   BUTTONS
   ============================================ */
:where(.wg-legacy) .btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

:where(.wg-legacy) .btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

:where(.wg-legacy) .btn-primary:hover {
    background: #2980b9;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

:where(.wg-legacy) .btn-outline {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

:where(.wg-legacy) .btn-outline:hover {
    background: var(--secondary-color);
    color: var(--white);
}

:where(.wg-legacy) .btn-accent {
    background: var(--accent-color);
    color: var(--white);
}

:where(.wg-legacy) .btn-accent:hover {
    background: #c0392b;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

:where(.wg-legacy) .btn-accent i {
    margin-right: 8px;
}

/* ============================================
   HERO SECTION
   ============================================ */
:where(.wg-legacy) .hero {
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 0; /* was 80px to clear the old fixed navbar */
}

:where(.wg-legacy) .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

:where(.wg-legacy) .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

:where(.wg-legacy) .hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: legacyFadeInDown 1s ease;
}

:where(.wg-legacy) .hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    animation: legacyFadeInUp 1s ease;
}

:where(.wg-legacy) .hero-logo {
    max-width: 600px;
    width: 90%;
    height: auto;
    margin-bottom: 40px;
    border-radius: 0;
    box-shadow: none;
    animation: legacyFadeInDown 1s ease;
}

:where(.wg-legacy) .hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

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

@keyframes legacyFadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   GAME PAGE
   ============================================ */
:where(.wg-legacy) .game-page {
    padding: 70px 0 100px; /* was 150px top to clear the old fixed navbar */
    background: var(--bg-light);
    min-height: 100vh;
}

:where(.wg-legacy) .game-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

:where(.wg-legacy) .game-iframe {
    width: 100%;
    height: 800px;
    border: none;
    display: block;
}

/* ============================================
   REFERRAL PROGRAM CTA BANNER
   ============================================ */
:where(.wg-legacy) .referral-cta {
    background: linear-gradient(135deg, #B8860B 0%, #D8AC2F 50%, #C4972A 100%);
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

:where(.wg-legacy) .referral-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

:where(.wg-legacy) .referral-cta-header {
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 32px;
}

:where(.wg-legacy) .referral-cta-header > i {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 12px;
    display: block;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

:where(.wg-legacy) .referral-cta-header h2 {
    font-family: 'Expletus Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

:where(.wg-legacy) .referral-cta-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

:where(.wg-legacy) .referral-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

:where(.wg-legacy) .referral-mini-card {
    flex: 1;
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

:where(.wg-legacy) .referral-mini-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

:where(.wg-legacy) .referral-mini-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #D8AC2F 0%, #B8860B 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

:where(.wg-legacy) .referral-mini-icon i {
    font-size: 1.5rem;
    color: #ffffff;
}

:where(.wg-legacy) .referral-mini-card h3 {
    font-family: 'Expletus Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

:where(.wg-legacy) .referral-mini-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 18px;
}

:where(.wg-legacy) .referral-mini-card .btn-outline-light {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: transparent;
    color: #B8860B;
    border: 2px solid #D8AC2F;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

:where(.wg-legacy) .referral-mini-card .btn-outline-light:hover {
    background: linear-gradient(135deg, #D8AC2F 0%, #B8860B 100%);
    color: #ffffff;
    border-color: #B8860B;
    transform: translateY(-1px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    :where(.wg-legacy) .hero-logo {
        max-width: 200px;
    }

    :where(.wg-legacy) .hero h1 {
        font-size: 2.5rem;
    }

    :where(.wg-legacy) .hero-subtitle {
        font-size: 1.2rem;
    }

    :where(.wg-legacy) .section-header h2 {
        font-size: 2rem;
    }

    :where(.wg-legacy) .game-iframe {
        height: 600px;
    }

    :where(.wg-legacy) .referral-cta {
        padding: 40px 0;
    }

    :where(.wg-legacy) .referral-cta-header h2 {
        font-size: 1.6rem;
    }

    :where(.wg-legacy) .referral-cards {
        flex-direction: column;
        padding: 0 20px;
    }

    :where(.wg-legacy) .referral-mini-card {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    :where(.wg-legacy) .hero h1 {
        font-size: 2rem;
    }

    :where(.wg-legacy) .hero-subtitle {
        font-size: 1rem;
    }

    :where(.wg-legacy) .section-header h2 {
        font-size: 1.75rem;
    }

    :where(.wg-legacy) .game-iframe {
        height: 500px;
    }
}
