/*
Theme Name: OntarioGamers
Theme URI: https://ontariogamers.com
Author: OntarioGamers Team
Author URI: https://ontariogamers.com
Description: Custom theme for OntarioGamers.com — Ontario's independent iGaming affiliate review site. Built for casino reviews, slot reviews, and sports betting content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ontariogamers
*/

/* ============================================
   CSS VARIABLES — Brand Colors
   ============================================ */
:root {
    --og-primary: #1a472a;        /* Dark green — Ontario/gaming */
    --og-primary-light: #2d6b42;
    --og-secondary: #f5a623;      /* Gold accent — CTAs */
    --og-secondary-hover: #e09500;
    --og-dark: #1a1a1a;
    --og-text: #333333;
    --og-text-light: #666666;
    --og-bg: #ffffff;
    --og-bg-alt: #f8f9fa;
    --og-border: #e2e8f0;
    --og-success: #22c55e;
    --og-warning: #f59e0b;
    --og-danger: #ef4444;
    --og-radius: 8px;
    --og-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --og-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --og-max-width: 1200px;
    --og-content-width: 800px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--og-text);
    background-color: var(--og-bg);
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--og-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--og-primary-light);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--og-dark);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-top: 2rem; }
h3 { font-size: 1.375rem; margin-top: 1.5rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1.25rem;
}

/* ============================================
   LAYOUT
   ============================================ */
.site-container {
    max-width: var(--og-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding: 2rem 0;
}

.content-area.full-width {
    grid-template-columns: 1fr;
}

@media (max-width: 968px) {
    .content-area {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--og-primary);
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--og-shadow-lg);
}

.header-inner {
    max-width: var(--og-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-logo {
    font-size: 1.55rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.logo-text {
    line-height: 1;
}

.site-logo:hover {
    color: #fff;
}

.site-logo .logo-accent {
    color: var(--og-secondary);
    text-shadow: 0 0 10px rgba(245, 166, 35, 0.4);
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.main-nav a {
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--og-radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--og-secondary);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--og-primary);
        padding: 1rem;
    }
    .main-nav.active {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
    }
    .main-nav a {
        display: block;
        padding: 0.75rem 1rem;
    }
}

/* ============================================
   HERO SECTION (Homepage)
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--og-primary) 0%, #0d2818 100%);
    color: #fff;
    padding: 2.75rem 1.5rem;
    text-align: center;
}

.hero h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   TRUST BADGES
   ============================================ */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 3rem 1.5rem;
    max-width: var(--og-max-width);
    margin: 0 auto;
}

.trust-badge {
    text-align: center;
    padding: 1.5rem;
}

.trust-badge .badge-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.trust-badge h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.trust-badge p {
    font-size: 0.875rem;
    color: var(--og-text-light);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--og-radius);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--og-secondary);
    color: #1a1a1a;
}

.btn-primary:hover {
    background: var(--og-secondary-hover);
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: var(--og-shadow);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    border-color: #fff;
    color: #fff;
}

.btn-play {
    background: var(--og-success);
    color: #fff;
    font-weight: 700;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
}

.btn-play:hover {
    background: #16a34a;
    color: #fff;
    transform: translateY(-1px);
}

.btn-review {
    background: var(--og-bg-alt);
    color: var(--og-primary);
    border: 1px solid var(--og-border);
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
}

.btn-review:hover {
    background: var(--og-primary);
    color: #fff;
}

/* ============================================
   CASINO COMPARISON TABLE
   ============================================ */
.casino-table {
    max-width: var(--og-max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.casino-table h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.casino-card {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--og-bg);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}

.casino-card:hover {
    box-shadow: var(--og-shadow-lg);
}

.casino-card .casino-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--og-radius);
    object-fit: contain;
    background: var(--og-bg-alt);
    padding: 0.5rem;
}

.casino-card .casino-info h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

.casino-card .casino-bonus {
    font-size: 0.9rem;
    color: var(--og-text-light);
    margin-bottom: 0.5rem;
}

.casino-card .casino-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--og-text-light);
}

.casino-card .casino-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.casino-card .casino-disclaimer {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: var(--og-text-light);
    border-top: 1px solid var(--og-border);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .casino-card {
        grid-template-columns: 60px 1fr;
    }
    .casino-card .casino-actions {
        grid-column: 1 / -1;
        flex-direction: row;
    }
}

/* ============================================
   REVIEW PAGE — Quick Info Box
   ============================================ */
.review-box {
    background: var(--og-bg-alt);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.review-box .review-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.review-box .review-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--og-radius);
    object-fit: contain;
}

.review-box .review-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--og-primary);
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: var(--og-radius);
    font-weight: 700;
    font-size: 1.1rem;
}

.review-box .review-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.review-box .review-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--og-border);
    font-size: 0.9rem;
}

.review-box .review-detail strong {
    color: var(--og-dark);
}

/* ============================================
   SLOT REVIEW — Stats Box
   ============================================ */
.slot-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    background: var(--og-bg-alt);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.slot-stat {
    text-align: center;
}

.slot-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--og-primary);
}

.slot-stat .stat-label {
    font-size: 0.8rem;
    color: var(--og-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-widget {
    background: var(--og-bg);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--og-secondary);
}

.sidebar-casino {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--og-border);
}

.sidebar-casino:last-child {
    border-bottom: none;
}

.sidebar-casino img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
}

.sidebar-casino .casino-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.sidebar-casino .casino-short-bonus {
    font-size: 0.75rem;
    color: var(--og-text-light);
}

/* ============================================
   RESPONSIBLE GAMBLING DISCLAIMER
   ============================================ */
.disclaimer-box {
    background: #fef3cd;
    border: 1px solid #ffc107;
    border-radius: var(--og-radius);
    padding: 1.25rem;
    margin: 2rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.disclaimer-box strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--og-dark);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--og-dark);
    color: #ccc;
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: var(--og-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col a {
    color: #aaa;
    font-size: 0.85rem;
}

.footer-col a:hover {
    color: var(--og-secondary);
}

/* ============================================
   SPORTS PICKS
   ============================================ */
.picks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.pick-card {
    background: #fff;
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    padding: 1.25rem;
    box-shadow: var(--og-shadow);
    display: flex;
    flex-direction: column;
}

.pick-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pick-league,
.pick-league a {
    color: var(--og-primary);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.pick-result {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}

.result-pending { background: #fff4d6; color: #8a6d00; }
.result-won     { background: #dcfce7; color: #166534; }
.result-lost    { background: #fee2e2; color: #991b1b; }
.result-push    { background: #e2e8f0; color: #334155; }

.pick-title {
    margin: 0.25rem 0 0.4rem;
    font-size: 1.05rem;
}

.pick-title a {
    color: var(--og-dark);
    text-decoration: none;
}

.pick-title a:hover {
    color: var(--og-primary);
}

.pick-match {
    color: var(--og-text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.pick-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    margin-bottom: 0.95rem;
}

.pick-card .btn {
    margin-top: auto;
}

.pick-summary table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
}

.pick-summary th,
.pick-summary td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--og-border);
}

.pick-summary th {
    width: 35%;
    color: var(--og-text-light);
    font-weight: 600;
}

.footer-disclaimer {
    max-width: var(--og-max-width);
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #888;
}

.footer-bottom {
    max-width: var(--og-max-width);
    margin: 1.5rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.footer-bottom a {
    color: #888;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc {
    background: var(--og-bg-alt);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc h4 {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.toc ol {
    padding-left: 1.25rem;
}

.toc li {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.toc a {
    color: var(--og-text);
}

.toc a:hover {
    color: var(--og-primary);
}

/* ============================================
   ARCHIVE / LISTING PAGES
   ============================================ */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.archive-card {
    background: var(--og-bg);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.archive-card:hover {
    box-shadow: var(--og-shadow-lg);
    transform: translateY(-2px);
}

.archive-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.archive-card .card-content {
    padding: 1.25rem;
}

.archive-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.archive-card p {
    font-size: 0.85rem;
    color: var(--og-text-light);
    margin-bottom: 1rem;
}

/* ============================================
   ARTICLE CONTENT
   ============================================ */
.article-content {
    max-width: var(--og-content-width);
}

.article-content h2 {
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--og-border);
}

.article-content ul, .article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.article-content th, .article-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--og-border);
    text-align: left;
    font-size: 0.9rem;
}

.article-content th {
    background: var(--og-bg-alt);
    font-weight: 600;
}

/* ============================================
   AUTHOR BOX
   ============================================ */
.author-box {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: var(--og-bg-alt);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    padding: 1.5rem;
    margin: 2rem 0;
}

.author-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-box .author-name {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.author-box .author-title {
    font-size: 0.85rem;
    color: var(--og-text-light);
    margin-bottom: 0.5rem;
}

.author-box .author-bio {
    font-size: 0.9rem;
}

/* ============================================
   MOBILE-FIRST RESPONSIVE ENHANCEMENTS
   ============================================ */

/* Prevent any element from forcing horizontal scroll on small screens */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Fluid typography — scales smoothly between phone and desktop */
h1 { font-size: clamp(1.6rem, 5vw, 2.25rem); }
h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.375rem); }
.hero h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
.hero p { font-size: clamp(1rem, 2.5vw, 1.2rem); }

/* Comfortable tap targets (Apple/Google guideline: 44px) */
.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.main-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Menu toggle button — keep it hidden on desktop, only sized for tapping */
.menu-toggle {
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle:active {
    transform: scale(0.92);
}

/* Lock background scroll while the mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Long content tables scroll sideways instead of breaking layout */
.article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

/* ---- Tablet and below (<= 968px) ---- */
@media (max-width: 968px) {
    /* On stacked layouts the sidebar should come after the article */
    .content-area .sidebar {
        position: static;
        order: 2;
    }
    .content-area .article-content {
        order: 1;
    }
}

/* ---- Mobile (<= 768px) ---- */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .site-container,
    .header-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Mobile nav drawer: always rendered, smoothly slides/fades in */
    .main-nav {
        display: block;
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        box-shadow: var(--og-shadow-lg);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }
    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .main-nav a {
        font-size: 1rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* Hero CTAs become full-width, easy-to-tap stacked buttons */
    .hero {
        padding: 2.5rem 1rem;
    }
    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-ctas .btn {
        width: 100%;
    }

    /* Review header stacks logo above title */
    .review-box .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* Casino card meta wraps instead of overflowing */
    .casino-card .casino-meta {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

    /* Author box stacks avatar above text */
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Footer bottom stacks copyright above links */
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .trust-badges {
        padding: 2rem 1rem;
    }
}

/* ---- Small phones (<= 480px) ---- */
@media (max-width: 480px) {
    /* Single-column casino card — logo and info stack cleanly */
    .casino-card {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 1rem;
    }
    .casino-card .casino-logo {
        width: 64px;
        height: 64px;
    }
    .casino-card .casino-actions {
        flex-direction: column;
    }
    .casino-card .casino-actions .btn {
        width: 100%;
    }

    /* Review detail rows stack label above value */
    .review-box .review-detail {
        flex-direction: column;
        gap: 0.15rem;
    }

    /* Slightly tighter section padding */
    .casino-table,
    .review-box {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h2 { margin-top: 1.5rem; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
