/*
Theme Name: The Real Michael Douglas (CUFC Edition)
Theme URI: https://www.the-real-michael-douglas.co.uk
Author: Custom WordPress Theme Builder
Author URI: https://www.the-real-michael-douglas.co.uk
Description: Modern matchday & blog WordPress theme built for www.the-real-michael-douglas.co.uk, inspired by Carlisle United FC's iconic blue, red, white, and fox-orange palette, Brunton Park, and mowed pitch stripes. Includes a dedicated Promo Video Landing Page template and full blog support.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-real-michael-douglas
Tags: blog, custom-logo, custom-menu, featured-images, full-width-template, one-column, two-columns, sports
*/

:root {
    --cufc-blue: #1B5BA6;
    --cufc-blue-dark: #0D2B52;
    --cufc-blue-light: #2E74C7;
    --cufc-red: #E31B23;
    --cufc-orange: #F36F21;
    --cufc-gold: #C2A463;
    --cufc-white: #FFFFFF;
    --cufc-offwhite: #F4F7FB;
    --cufc-ink: #101B2B;
    --cufc-muted: #52627A;
    --pitch-dark: #367C2B;
    --pitch-light: #4A9E39;
    --pitch-line: rgba(255, 255, 255, 0.85);
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-card: 0 12px 30px rgba(13, 43, 82, 0.12);
    --shadow-hero: 0 24px 60px rgba(6, 20, 40, 0.45);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--cufc-ink);
    background-color: var(--cufc-offwhite);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .site-title, .promo-badge, .btn-cufc {
    font-family: 'Oswald', 'Arial Narrow', Impact, sans-serif;
    letter-spacing: 0.02em;
}

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

a {
    color: var(--cufc-blue);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

a:hover {
    color: var(--cufc-red);
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Stripey Mowed Pitch Grass Accent */
.pitch-stripes-bar {
    height: 18px;
    width: 100%;
    background: repeating-linear-gradient(
        90deg,
        var(--pitch-dark) 0px,
        var(--pitch-dark) 48px,
        var(--pitch-light) 48px,
        var(--pitch-light) 96px
    );
    border-top: 3px solid var(--cufc-white);
    border-bottom: 3px solid var(--cufc-white);
    position: relative;
}

.pitch-stripes-section {
    background-color: var(--pitch-dark);
    background-image:
        linear-gradient(to bottom, rgba(13, 43, 82, 0.18), rgba(13, 43, 82, 0.35)),
        repeating-linear-gradient(
            90deg,
            var(--pitch-dark) 0px,
            var(--pitch-dark) 72px,
            var(--pitch-light) 72px,
            var(--pitch-light) 144px
        );
    position: relative;
    border-top: 4px solid var(--cufc-white);
    border-bottom: 4px solid var(--cufc-white);
}

/* Top Club Strip */
.top-club-ribbon {
    background: linear-gradient(90deg, var(--cufc-blue-dark) 0%, var(--cufc-blue) 60%, var(--cufc-red) 100%);
    color: var(--cufc-white);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 0;
    border-bottom: 2px solid var(--cufc-orange);
}

.top-club-ribbon .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.club-motto {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.club-motto img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* Header & Main Character Logo */
.site-header {
    background: var(--cufc-white);
    box-shadow: 0 4px 20px rgba(13, 43, 82, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 20px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-img {
    height: 76px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.brand-wrap:hover .brand-logo-img {
    transform: scale(1.04) rotate(-1deg);
}

.brand-text .site-title {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--cufc-blue-dark);
}

.brand-text .site-title span {
    color: var(--cufc-red);
}

.brand-text .site-tagline {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: var(--cufc-muted);
    font-weight: 500;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--cufc-blue-dark);
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
    background: var(--cufc-blue);
    color: var(--cufc-white);
}

.nav-toggle {
    display: none;
    background: var(--cufc-blue-dark);
    color: var(--cufc-white);
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

/* Promo Video Hero Stage (Brunton Park Backdrop + Character Logo + Match Ball) */
.promo-hero {
    position: relative;
    background-color: var(--cufc-blue-dark);
    background-size: cover;
    background-position: center;
    color: var(--cufc-white);
    padding: 56px 0 72px;
    overflow: hidden;
}

.promo-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(13, 43, 82, 0.90) 0%,
        rgba(27, 91, 166, 0.82) 55%,
        rgba(227, 27, 35, 0.78) 100%
    );
    z-index: 1;
}

.promo-hero .container {
    position: relative;
    z-index: 2;
}

.promo-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
    align-items: center;
}

.promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cufc-orange);
    color: var(--cufc-white);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.promo-hero h1 {
    font-size: clamp(2.1rem, 4vw, 3.35rem);
    line-height: 1.08;
    margin: 0 0 14px;
    text-transform: uppercase;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

.promo-hero p.lead {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 24px;
    max-width: 58ch;
}

/* Video Player Frame */
.promo-video-shell {
    background: #071528;
    border: 4px solid var(--cufc-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-hero);
    position: relative;
}

.promo-video-topbar {
    background: var(--cufc-blue-dark);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--cufc-red);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.live-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cufc-red);
    margin-right: 7px;
    box-shadow: 0 0 8px var(--cufc-red);
}

.video-aspect {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-aspect iframe,
.video-aspect video,
.video-aspect .wp-block-embed,
.video-aspect .wp-block-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    margin: 0;
}

.video-placeholder-card {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background-size: cover;
    background-position: center;
}

.video-placeholder-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(13, 43, 82, 0.72);
}

.video-placeholder-inner {
    position: relative;
    z-index: 2;
    max-width: 440px;
}

.play-icon-circle {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: var(--cufc-red);
    color: var(--cufc-white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.8rem;
    border: 3px solid var(--cufc-white);
    box-shadow: 0 10px 25px rgba(227, 27, 35, 0.55);
}

/* Mascot + Match Ball Visual Card */
.hero-mascot-card {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    position: relative;
}

.hero-mascot-card img.mascot-hero {
    max-height: 290px;
    margin: 0 auto;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.4));
}

.match-ball-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--cufc-white);
    color: var(--cufc-blue-dark);
    padding: 10px 14px;
    border-radius: 12px;
    margin-top: 16px;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.match-ball-badge img {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Buttons */
.btn-cufc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cufc-red);
    color: var(--cufc-white);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    text-transform: uppercase;
    border: 2px solid var(--cufc-white);
    cursor: pointer;
}

.btn-cufc:hover {
    background: var(--cufc-orange);
    color: var(--cufc-white);
    transform: translateY(-2px);
}

.btn-cufc-secondary {
    background: var(--cufc-blue);
}

.btn-cufc-secondary:hover {
    background: var(--cufc-blue-dark);
}

/* Main Content & Blog Cards */
.site-main {
    padding: 52px 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--cufc-blue);
    padding-bottom: 10px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.85rem;
    text-transform: uppercase;
    color: var(--cufc-blue-dark);
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 34px;
    align-items: start;
}

.content-layout.no-sidebar {
    grid-template-columns: 1fr;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.post-card {
    background: var(--cufc-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border-top: 4px solid var(--cufc-blue);
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(13, 43, 82, 0.16);
    border-top-color: var(--cufc-red);
}

.post-card-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--cufc-blue-dark);
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--cufc-red);
    margin-bottom: 6px;
}

.post-card-title {
    margin: 0 0 10px;
    font-size: 1.35rem;
    line-height: 1.25;
}

.post-card-title a {
    color: var(--cufc-blue-dark);
}

.post-card-title a:hover {
    color: var(--cufc-red);
}

.post-excerpt {
    color: var(--cufc-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
    flex: 1;
}

/* Single Post & Page Article */
.single-article {
    background: var(--cufc-white);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border-top: 5px solid var(--cufc-blue);
}

.single-article h1 {
    font-size: 2.3rem;
    color: var(--cufc-blue-dark);
    margin-top: 0;
}

/* Sidebar */
.widget-area .widget {
    background: var(--cufc-white);
    padding: 22px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    border-top: 4px solid var(--cufc-red);
}

.widget-title {
    margin: 0 0 14px;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--cufc-blue-dark);
    border-bottom: 2px solid var(--cufc-offwhite);
    padding-bottom: 8px;
}

/* Footer */
.site-footer {
    background: var(--cufc-blue-dark);
    color: rgba(255, 255, 255, 0.88);
    padding: 48px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand img {
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.footer-heading {
    color: var(--cufc-white);
    text-transform: uppercase;
    font-size: 1.1rem;
    margin: 0 0 12px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
}

.footer-links a:hover {
    color: var(--cufc-orange);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.88rem;
}

@media (max-width: 920px) {
    .promo-grid,
    .content-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .nav-toggle {
        display: inline-block;
    }
    .main-nav {
        display: none;
        width: 100%;
    }
    .main-nav.open {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding-top: 12px;
    }
    .header-inner {
        flex-wrap: wrap;
    }
}
