/*
Theme Name: The Cross TV
Theme URI: https://thecrosstv.com/
Author: The Cross TV
Author URI: https://thecrosstv.com/
Description: Modern WordPress theme for The Cross TV. Features light/dark mode, 60/40 homepage layout, full-width page template, and custom widget areas.
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thecrosstv
Tags: one-column, two-columns, right-sidebar, custom-menu, featured-images, translation-ready, rtl-language-support, theme-options, custom-colors

The Cross TV WordPress Theme, (C) 2026 thecrosstv.com
The Cross TV is distributed under the terms of the GNU GPL v2 or later.
*/

:root {
    --bg: #f5f5f5;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --text: #222222;
    --text-muted: #777777;
    --text-inverse: #ffffff;
    --accent: #FF7B2D;
    --accent-hover: #e06600;
    --accent-light: #fff0e6;
    --border: #dddddd;
    --border-light: #eeeeee;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --nav-bg: rgba(255,255,255,0.88);
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --overlay: rgba(0,0,0,0.5);
}

[data-theme="dark"] {
    --bg: #222222;
    --bg-surface: #2a2a2a;
    --bg-elevated: #333333;
    --text: #eeeeee;
    --text-muted: #999999;
    --text-inverse: #ffffff;
    --accent: #FF7B2D;
    --accent-hover: #e06600;
    --accent-light: #3d2510;
    --border: #444444;
    --border-light: #3a3a3a;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
    --nav-bg: rgba(34,34,34,0.92);
    --card-bg: #2a2a2a;
    --input-bg: #2a2a2a;
    --overlay: rgba(0,0,0,0.7);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]):not([data-theme="dark"]) {
        --bg: #222222;
        --bg-surface: #2a2a2a;
        --bg-elevated: #333333;
        --text: #eeeeee;
        --text-muted: #999999;
        --text-inverse: #ffffff;
        --accent: #FF7B2D;
        --accent-hover: #e06600;
        --accent-light: #3d2510;
        --border: #444444;
        --border-light: #3a3a3a;
        --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
        --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
        --nav-bg: rgba(34,34,34,0.92);
        --card-bg: #2a2a2a;
        --input-bg: #2a2a2a;
        --overlay: rgba(0,0,0,0.7);
    }
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
}

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

a:hover {
    color: var(--accent-hover);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0;
    color: var(--text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Glassmorphic Navigation */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo a {
    display: flex;
    align-items: center;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.site-logo img {
    max-height: 44px;
    width: auto;
}

.site-logo .site-title {
    margin-left: 10px;
}

/* Nav right side (menu + toggle) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Primary Menu */
#primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

#primary-menu > li {
    position: relative;
}

#primary-menu > li > a {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a,
#primary-menu > li.current_page_item > a {
    color: var(--accent);
    background: var(--accent-light);
}

#primary-menu > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 8px;
    margin-top: -3px;
    opacity: 0.6;
}

/* Sub-menu dropdown */
#primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    list-style: none;
    z-index: 1001;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

#primary-menu li:hover > .sub-menu {
    display: block;
}

#primary-menu .sub-menu li {
    position: relative;
}

#primary-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
    transition: all 0.15s ease;
    text-decoration: none;
}

#primary-menu .sub-menu a:hover {
    color: var(--accent);
    background: var(--accent-light);
}

#primary-menu .sub-menu .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 8px;
    float: right;
    margin-top: 6px;
    opacity: 0.6;
}

#primary-menu .sub-menu .sub-menu {
    top: -8px;
    left: 100%;
    margin-left: 4px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.theme-toggle .icon-sun { display: inline; }
.theme-toggle .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: inline; }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    padding: 0;
    font-size: 20px;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: 0.3s;
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: 0.3s;
}

.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

.menu-toggle.active span {
    background: transparent;
}

.menu-toggle.active span::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.active span::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ===== HERO SECTION (Homepage) ===== */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-section img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== HOMEPAGE: 60/40 LAYOUT ===== */
.home-content {
    padding: 48px 0;
}

.home-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.home-main {
    flex: 0 0 60%;
    max-width: 60%;
}

.home-sidebar {
    flex: 0 0 calc(40% - 40px);
    max-width: calc(40% - 40px);
}

/* Homepage widget styles */
.home-main .widget,
.home-sidebar .widget {
    margin-bottom: 32px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.home-main .widget h3,
.home-sidebar .widget h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    color: var(--text);
}

.home-main .widget:last-child,
.home-sidebar .widget:last-child {
    margin-bottom: 0;
}

.tagline-section {
    text-align: center;
    padding: 40px 0;
}

.tagline-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.tagline-section p {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CONTENT AREA ===== */
.content-area {
    display: flex;
    gap: 40px;
    padding: 48px 0;
    align-items: flex-start;
}

.content-area main {
    flex: 1;
    min-width: 0;
}

.content-area .sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* Full-width page (no sidebar) */
.content-area.full-width main {
    max-width: 800px;
    margin: 0 auto;
}

/* ===== PAGE / POST CONTENT ===== */
.entry-header {
    margin-bottom: 32px;
}

.entry-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.entry-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}

.entry-content p {
    margin-bottom: 1.2em;
}

.entry-content img {
    border-radius: var(--radius-sm);
    margin: 24px 0;
}

/* ===== SIDEBAR WIDGETS ===== */
.widget {
    margin-bottom: 28px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.widget h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.2s ease;
}

.widget ul li a:hover {
    color: var(--accent);
}

.widget ul .current-cat a,
.widget ul .current-menu-item a {
    color: var(--accent);
    font-weight: 500;
}

.widget select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
    font-size: 14px;
}

.widget_search .search-form {
    display: flex;
    gap: 8px;
}

.widget_search .search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.widget_search .search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
}

.widget_search .search-form input[type="submit"] {
    padding: 10px 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.widget_search .search-form input[type="submit"]:hover {
    background: var(--accent-hover);
}

/* Calendar widget */
.widget_calendar table {
    width: 100%;
    border-collapse: collapse;
}

.widget_calendar th,
.widget_calendar td {
    padding: 6px;
    text-align: center;
    font-size: 13px;
    border: 1px solid var(--border);
}

.widget_calendar caption {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent);
}

.widget_calendar #today {
    background: var(--accent-light);
    font-weight: 600;
}

/* Tag cloud */
.tagcloud a {
    display: inline-block;
    padding: 4px 12px;
    margin: 3px 2px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px !important;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.tagcloud a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== ARCHIVE / BLOG LISTING ===== */
.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    border-color: var(--accent);
}

.post-card .entry-title {
    font-size: 22px;
    margin-bottom: 8px;
}

.post-card .entry-title a {
    color: var(--text);
    text-decoration: none;
}

.post-card .entry-title a:hover {
    color: var(--accent);
}

.post-card .entry-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.post-card .entry-summary {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* ===== CATEGORY GRID (title + featured image only, one per row) ===== */
.category-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.category-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

.category-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-item-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius) var(--radius) 0 0;
}

.category-item-title {
    font-size: 20px;
    font-weight: 600;
    padding: 20px 24px;
    margin: 0;
    color: var(--text);
    transition: color 0.2s ease;
}

.category-item:hover .category-item-title {
    color: var(--accent);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 48px 0 0;
    margin-top: 48px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 32px;
}

.footer-widgets .widget {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
}

.footer-widgets .widget h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

.footer-widgets .widget ul li {
    border-bottom: 1px solid var(--border-light);
    padding: 8px 0;
}

.footer-widgets .widget ul li a {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-widgets .widget ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
}

.footer-bottom a:hover {
    color: var(--accent);
}

.footer-bottom .footer-links {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-bottom .footer-links a {
    font-size: 13px;
}

/* ===== PAGINATION ===== */
.pagination {
    text-align: center;
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ===== CTA BUTTON IN MENU ===== */
li.cta-button > a {
    background: var(--accent) !important;
    color: #fff !important;
    padding: 10px 22px !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
}

li.cta-button > a:hover {
    background: var(--accent-hover) !important;
    color: #fff !important;
}

/* ===== BUTTONS ===== */
.btn, .button, button, input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: var(--font);
    line-height: 1.4;
}

.btn:hover, .button:hover, button:hover, input[type="submit"]:hover {
    background: var(--accent-hover);
    color: #fff;
    text-decoration: none;
}

/* ===== 404 ===== */
.error-404 {
    text-align: center;
    padding: 80px 0;
}

.error-404 h1 {
    font-size: 80px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 8px;
}

.error-404 p {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 24px;
}

/* ===== SEARCH ===== */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 500px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .home-layout {
        flex-direction: column;
    }

    .home-main,
    .home-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .content-area {
        flex-direction: column;
    }

    .content-area .sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-right {
        gap: 4px;
    }

    #primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        padding: 12px 24px;
        max-height: 80vh;
        overflow-y: auto;
    }

    #primary-menu.active {
        display: flex;
    }

    #primary-menu > li {
        width: 100%;
    }

    #primary-menu > li > a {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
        width: 100%;
    }

    #primary-menu .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: none;
        animation: none;
    }

    #primary-menu .sub-menu .sub-menu {
        padding-left: 20px;
    }

    li.cta-button > a {
        margin: 8px 16px !important;
        text-align: center !important;
    }

    .site-nav .container {
        height: 60px;
    }

    .entry-title {
        font-size: 28px;
    }

    .home-content {
        padding: 24px 0;
    }

    .content-area {
        padding: 24px 0;
        gap: 24px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-section {
        margin: 0 -24px;
        width: calc(100% + 48px);
    }

    .container {
        padding: 0 16px;
    }

    .home-main .widget,
    .home-sidebar .widget {
        padding: 20px;
    }
}
