/*
Theme Name: Football Predictions
Theme URI: https://example.com/football-predictions
Author: Your Name
Author URI: https://example.com
Description: A full WordPress theme for football (soccer) prediction sites, with a built-in backend for managing match predictions and football news. Includes custom post types for Predictions and News, meta boxes for match data, a shortcode, a widget, and responsive front-end templates.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: football-predictions
Tags: sports, football, soccer, predictions, news, custom-post-type, responsive
*/

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

:root{
    --fp-green: #0b8f4c;
    --fp-green-dark: #076536;
    --fp-dark: #10161b;
    --fp-dark-2: #1a2229;
    --fp-light: #f4f6f5;
    --fp-border: #e2e6e4;
    --fp-win: #0b8f4c;
    --fp-lose: #c0392b;
    --fp-void: #8a8f98;
    --fp-pending: #d68910;
    --fp-radius: 10px;
    --fp-shadow: 0 2px 10px rgba(0,0,0,.06);
    --fp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--fp-font);
    color: #222;
    background: var(--fp-light);
    line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fp-green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }
h1,h2,h3,h4 { line-height: 1.25; margin: 0 0 .5em; }
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px,1px,1px,1px);
    width: 1px; height: 1px; overflow: hidden;
}

/* ==========================================================================
   2. Layout
   ========================================================================== */
.fp-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}
.fp-site-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 36px;
    padding: 40px 0 60px;
}
@media (max-width: 900px){
    .fp-site-content { grid-template-columns: 1fr; }
}

/* ==========================================================================
   3. Header
   ========================================================================== */
.fp-header {
    background: var(--fp-dark);
    color: #fff;
}
.fp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    flex-wrap: wrap;
    gap: 14px;
}
.fp-logo a {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .3px;
}
.fp-logo a:hover { text-decoration: none; color: var(--fp-green); }
.fp-logo img { max-height: 44px; }

.fp-primary-nav ul { display: flex; gap: 22px; flex-wrap: wrap; }
.fp-primary-nav a {
    color: #d7dde0;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.fp-primary-nav a:hover { color: var(--fp-green); text-decoration: none; }
.fp-primary-nav .current-menu-item > a { color: var(--fp-green); }

.fp-menu-toggle {
    display: none;
    background: none;
    border: 1px solid #3a444c;
    color: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}
@media (max-width: 780px){
    .fp-menu-toggle { display: inline-block; }
    .fp-primary-nav { display: none; width: 100%; }
    .fp-primary-nav.is-open { display: block; }
    .fp-primary-nav ul { flex-direction: column; gap: 0; }
    .fp-primary-nav a { display: block; padding: 10px 0; border-bottom: 1px solid #2a333a; }
}

/* ==========================================================================
   4. Cards: Predictions
   ========================================================================== */
.fp-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.fp-section-title h2 { font-size: 20px; }
.fp-section-title .fp-see-all { font-size: 13px; font-weight: 700; text-transform: uppercase; }

.fp-prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
    gap: 18px;
    margin-bottom: 40px;
}

.fp-card {
    background: #fff;
    border-radius: var(--fp-radius);
    box-shadow: var(--fp-shadow);
    border: 1px solid var(--fp-border);
    overflow: hidden;
}

.fp-prediction-card { display: flex; flex-direction: column; }
.fp-prediction-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--fp-dark);
    color: #cfd6da;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.fp-prediction-card__league { color: var(--fp-green); font-weight: 700; }
.fp-prediction-card__body { padding: 16px; }
.fp-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: center;
    margin-bottom: 14px;
}
.fp-team { flex: 1; }
.fp-team img { width: 42px; height: 42px; object-fit: contain; margin: 0 auto 6px; }
.fp-team span { display: block; font-weight: 700; font-size: 14px; }
.fp-vs { font-weight: 800; color: #9aa1a6; font-size: 13px; padding-top: 20px; }

.fp-tip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--fp-light);
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}
.fp-tip-row strong { color: var(--fp-green-dark); }

.fp-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
}
.fp-status--upcoming { background: var(--fp-pending); }
.fp-status--won { background: var(--fp-win); }
.fp-status--lost { background: var(--fp-lose); }
.fp-status--void { background: var(--fp-void); }

.fp-prediction-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--fp-border);
    font-size: 13px;
    color: #666;
}
.fp-confidence-bar {
    width: 90px;
    height: 6px;
    background: var(--fp-border);
    border-radius: 4px;
    overflow: hidden;
}
.fp-confidence-bar span { display: block; height: 100%; background: var(--fp-green); }

/* Single prediction */
.fp-single-prediction .fp-match-hero {
    background: var(--fp-dark);
    color: #fff;
    border-radius: var(--fp-radius);
    padding: 30px 20px;
    margin-bottom: 24px;
}
.fp-single-prediction .fp-teams span { color: #fff; }
.fp-single-prediction .fp-match-hero .fp-vs { color: #cfd6da; }
.fp-match-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
    gap: 12px;
    margin: 20px 0;
}
.fp-match-facts div {
    background: #fff;
    border: 1px solid var(--fp-border);
    border-radius: 8px;
    padding: 12px 14px;
}
.fp-match-facts .fp-fact-label { font-size: 11px; text-transform: uppercase; color: #888; display: block; margin-bottom: 4px; }
.fp-match-facts .fp-fact-value { font-weight: 700; font-size: 15px; }

/* ==========================================================================
   5. News
   ========================================================================== */
.fp-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
    gap: 18px;
    margin-bottom: 40px;
}
.fp-news-card__thumb { aspect-ratio: 16/10; overflow: hidden; background: #dfe3e1; }
.fp-news-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.fp-news-card__body { padding: 14px 16px; }
.fp-news-card__cat { font-size: 11px; text-transform: uppercase; font-weight: 800; color: var(--fp-green-dark); }
.fp-news-card__body h3 { font-size: 16px; margin: 6px 0; }
.fp-news-card__meta { font-size: 12px; color: #888; }

.fp-single-news .fp-featured-image { border-radius: var(--fp-radius); overflow: hidden; margin-bottom: 20px; }
.fp-single-news .fp-entry-meta { color: #888; font-size: 13px; margin-bottom: 20px; }
.fp-single-news .fp-entry-content { font-size: 16px; }
.fp-single-news .fp-entry-content p { margin: 0 0 1.2em; }

/* ==========================================================================
   6. Sidebar / Widgets
   ========================================================================== */
.fp-widget {
    background: #fff;
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 18px;
    margin-bottom: 22px;
    box-shadow: var(--fp-shadow);
}
.fp-widget h3 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 2px solid var(--fp-green);
    padding-bottom: 8px;
    margin-bottom: 14px;
}
.fp-widget-prediction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--fp-border);
    font-size: 13px;
}
.fp-widget-prediction:last-child { border-bottom: none; }
.fp-widget-news li { padding: 10px 0; border-bottom: 1px solid var(--fp-border); font-size: 14px; }
.fp-widget-news li:last-child { border-bottom: none; }

/* ==========================================================================
   7. Filters
   ========================================================================== */
.fp-filters { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.fp-filters a {
    padding: 6px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--fp-border);
    font-size: 13px;
    font-weight: 700;
    color: #444;
}
.fp-filters a.is-active,
.fp-filters a:hover { background: var(--fp-green); color: #fff; border-color: var(--fp-green); }

/* ==========================================================================
   8. Pagination / Footer / Misc
   ========================================================================== */
.fp-pagination { display: flex; gap: 8px; margin: 20px 0 40px; }
.fp-pagination a, .fp-pagination span {
    padding: 8px 14px; border-radius: 6px; background: #fff; border: 1px solid var(--fp-border); font-size: 13px;
}
.fp-pagination .current { background: var(--fp-green); color: #fff; border-color: var(--fp-green); }

.fp-footer {
    background: var(--fp-dark);
    color: #9aa1a6;
    padding: 34px 0;
    margin-top: 30px;
    font-size: 13px;
}
.fp-footer a { color: #cfd6da; }
.fp-footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

.fp-empty { padding: 30px; text-align: center; color: #888; background: #fff; border-radius: var(--fp-radius); border: 1px dashed var(--fp-border); }

.fp-search-form { display: flex; gap: 6px; }
.fp-search-form input[type="search"] {
    flex: 1; padding: 8px 10px; border: 1px solid var(--fp-border); border-radius: 6px;
}
.fp-search-form button {
    background: var(--fp-green); color: #fff; border: none; border-radius: 6px; padding: 8px 14px; cursor: pointer;
}
