
/* =========================================
   1. Reset & Normalization
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%; /* 16px default */
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

:root {
    /* Color Palette */
    --color-primary: #1a253a; /* Deep Navy */
    --color-primary-dark: #0f1724;
    --color-accent: #7eac2f; /* Betting Green */
    --color-accent-hover: #95cc39;
    --color-secondary: #276aa5; /* Trusted Blue */
    --color-text-main: #2c3e50;
    --color-text-light: #f4f7f6;
    --color-text-muted: #64748b;
    --color-bg-body: #f0f2f5;
    --color-bg-card: #ffffff;
    --color-border: #e2e8f0;
    
    /* Typography */
    --font-primary: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fs-h1: clamp(2rem, 5vw, 3rem);
    --fs-h2: clamp(1.5rem, 3vw, 2.25rem);
    --fs-body: 1rem;
    
    /* Spacing & Layout */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --container-width: 1200px;
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 2rem;
    
    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-neon: 0 0 15px rgba(126, 172, 47, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    font-size: var(--fs-body);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

/* =========================================
   2. Layout & Container
   ========================================= */
.ast-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

#content {
    padding: var(--spacing-md) 0;
    width: 100%;
}

/* =========================================
   3. Header Styling
   ========================================= */
.site-header {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.ast-builder-grid-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
}

/* Logo */
.site-branding img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.2));
}

/* Navigation */
.main-header-menu {
    display: flex;
    gap: var(--spacing-sm);
}

.main-header-menu .menu-link {
    color: var(--color-text-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.main-header-menu .menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.main-header-menu .menu-link:hover {
    color: var(--color-accent);
    background: rgba(255,255,255,0.05);
}

.main-header-menu .menu-link:hover::after {
    width: 100%;
}

/* =========================================
   4. Buttons (Call to Action)
   ========================================= */
/* Overriding inline styles and plugin classes for a cohesive look */
a[class*="maxbutton"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.8em 1.5em !important;
    height: auto !important;
    width: auto !important;
    border-radius: var(--radius-md) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition) !important;
    box-shadow: var(--shadow-md) !important;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
    border: none !important;
}

a[class*="maxbutton"] .mb-text {
    padding: 0 !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
}

/* Login Button style */
.maxbutton-2 {
    background-color: var(--color-secondary) !important;
}

/* Registration Button style (Green) */
.maxbutton-1, .maxbutton-4 {
    background-color: var(--color-accent) !important;
    box-shadow: var(--shadow-neon) !important;
    animation: pulse 2s infinite;
}

a[class*="maxbutton"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg) !important;
    filter: brightness(1.1);
}

a[class*="maxbutton"]:active {
    transform: translateY(0);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(126, 172, 47, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(126, 172, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(126, 172, 47, 0); }
}

/* =========================================
   5. Main Content Area
   ========================================= */
#primary {
    flex: 3;
    min-width: 300px; /* Fallback */
}

.site-main article {
    background: var(--color-bg-card);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-md);
}

/* Typography in Content */
h1.entry-title {
    font-size: var(--fs-h1);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    text-align: center;
}

h2 {
    font-size: var(--fs-h2);
    color: var(--color-primary);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    margin-top: 0.5rem;
    border-radius: 2px;
}

h2[style*="text-align: center"]::after {
    margin: 0.5rem auto 0;
}

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

/* Lists in content */
.entry-content ul, .entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.entry-content ul li::marker {
    color: var(--color-accent);
    font-size: 1.2em;
}

/* Images in content */
.entry-content img {
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.entry-content img:hover {
    transform: scale(1.01);
}

/* =========================================
   6. Sidebar styling
   ========================================= */
#secondary {
    flex: 1;
    min-width: 280px;
}

.widget-area .widget {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.widget-area .widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.widget-area img {
    width: 100%;
    border-radius: var(--radius-sm);
}

/* =========================================
   7. Form Elements (Generic & Specific)
   ========================================= */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: #f9fafb;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-secondary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(39, 106, 165, 0.2);
}

/* =========================================
   8. Footer Styling
   ========================================= */
.site-footer {
    background-color: var(--color-primary-dark);
    color: #a0aec0;
    padding-top: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    border-top: 4px solid var(--color-accent);
}

.site-above-footer-inner-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm) var(--spacing-md);
}

.site-footer .widget-title {
    color: var(--color-text-light);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.site-footer ul li {
    margin-bottom: 0.5rem;
}

.site-footer ul li a {
    color: #a0aec0;
    transition: var(--transition);
}

.site-footer ul li a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.site-below-footer-wrap {
    background-color: rgba(0,0,0,0.2);
    padding: var(--spacing-sm) 0;
    text-align: center;
    font-size: 0.9rem;
}

/* =========================================
   9. Mobile & Responsive Design
   ========================================= */
@media (max-width: 921px) {
    .ast-container {
        flex-direction: column;
    }

    #secondary {
        order: 2;
    }
    
    .ast-desktop-header {
        display: none; /* Theme likely handles this, but ensures cleanup */
    }
    
    /* Mobile Menu Styling override if visible */
    .ast-mobile-header-wrap .main-header-bar {
        background-color: var(--color-primary);
        padding: 10px;
    }
    
    .ast-mobile-menu-trigger-minimal {
        color: white;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
    }

    /* Hide complex header elements on mobile, assume hamburger is active */
    .ast-builder-menu-1 {
        display: none; 
    }

    /* Stack buttons in header if they appear */
    .site-header-below-section-right {
        display: none;
    }

    h1.entry-title {
        font-size: 2rem;
    }

    a[class*="maxbutton"] {
        width: 100% !important;
        margin-bottom: 10px;
    }
}

/* =========================================
   10. Scroll to Top Button
   ========================================= */
#ast-scroll-top {
    background-color: var(--color-secondary);
    color: white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0.8;
}

#ast-scroll-top:hover {
    background-color: var(--color-accent);
    transform: translateY(-5px);
    opacity: 1;
}

/* =========================================
   11. Utility Classes & Extras
   ========================================= */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

/* Table styling just in case */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background: white;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

th {
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
}

tr:hover {
    background-color: #f1f5f9;
}
