/*
Theme Name: Pea - Newspaper News and Magazine Theme
Theme URI: https://example.com/football-predictions
Author: Pea Edward
Author URI: https://example.com
Description: Pea is a WordPress Newspaper, News and Magazine theme built for football (soccer) prediction and sports news sites. Includes custom post types for Predictions and News, meta boxes for match data, a shortcode, a widget, and responsive front-end templates.
Version: 2.9.1
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, newspaper, magazine, custom-background, custom-menu, featured-images, theme-options, custom-colors, translation-ready, threaded-comments, 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-radius: 10px;
    --fp-shadow: 0 2px 10px rgba(0,0,0,.06);
    --fp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Customizer-controlled typography (see Appearance → Customize → Typography). */
    --fp-heading-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --fp-font-size-base: 16px;
    --fp-line-height-base: 1.6;
    --fp-heading-weight: 700;

    /* Customizer-controlled colors (see Appearance → Customize → Theme Colors).
       Defaults below intentionally match the theme's original hardcoded
       colors, so nothing changes visually until a color is edited. */
    --fp-highlight: #0b8f4c;      /* Global Highlight Color */
    --fp-accent-text: #076536;    /* Accent Color (Text) */
    --fp-primary-hover: #076536;  /* Hover - Primary Color */
    --fp-accent-hover: #076536;   /* Hover - Accent Color */
    --fp-text: #000000;           /* Text Color */
    --fp-heading: #000000;        /* Text Color for Header 1,2,3 */
    --fp-link: #0000ee;           /* Hyperlink Color */
    --fp-link-hover: #ff0000;     /* Link Hover Color */
    --fp-meta: #000000;           /* Entry Meta color (incl. post date) */
    --fp-body-bg: #f4f6f5;        /* Body Background Color */
    --fp-single-bg: #f4f6f5;      /* Body Background for Single Post Color */
}

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--fp-font);
    font-size: var(--fp-font-size-base);
    color: var(--fp-text);
    background: var(--fp-body-bg);
    line-height: var(--fp-line-height-base);
}
body.single-fp_prediction,
body.single-fp_news,
body.single {
    background: var(--fp-single-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fp-link); text-decoration: none; }
a:hover { color: var(--fp-link-hover); text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }
h1,h2,h3,h4 { line-height: 1.25; margin: 0 0 .5em; font-family: var(--fp-heading-font); font-weight: var(--fp-heading-weight); }
h1, h2, h3 { color: var(--fp-heading); }
.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-primary-hover); }
.fp-logo img { max-height: 44px; }

.fp-header-actions{ display: flex; align-items: center; gap: 14px; margin-left: auto; }

.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-primary-hover); text-decoration: none; }
.fp-primary-nav .current-menu-item > a { color: var(--fp-highlight); }

.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; }
}
@media (max-width: 480px){
    .fp-header-actions .fp-social-icons{ display: none; }
}

/* ==========================================================================
   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; color: var(--fp-accent-text); }
.fp-section-title .fp-see-all:hover { color: var(--fp-accent-hover); }

.fp-prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%),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;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 10px 16px;
    background: var(--fp-dark);
    color: #cfd6da;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.fp-prediction-card__league { background: #000000; color: #ffffff; font-weight: 700; padding: 3px 10px; border-radius: 4px; display: inline-block; min-width: 0; flex: 0 1 auto; }
.fp-prediction-card__meta > span:last-child { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }
.fp-prediction-card__league:hover { background: #000000; color: #ffffff; }
.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; min-width: 0; }
.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; overflow-wrap: break-word; }
.fp-vs { font-weight: 800; color: #000000; 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-accent-text); }

.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: #000000; }
.fp-status--won { background: var(--fp-win); }
.fp-status--lost { background: var(--fp-lose); }
.fp-status--void { background: var(--fp-void); }
.fp-status--expired { background: var(--fp-void, #8a8f98); opacity: .85; }

.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: var(--fp-meta);
}
.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-highlight); }

/* 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-match-hero .fp-teams span { color: #fff; }
.fp-single-prediction .fp-match-hero .fp-vs { color: #ffffff; }
/* Country / league line sits on the dark hero panel, so it must stay light. */
.fp-single-prediction .fp-match-hero__league { color: #ffffff; }
.fp-match-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(150px, 100%),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(min(260px, 100%),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: #000000; }
.fp-news-card,
.fp-news-card h3,
.fp-news-card h3 a,
.fp-news-card p { color: #000000; }

.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; }

.fp-entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.5em;
    font-size: 15px;
    overflow-x: auto;
    display: block;
}
.fp-entry-content table thead { background: var(--fp-dark); }
.fp-entry-content table th {
    color: #fff;
    text-align: left;
    font-weight: 700;
    padding: 12px 14px;
    border: 1px solid var(--fp-dark);
}
.fp-entry-content table td {
    padding: 12px 14px;
    border: 1px solid var(--fp-border);
    vertical-align: top;
    line-height: 1.5;
}
.fp-entry-content table tbody tr:nth-child(even) { background: var(--fp-light); }
.fp-entry-content table tbody tr:hover { background: #eef1ef; }
@media (max-width: 640px) {
    .fp-entry-content table { font-size: 13px; }
    .fp-entry-content table th,
    .fp-entry-content table td { padding: 8px 10px; }
}

/* ==========================================================================
   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: #ffffff;
    padding: 26px 0;
    margin-top: 30px;
    font-size: 13px;
}
.fp-footer a { color: #ffffff; }
.fp-footer-inner { display: flex; flex-direction: column; gap: 18px; }

.fp-footer-nav {
    padding-bottom: 18px;
    border-bottom: 1px solid #2a333a;
}
.fp-footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.fp-footer-nav li { display: flex; align-items: center; }
.fp-footer-nav li:not(:last-child)::after {
    content: "▪";
    font-size: 7px;
    color: #5b646b;
    margin: 0 14px;
}
.fp-footer-nav a {
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
}
.fp-footer-nav a:hover { color: var(--fp-primary-hover); text-decoration: none; }

.fp-footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
@media (max-width: 560px) {
    .fp-footer-nav ul { gap: 8px 0; }
    .fp-footer-nav li:not(:last-child)::after { margin: 0 10px; }
    .fp-footer-nav { text-align: center; }
    .fp-footer-bottom-row { justify-content: center; text-align: center; }
}

.fp-empty { padding: 30px; text-align: center; color: #000000; 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;
}

/* ==========================================================================
   9. Share on Socials
   ========================================================================== */
.fp-share-links{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 26px 0;
    padding: 16px;
    background: var(--fp-light);
    border-radius: var(--fp-radius);
    border: 1px solid var(--fp-border);
}
.fp-share-label{ font-weight: 700; font-size: 13px; color: var(--fp-text); margin-right: 4px; }
.fp-share-links a{
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--fp-border);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--fp-text);
}
.fp-share-links a:hover{ background: var(--fp-highlight); color: #fff; border-color: var(--fp-highlight); text-decoration: none; }

/* ==========================================================================
   10. Elementor / full-width page support
   ========================================================================== */
.fp-full-width-page{ width: 100%; }
.fp-elementor-article .elementor{ margin: 0; }
/* Let Elementor's own section/column width & "stretch section" controls
   work exactly as in the editor — no prose max-width or padding imposed
   by the theme on Elementor-built content. */
body.elementor-page .fp-entry-content,
.fp-elementor-article > .elementor{
    max-width: none;
    font-size: inherit;
}
.fp-page-title{ font-size: 32px; }

/* ==========================================================================
   11. Load More / Infinite Scroll
   ========================================================================== */
.fp-load-more-wrap{ text-align: center; margin: 10px 0 40px; }
.fp-load-more-btn{
    background: var(--fp-highlight);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}
.fp-load-more-btn:hover{ background: var(--fp-primary-hover); }
.fp-load-more-btn:disabled{ opacity: .7; cursor: default; }
.fp-infinite-sentinel{ height: 1px; }
.fp-load-more-status{ margin-top: 10px; }

/* ==========================================================================
   12. Homepage Intro (H1 + about text)
   ========================================================================== */
.fp-home-intro{ padding: 26px 0 6px; max-width: 760px; }
.fp-home-intro h1{ font-size: 28px; margin-bottom: 8px; color: var(--fp-heading); }
.fp-home-intro p{ font-size: 15px; color: var(--fp-meta); margin: 0; }
@media (max-width: 640px){
    .fp-home-intro h1{ font-size: 22px; }
}

.fp-home-about{ margin: 20px 0 40px; }
.fp-home-about-content{
    background: #fff;
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 24px 28px;
    color: var(--fp-text);
}
.fp-home-about-content h2,
.fp-home-about-content h3{ margin-top: 1.2em; }
.fp-home-about-content p{ margin: 0 0 1em; line-height: 1.7; }
.fp-home-about-content ul,
.fp-home-about-content ol{ list-style: revert; margin: 0 0 1em; padding-left: 1.4em; }
.fp-home-about-content a{ text-decoration: underline; }
@media (max-width: 640px){
    .fp-home-about-content{ padding: 18px 20px; }
}
@media (max-width: 640px){
    .fp-share-links{ padding: 12px; }
    .fp-share-links a{ font-size: 12px; padding: 6px 12px; }
    .fp-page-title{ font-size: 26px; }
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.fp-breadcrumbs { margin: 0 0 16px; font-size: 13px; color: var(--fp-meta); }
.fp-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.fp-breadcrumbs li { display: flex; align-items: center; }
.fp-breadcrumbs li:not(:last-child)::after { content: "/"; margin: 0 8px; color: var(--fp-border); }
.fp-breadcrumbs a { color: var(--fp-meta); text-decoration: underline; }
.fp-breadcrumbs a:hover { color: var(--fp-accent-text); }
.fp-breadcrumbs [aria-current="page"] { color: var(--fp-text); font-weight: 600; }

/* ==========================================================================
   Author bio box
   ========================================================================== */
.fp-author-bio {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--fp-light);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 20px;
    margin: 28px 0;
}
.fp-author-bio__avatar img { border-radius: 50%; display: block; }
.fp-author-bio__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--fp-meta); margin-bottom: 2px; }
.fp-author-bio__name { font-size: 17px; font-weight: 700; color: var(--fp-heading); }
.fp-author-bio__desc { margin: 6px 0 10px; line-height: 1.6; color: var(--fp-text); }
.fp-author-bio__links { font-size: 13px; }
.fp-author-bio__links a { color: var(--fp-accent-text); }
@media (max-width: 480px) {
    .fp-author-bio { flex-direction: column; align-items: center; text-align: center; }
    .fp-author-bio__links { justify-content: center; }
}

/* ==========================================================================
   Author page hero
   ========================================================================== */
.fp-author-hero {
    display: flex;
    gap: 22px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    box-shadow: var(--fp-shadow);
    padding: 28px;
    margin: 0 0 28px;
}
.fp-author-hero__avatar img { border-radius: 50%; display: block; }
.fp-author-hero__name { margin: 0 0 8px; font-size: 26px; }
.fp-author-hero__desc { margin: 0 0 12px; line-height: 1.6; color: var(--fp-text); }
.fp-author-hero__stats { display: flex; gap: 22px; margin-bottom: 12px; }
.fp-author-hero__stats strong { display: block; font-size: 20px; color: var(--fp-heading); }
.fp-author-hero__stats span { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--fp-meta); }
.fp-author-hero__links { display: flex; gap: 14px; font-size: 13px; }
.fp-author-hero__links a { color: var(--fp-accent-text); text-decoration: underline; }
@media (max-width: 560px) {
    .fp-author-hero { flex-direction: column; text-align: center; }
    .fp-author-hero__stats,
    .fp-author-hero__links { justify-content: center; }
}

/* ==========================================================================
   Related content
   ========================================================================== */
.fp-related { margin: 32px 0; }
.fp-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%),1fr));
    gap: 18px;
}

/* ==========================================================================
   Horizontal overflow guards
   Keeps the page from extending past the viewport on small screens.
   ========================================================================== */

/* Embeds (YouTube, Twitter, maps) carry fixed width/height attributes. */
iframe,
video,
embed,
object {
    max-width: 100%;
}

/* Editor content can contain long URLs and unbroken strings that would
   otherwise force the page wider than the screen. */
.fp-entry-content,
.fp-entry-content p,
.fp-entry-content li,
.fp-entry-content h1,
.fp-entry-content h2,
.fp-entry-content h3,
.fp-entry-content h4 {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Code samples scroll inside their own box rather than stretching the page. */
.fp-entry-content pre {
    max-width: 100%;
    overflow-x: auto;
}
.fp-entry-content code {
    overflow-wrap: break-word;
}

/* Wide images and embeds inside post content stay within their column. */
.fp-entry-content img,
.fp-entry-content figure,
.fp-entry-content .wp-block-embed {
    max-width: 100%;
    height: auto;
}

/* Final guard. overflow-x: clip is used rather than hidden because hidden on
   body silently breaks the sticky header's position: sticky. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}
