/*
 Theme Name:     DM First Child Theme
 Theme URI:      https://dm-firsts.com
 Description:    Astra Child Theme for DM First, custom built with performance optimizations.
 Author:         DM First
 Author URI:     https://dm-firsts.com
 Template:       astra
 Version:        1.0.0
*/

/* DM First — Complete Stylesheet
   Dark Green & Gold Theme (App Style)
   System font stack for maximum performance */

:root {
    --bg-main: #06110b; /* Very dark green/black */
    --bg-secondary: #0a1f14; /* Slightly lighter for contrast */
    --bg-card: #0f2c1d; /* Dark green for cards */
    --primary: #008040; /* The vivid green from the app header */
    --primary-hover: #006633;
    --accent: #d4af37; /* The gold used in the app */
    --text-main: #ffffff;
    --text-muted: #b0c4ba; /* Pale green-tinted grey */
    --border: #1a422d; /* Subtle dark green border */
    --success: #16a34a;
    --font-headings: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -2px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 10px 10px -5px rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1.05rem;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-headings);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: -0.5px;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 4px;
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin: 2.5rem 0 1rem;
    color: var(--accent);
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition) !important;
}

a:hover {
    color: #ffffff;
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ═══════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, #024b24 0%, #012b14 100%);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
    box-shadow: var(--shadow-md);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-logo a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-links {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}
.nav-links a {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.9;
    text-decoration: none;
}
.nav-links a:hover {
    color: var(--accent);
    opacity: 1;
}

/* Nav Register Button (animated gold CTA) */
@keyframes nav-btn-shimmer {
    0% { transform: translateX(-250%); }
    100% { transform: translateX(250%); }
}
.nav-register-btn {
    background: transparent !important;
    color: var(--accent) !important;
    padding: 9px 24px !important;
    border-radius: 50px !important;
    border: 1px solid var(--accent) !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    opacity: 1 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.15);
    transition: transform 0.25s, background 0.25s !important;
}
.nav-register-btn:hover {
    transform: translateY(-2px) scale(1.04);
    background: rgba(212, 175, 55, 0.1) !important;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}
.nav-register-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    animation: nav-btn-shimmer 2.5s ease-in-out infinite;
}

/* Mobile Header Register Button */
.nav-register-mobile {
    display: none;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent) !important;
    padding: 7px 16px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-register-mobile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    animation: nav-btn-shimmer 2.5s ease-in-out infinite;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
.mobile-menu-btn span {
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 10px;
    transition: transform 0.3s linear, opacity 0.3s linear;
    position: relative;
    transform-origin: 1px;
    display: block;
}

/* Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 998;
}
.menu-overlay.active {
    display: block;
}
body.menu-open {
    overflow: hidden;
}

/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
.hero {
    position: relative;
    padding: 3rem 0 5rem;
    background: linear-gradient(180deg, #008040 0%, #022b15 100%);
    overflow: hidden;
    color: #fff;
    border-bottom: 2px solid var(--accent);
}
.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
}
.hero-content {
    text-align: center;
}
h1 span {
    color: var(--accent);
}

/* Hero image */
.responsive-img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 800px;
    border-radius: 12px;
    margin: 1.5rem auto 0;
    aspect-ratio: 16/9;
}
.responsive-image-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 12px;
    overflow: hidden;
}

/* Hero buttons */
.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1.15rem;
    font-weight: 800;
    border-radius: 50px;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    min-width: 140px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}
.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 2.5rem;
}

/* ═══════════════════════════════════════════
   TABLE OF CONTENTS
   ═══════════════════════════════════════════ */
.toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 24px 30px;
    margin: 2.5rem 0;
    box-shadow: var(--shadow-sm);
}
.toc h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}
.toc h2::after {
    display: none;
}
.toc ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin: 0;
    color: var(--text-muted);
}
.toc li {
    margin-bottom: 0.5rem;
}
.toc a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
}
.toc a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   CONTENT SECTIONS
   ═══════════════════════════════════════════ */
.content-section {
    padding: 4rem 0;
    contain: layout style;
}
.content-section:nth-child(even) {
    background: var(--bg-secondary);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 2rem;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}
.card h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 15px;
    color: var(--accent);
}
.card a {
    color: var(--accent) !important;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 2.5rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 18px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    background-color: #033d1f;
    color: var(--text-main);
    font-family: var(--font-headings);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--accent);
}
tr:last-child td {
    border-bottom: none;
}
tr:hover td {
    background-color: var(--bg-secondary);
}

/* Lists */
ul, ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}
li {
    margin-bottom: 0.8rem;
}

/* Step Lists */
.step-list {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}
.step-list li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 50px;
    margin-bottom: 1.2rem;
}
.step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    border: 2px solid var(--accent);
}
.step-list strong {
    color: var(--text-main);
}

/* ═══════════════════════════════════════════
   GAMES SECTION
   ═══════════════════════════════════════════ */
#games {
    background-color: #021a0f !important;
    color: #f8fafc;
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
}
#games h2, #games h3 {
    color: #ffffff;
}
#games p, #games li {
    color: #cbd5e1;
}
#games a {
    color: var(--accent);
    font-weight: 700;
}
#games a:hover {
    color: #ffffff;
    text-decoration: underline;
}
#games strong {
    color: #ffffff;
    font-weight: 700;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 2rem;
    margin-bottom: 3rem;
}
.game-card {
    background: #0f2c1d !important;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 15px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    color: var(--text-main);
}
.game-card:hover {
    transform: translateY(-5px);
    background: #153f29 !important;
    border-color: var(--accent);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.8);
}
.game-card .game-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}
.game-card h4 {
    color: var(--accent) !important;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}
.game-card p {
    color: var(--text-muted) !important;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════
   FAQ ACCORDION
   ═══════════════════════════════════════════ */
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.faq-item:hover {
    border-color: var(--accent);
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 24px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}
.faq-icon {
    color: var(--accent);
    transition: transform 0.3s ease;
    background: rgba(212, 175, 55, 0.1);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    background: var(--bg-card);
}
.faq-answer p {
    padding: 0 24px 24px 24px;
    margin: 0;
    color: var(--text-muted);
}
.faq-item.active .faq-question {
    color: var(--accent);
}
.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background: var(--accent);
    color: #000;
}

/* ═══════════════════════════════════════════
   RESPONSIBLE GAMING BLOCK
   ═══════════════════════════════════════════ */
.rg-block {
    background-color: #1a0f0f;
    border: 1px solid #7f1d1d;
    border-left: 4px solid #ef4444;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 3rem 0;
    text-align: center;
}
.rg-block h3 {
    color: #fca5a5;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}
.rg-block p {
    color: #fecaca;
    margin: 0 0 10px 0;
    font-size: 0.95rem;
}
.rg-block a {
    color: #fca5a5;
    font-weight: 700;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer {
    background: #020a06;
    color: var(--text-muted);
    padding: 4rem 20px 2rem;
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 3rem;
}
.footer-heading {
    color: var(--accent);
    font-size: 1.2rem;
    margin: 0 0 1.5rem 0;
    font-weight: 700;
}
.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-nav li {
    margin-bottom: 0.6rem;
}
.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}
.footer-nav a:hover {
    color: var(--accent);
}
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
}
.footer-disclaimer {
    color: #64748b;
    font-size: 0.85rem;
    max-width: 800px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════
   IMAGE-TEXT SPLIT
   ═══════════════════════════════════════════ */
.image-text-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin: 2rem 0;
}
.image-text-split .content { min-width: 0; }
.image-text-split .image { min-width: 0; }
.content-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.6);
    margin: 1.5rem 0;
    display: block;
    border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   ASTRA OVERRIDES (for WordPress)
   ═══════════════════════════════════════════ */
#masthead, #colophon, .ast-above-header, .ast-below-header { display: none !important; }
.site-content, #content, #page, #primary, #main,
.ast-container, .site-main, .content-area, .entry-content {
    padding: 0 !important; margin: 0 !important; background: transparent !important;
}
.entry-header, .ast-archive-description, .page-header, .ast-breadcrumbs-wrapper { display: none !important; }
.ast-container { max-width: 100% !important; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .image-text-split {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
    .nav-register-mobile {
        display: inline-flex;
        align-items: center;
        margin-left: auto;
        margin-right: 15px;
    }
    .nav-links .nav-register-btn { display: none; }
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        width: 65%;
        height: 100vh;
        background: #022b15;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 999;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
    }
    .nav-links.active { transform: translateX(0); }
    .hero { padding: 2rem 0 4rem; }
    h1 { font-size: 2.2rem; }
    .hero-btn { padding: 12px 20px; font-size: 1rem; }
    .content-section { padding: 2.5rem 0; }
    .games-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .games-grid { grid-template-columns: 1fr; }
}

/* Content-visibility for below-fold sections */
.games-grid, .site-footer, footer {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}
