/*
Theme Name:  AwayDay Planner
Theme URI:   https://example.com
Description: A dark football-themed WordPress theme for the AwayDay Planner application.
Version:     1.0.0
Author:      AwayDay
Text Domain: awayday-theme
*/

/* ═══════════════════════════════════════════════════════════════════
   DESIGN SYSTEM
═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800;900&family=Barlow:wght@400;500;600;700&display=swap');

:root {
    --navy:        #0a1628;
    --navy2:       #0f2040;
    --navy3:       #1a3a5c;
    --green:       #00c851;
    --green2:      #00a040;
    --white:       #ffffff;
    --text:        #c8daf0;
    --text-dim:    #6a8aaa;
    --accent:      #ffb800;
    --radius:      10px;
    --radius-lg:   16px;
    --max-width:   1200px;
    --transition:  .25s ease;

    /* Plugin-compatible aliases */
    --ad-navy:      var(--navy);
    --ad-card:      #1a2332;
    --ad-white:     var(--white);
    --ad-text-dim:  var(--text-dim);
    --ad-green:     var(--green);
    --ad-blue:      #003da5;
}

/* ── Light Mode ─────────────────────────────────────────────────── */
body.light-mode {
    /* Override the CSS variables so everything using them automatically adapts */
    --navy:        #f0f4f8;
    --navy2:       #e8eef5;
    --navy3:       #d0dcec;
    --white:       #1a2332;
    --text:        #1a2332;
    --text-dim:    #4a6080;
    --accent:      #ffb800;

    /* Plugin CSS variable overrides */
    --ad-navy:     #f0f4f8;
    --ad-navy2:    #e8eef5;
    --ad-navy3:    #d0dcec;
    --ad-card:     #ffffff;
    --ad-white:    #1a2332;
    --ad-text-dim: #4a6080;
    --ad-blue:     #0055cc;

    background: #f0f4f8;
    color: #1a2332;
}

body.light-mode .site-header {
    background: rgba(240,244,248,.96) !important;
    border-bottom-color: #d0dcec;
}

body.light-mode .site-header a,
body.light-mode .site-logo,
body.light-mode .nav-links a { color: #1a2332 !important; }
body.light-mode .nav-links a:hover { color: #006633 !important; }

body.light-mode .site-footer {
    background: #e2eaf2;
    border-top-color: #d0dcec;
}

/* Stat card values — use dark blue for contrast on light bg */
body.light-mode .ad-club-stat-val { color: #003da5 !important; }
body.light-mode .ad-club-stat-lbl { color: #4a6080 !important; }

/* All text headings */
body.light-mode h1, body.light-mode h2,
body.light-mode h3, body.light-mode h4,
body.light-mode .ad-club-name,
body.light-mode strong { color: #1a2332; }

body.light-mode p,
body.light-mode .ad-club-desc { color: #3a5070; }

/* Hardcoded inline background overrides */
body.light-mode [style*="background:#1a2332"],
body.light-mode [style*="background:#0f1729"],
body.light-mode [style*="background:#0a1628"],
body.light-mode [style*="background: #1a2332"],
body.light-mode [style*="background: #0f1729"],
body.light-mode [style*="background: #0a1628"] {
    background: #ffffff !important;
    border-color: #d0dcec !important;
}

/* Text on those dark-bg elements */
body.light-mode [style*="background:#1a2332"] *,
body.light-mode [style*="background:#0f1729"] *,
body.light-mode [style*="background: #1a2332"] *,
body.light-mode [style*="background: #0f1729"] * {
    color: #1a2332 !important;
}

/* Inputs and forms */
body.light-mode input,
body.light-mode textarea,
body.light-mode select {
    background: #f8fafc !important;
    border-color: #b0c4d8 !important;
    color: #1a2332 !important;
}

/* Buttons */
body.light-mode .ad-btn-outline {
    border-color: #b0c4d8;
    color: #1a2332;
}

/* Tabs */
body.light-mode .ad-stadium-tab { color: #4a6080; }
body.light-mode .ad-stadium-tab.active { color: #006633; border-bottom-color: #006633; }
body.light-mode .ad-stadium-tabs { border-bottom-color: #d0dcec; }

/* Nav toggle button */
body.light-mode .ad-theme-toggle { border-color: #b0c4d8; color: #3a5070; }

/* Green text should stay readable */
body.light-mode .ad-green-text,
body.light-mode [style*="color:#00c851"],
body.light-mode [style*="color: #00c851"] { color: #007a30 !important; }

/* Nearby cards */
body.light-mode .ad-nearby-card {
    background: #f0f4f8 !important;
    border-color: #d0dcec !important;
    color: #1a2332 !important;
}

/* Progress bar track */
body.light-mode .ad-progress-bar { background: #d0dcec; }

/* Links */
body.light-mode a { color: #003da5; }
body.light-mode a:hover { color: #00a040; }

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Barlow', sans-serif;
    background: var(--navy);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
}
img { max-width: 100%; display: block; }
a   { color: var(--green); transition: color var(--transition); }
a:hover { color: var(--green2); }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
}

/* ── Layout ─────────────────────────────────────────────────────── */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-main    { flex: 1; }
.container    { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ═══════════════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.07);
    transition: background var(--transition);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 88px;
    padding: 0 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-main {
    display: block;
    height: 72px;
    width: auto;
    object-fit: contain;
}
@media (max-width: 768px) {
    .logo-main { height: 56px; }
}
@media (max-width: 420px) {
    .logo-main { height: 46px; }
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}
.main-nav a {
    display: block;
    padding: 8px 16px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.main-nav a:hover { background: rgba(255,255,255,.05); color: var(--white); }
.main-nav .nav-cta a {
    background: var(--green);
    color: var(--navy) !important;
    padding: 8px 20px;
}
.main-nav .nav-cta a:hover { background: var(--green2); }

/* Hamburger (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 88px; left: 0; right: 0;
        background: var(--navy2);
        border-bottom: 1px solid var(--navy3);
        padding: 12px 24px 20px;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
    .main-nav a { padding: 12px 16px; }
}

/* ═══════════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 88px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 40%, rgba(0,200,81,.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 20% 80%, rgba(0,80,200,.1) 0%, transparent 60%),
        linear-gradient(160deg, #0a1628 0%, #071020 100%);
}

/* Light mode hero — flip to light background */
body.light-mode .hero-bg {
    background:
        radial-gradient(ellipse 80% 60% at 70% 40%, rgba(0,200,81,.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 20% 80%, rgba(0,80,200,.06) 0%, transparent 60%),
        linear-gradient(160deg, #e8eef5 0%, #dde6f0 100%);
}
body.light-mode .hero-headline { color: #1a2332; }
body.light-mode .hero-sub      { color: #3a5070; }
body.light-mode .hero-tag      { color: #3a5070; background: rgba(0,0,0,.06); }
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.5) 30%, rgba(0,0,0,.5) 70%, transparent);
}
.hero-pitch-lines {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 200px;
    background:
        linear-gradient(to top, rgba(0,200,81,.04) 0%, transparent 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px;
    width: 100%;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,200,81,.1);
    border: 1px solid rgba(0,200,81,.3);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--green);
    margin-bottom: 24px;
}
.hero-tag::before { content: '⚽'; font-size: .9rem; }
.hero-headline {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1;
    color: var(--white);
    margin-bottom: 12px;
    max-width: 750px;
}
.hero-headline .line-green { color: var(--green); }
.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text);
    max-width: 520px;
    margin-bottom: 36px;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green);
    color: var(--navy) !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 30px;
    border-radius: var(--radius);
    transition: all var(--transition);
    box-shadow: 0 0 30px rgba(0,200,81,.25);
}
.btn-hero-primary:hover {
    background: var(--green2);
    transform: translateY(-2px);
    box-shadow: 0 4px 40px rgba(0,200,81,.35);
}
.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--white) !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 13px 28px;
    border-radius: var(--radius);
    border: 2px solid rgba(255,255,255,.2);
    transition: all var(--transition);
}
.btn-hero-outline:hover {
    border-color: rgba(255,255,255,.5);
    background: rgba(255,255,255,.05);
}
.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 56px;
    flex-wrap: wrap;
}
.hero-stat { }
.hero-stat-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1;
}
.hero-stat-num span { color: var(--green); }
.hero-stat-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-dim);
    font-weight: 600;
    margin-top: 3px;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════════════════════════ */
section { padding: 90px 0; }

.section-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--green);
    margin-bottom: 12px;
}
.section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--white);
}
.section-sub {
    font-size: 1.05rem;
    color: var(--text);
    max-width: 540px;
    line-height: 1.7;
}
.section-title-center, .section-sub-center {
    text-align: center;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

/* ── The 92 section ─────────────────────────────────────────────── */
.the-92 {
    background: var(--navy2);
    border-top: 1px solid var(--navy3);
    border-bottom: 1px solid var(--navy3);
}
.the-92-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
@media (max-width: 768px) { .the-92-inner { grid-template-columns: 1fr; } }

.the-92-steps { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.the-92-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.step-num {
    flex-shrink: 0;
    width: 36px; height: 36px;
    background: rgba(0,200,81,.12);
    border: 1px solid rgba(0,200,81,.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: .95rem;
    color: var(--green);
}
.step-content strong { display: block; color: var(--white); font-weight: 700; margin-bottom: 3px; }
.step-content span   { font-size: .88rem; color: var(--text-dim); }

.the-92-visual {
    background: var(--navy);
    border: 1px solid var(--navy3);
    border-radius: var(--radius-lg);
    padding: 28px;
}
.league-preview { display: flex; flex-direction: column; gap: 16px; }
.lp-row {
    display: grid;
    grid-template-columns: 130px 1fr 40px;
    align-items: center;
    gap: 12px;
}
.lp-name { font-size: .82rem; font-weight: 700; color: var(--text); }
.lp-bar-wrap { background: var(--navy3); border-radius: 50px; height: 8px; overflow: hidden; }
.lp-bar      { height: 100%; border-radius: 50px; background: linear-gradient(90deg, var(--green2), var(--green)); }
.lp-count    { font-size: .78rem; color: var(--text-dim); text-align: right; }

/* ── Features ───────────────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 50px;
}
.feature-card {
    background: var(--navy2);
    border: 1px solid var(--navy3);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: transform var(--transition), border-color var(--transition);
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0,200,81,.3);
}
.feature-icon {
    width: 48px; height: 48px;
    background: rgba(0,200,81,.1);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
}
.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--white);
}
.feature-card p {
    font-size: .88rem;
    color: var(--text-dim);
    line-height: 1.65;
}

/* ── CTA ────────────────────────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, var(--navy2), rgba(0,200,81,.06) 100%);
    border-top: 1px solid var(--navy3);
    text-align: center;
}
.cta-section .section-title { font-size: clamp(2rem, 5vw, 3.5rem); }
.cta-section .section-sub {
    text-align: center;
    margin: 0 auto 36px;
}
.cta-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════
   INNER PAGES
═══════════════════════════════════════════════════════════════════ */
.page-hero {
    background: var(--navy2);
    border-bottom: 1px solid var(--navy3);
    padding: 120px 0 50px;
}
.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 10px;
}
.page-hero p { color: var(--text-dim); font-size: 1.05rem; }
.page-content { padding: 50px 0 80px; }

/* WordPress content */
.entry-content h2, .entry-content h3 { margin: 28px 0 12px; }
.entry-content p  { margin-bottom: 16px; color: var(--text); }
.entry-content ul, .entry-content ol { margin: 0 0 16px 24px; color: var(--text); }
.entry-content a  { color: var(--green); }

/* ── Login / Register ────────────────────────────────────────────── */
.login-page, .register-page {
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
}
.auth-card {
    background: var(--navy2);
    border: 1px solid var(--navy3);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
}
.auth-card h1 {
    font-size: 1.8rem;
    margin-bottom: 6px;
}
.auth-card .auth-sub {
    color: var(--text-dim);
    font-size: .9rem;
    margin-bottom: 28px;
}

/* WP default form overrides */
#loginform, #registerform {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}
#loginform p > label, #registerform p > label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .06em;
}
#loginform input[type="text"],
#loginform input[type="password"],
#registerform input[type="text"],
#registerform input[type="email"],
#registerform input[type="password"] {
    background: var(--navy) !important;
    border: 1px solid var(--navy3) !important;
    border-radius: var(--radius) !important;
    color: var(--white) !important;
    padding: 10px 14px !important;
    font-size: .95rem !important;
}
#wp-submit, #registersubmit {
    background: var(--green) !important;
    border-color: var(--green) !important;
    color: var(--navy) !important;
    font-weight: 700 !important;
    border-radius: var(--radius) !important;
    padding: 10px 24px !important;
    font-size: .95rem !important;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════════ */
.site-footer {
    background: var(--navy2);
    border-top: 1px solid var(--navy3);
    padding: 50px 0 24px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand p { font-size: .88rem; color: var(--text-dim); margin-top: 14px; max-width: 280px; }
.footer-col h4 {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-dim);
    margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
    font-size: .88rem;
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}
.footer-col a:hover { color: var(--green); }
.footer-bottom {
    border-top: 1px solid var(--navy3);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
    color: var(--text-dim);
    flex-wrap: wrap;
    gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .hero-actions { flex-direction: column; }
    .btn-hero-primary, .btn-hero-outline { width: 100%; justify-content: center; }
    .cta-actions { flex-direction: column; align-items: center; }
}

/* ── Custom logo (uploaded via Customizer) ──────────────────────────────── */
.site-logo .custom-logo-link,
.site-logo .custom-logo-link img {
    display: block;
    height: 44px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}
/* Hide mobile-only icon variant when custom logo is active */
.site-logo:has(.custom-logo-link) .logo-icon-only { display: none; }
@media (max-width: 480px) {
    .site-logo .custom-logo-link img { max-width: 160px; }
}

.nav-has-dropdown { position: relative; }
.nav-dropdown {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--ad-navy, #0f1729);
    border: 1px solid var(--ad-blue, #003da5);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 210px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    list-style: none;
    margin: 0;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
}
.nav-dropdown li { display: block; }
.nav-dropdown li a {
    display: block;
    padding: 10px 16px;
    color: #e0e0e0;
    font-size: .9rem;
    white-space: nowrap;
    transition: background .15s;
    text-decoration: none;
}
.nav-dropdown li a:hover { background: var(--ad-blue, #003da5); color: #fff; }
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown { display: flex !important; }

@media (max-width: 768px) {
    .nav-dropdown {
        position: static !important;
        border: none;
        box-shadow: none;
        background: rgba(0,0,0,.2);
        border-radius: 0;
        padding-left: 16px;
        display: flex !important;
    }
}
