/*
Theme Name: Cyprus News
Theme URI: https://example.com/cyprus-news
Author: Antigravity
Author URI: https://example.com
Description: A premium, modern, and highly professional news theme for WordPress.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cyprus-news
Tags: news, blog, grid-layout, custom-header, custom-menu, featured-images, premium, professional

*/

/* Design System Tokens */
:root {
    /* Colors */
    --primary: #0f172a;
    --primary-light: #475569;
    --accent: #e11d48;
    --accent-hover: #be123c;
    --bg-site: #f8fafc;
    --bg-card: #ffffff;
    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;

    /* Typography */
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Lora', Georgia, serif;
    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;

    /* Shadows & Effects */
    --shadow-subtle: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transition */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --container-width: 1240px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary: #f8fafc;
    --primary-light: #cbd5e1;
    --accent: #ff2b56;
    --accent-hover: #e11d48;
    --bg-site: #0f172a;
    --bg-card: #1e293b;
    --text-heading: #f8fafc;
    --text-body: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --border-hover: #475569;
    --shadow-subtle: 0 1px 3px 0 rgb(0 0 0 / 0.5);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-body);
    background-color: var(--bg-site);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Utils */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header Cleaner Layout */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--space-sm) 0;
}

/* Top Utility Bar */
.top-utility-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    font-size: 0.8rem;
    font-family: var(--font-ui);
    color: var(--text-muted);
    font-weight: 600;
}

.utility-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.utility-left {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.utility-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#current-date {
    text-transform: capitalize;
}

/* Weather Widget */
.weather-icon img {
    width: 20px;
    height: 20px;
}

.weather-temp {
    color: var(--primary);
    font-weight: 800;
}

/* Theme Toggle */
.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.theme-toggle-btn:hover {
    background: var(--bg-site);
    color: var(--accent);
}

#exchange-rate {
    padding-left: var(--space-md);
    border-left: 1px solid var(--border);
    margin-left: 5px;
}

.rate-label {
    font-weight: 600;
    color: var(--text-muted);
}

.rate-value {
    color: var(--primary);
    font-weight: 800;
}

.market-ticker-container {
    padding-left: var(--space-md);
    border-left: 1px solid var(--border);
    margin-left: 5px;
    display: flex;
    overflow: hidden;
    max-width: 400px;
}

.stocks-scroll {
    display: flex;
    gap: var(--space-md);
    white-space: nowrap;
}

.stock-item {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.stock-item span {
    color: var(--primary);
    margin-left: 3px;
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

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

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

/* Default state if no attr set (treat as light) */
.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding .site-title a {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-branding .site-title a::before {
    content: '';
    width: 8px;
    height: 24px;
    background: var(--accent);
    display: inline-block;
    border-radius: 2px;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-md);
}

.site-nav a {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    font-variant-caps: normal;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
    padding: 0.5rem 0;
    position: relative;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: var(--transition);
}

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

.site-nav a:hover::after {
    width: 100%;
}


/* Page Layouts */
.home-layout {
    padding: var(--space-xl) 0;
}

/* Latest Headlines Bar */
.latest-headlines-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    margin-bottom: var(--space-lg);
    overflow: hidden;
    height: 48px;
    box-shadow: var(--shadow-subtle);
}

.headlines-label {
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    letter-spacing: 0.1em;
}

.headlines-marquee {
    flex: 1;
    padding-left: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    white-space: nowrap;
    overflow: hidden;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 500;
}

.marquee-content {
    display: flex;
    gap: var(--space-xl);
    animation: marquee 40s linear infinite;
}

.headlines-marquee:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.headlines-marquee a {
    color: var(--text-heading);
    flex-shrink: 0;
}

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

.marquee-sep {
    color: var(--border);
}

.home-top-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

@media (min-width: 1024px) {
    .home-top-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* Hero Grid (used in index.php) */

.section-hero {
    margin-bottom: var(--space-xl);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: var(--space-md);
}

.hero-main {
    grid-column: span 2;
    grid-row: span 2;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hero-sub {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.hero-main .post-thumbnail,
.hero-sub .post-thumbnail {
    height: 100%;
}

.hero-main .post-thumbnail img,
.hero-sub .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-main .post-content,
.hero-sub .post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
}

.hero-main h3 {
    font-size: 1.75rem;
    color: #fff;
}

.hero-sub h3 {
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.3;
}

.cat-label {
    display: inline-block;
    background: var(--accent);
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    /* text-transform: uppercase; */
    margin-bottom: 0.5rem;
    border-radius: 2px;
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .hero-main {
        grid-column: span 2;
        height: 400px;
    }

    .hero-sub {
        height: 250px;
    }
}

@media (max-width: 640px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-main,
    .hero-sub {
        grid-column: span 1;
        height: 300px;
    }
}

.main-story-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.main-story-img {
    height: 500px;
    overflow: hidden;
}

.main-story-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: var(--transition);
}

.main-story-card:hover .main-story-img img {
    transform: scale(1.05);
    opacity: 0.8;
}

.main-story-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xl) var(--space-lg);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.main-story-title {
    font-size: 2.75rem;
    margin: var(--space-sm) 0;
    line-height: 1.1;
}

.main-story-title a {
    color: #fff;
}

.main-story-excerpt {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-tag {
    background: var(--accent);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    /* text-transform: uppercase; Removed as per user request */
    font-family: var(--font-ui);
    display: inline-block;
}

/* Sidebar News Flow */
.home-sidebar-col {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: var(--space-lg);
    box-shadow: var(--shadow-subtle);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-title::after {
    content: 'LIVE';
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.news-flow-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.flow-item {
    display: flex;
    gap: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

.flow-time {
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--accent);
    font-size: 0.85rem;
}

.flow-title {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Category Sections */
.category-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.cat-section {
    background: var(--bg-card);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-subtle);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--accent);
}

.news-item-small {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.thumb-small {
    width: 100px;
    height: 70px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

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

.content-small h4 {
    font-size: 0.95rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.time-ago {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-ui);
}

/* International & Greece Rows */
.category-row-wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: var(--space-lg);
}

.cat-section-wide {
    background: var(--bg-card);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.post-card-mid .post-thumbnail {
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.post-card-mid h3 {
    font-size: 0.9rem;
    font-family: var(--font-heading);
}

/* Single Post Enhancements */
.single-article {
    max-width: 900px;
    /* Slightly wider for better readability */
    margin: var(--space-xl) auto;
    padding: var(--space-lg);
    background: transparent;
    /* Cleaner, no box if on bg-site */
    border-radius: 0;
    box-shadow: none;
}

@media (min-width: 1024px) {
    .single-article {
        padding: var(--space-xl) 0;
    }
}

.single-header {
    margin-bottom: var(--space-lg);
    text-align: left;
    /* Pro alignment */
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-md);
}

.single-meta-top {
    text-align: left;
    margin-bottom: var(--space-xs);
}

.single-meta-sub {
    text-align: left;
    margin-top: 0.5rem;
}

body.single .entry-title {
    font-size: 1.85rem !important;
    /* Forceful reduction with high specificity */
    line-height: 1.25;
    margin: 0.5rem 0 1rem 0;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: left;
}

.entry-meta {
    font-family: var(--font-ui);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.entry-meta .meta-date {
    color: var(--accent);
}

.post-thumbnail-single {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.takeaways-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-subtle);
}

.takeaways-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--space-sm);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.takeaways-icon {
    font-size: 1.2rem;
}

.takeaways-title {
    font-size: 0.9rem !important;
    color: var(--primary) !important;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
    margin: 0 !important;
}

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

.takeaways-box li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.4;
    font-weight: 500;
}

.takeaways-box li:last-child {
    margin-bottom: 0;
}

.takeaways-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 900;
    font-size: 1.1rem;
}

.single-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
}

.nav-previous,
.nav-next {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.nav-previous span,
.nav-next span {
    display: block;
    font-size: 1rem;
    color: var(--primary);
    margin-top: 0.25rem;
    text-transform: none;
}

.single-header {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.entry-title {
    font-size: 3rem;
    margin: var(--space-sm) 0;
}

.entry-meta {
    font-family: var(--font-ui);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-thumbnail-single {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.entry-content {
    font-size: 1.15rem;
    color: var(--text-body);
}

.entry-content p {
    margin-bottom: var(--space-md);
}

/* Footer */
.site-footer {
    background: var(--primary);
    color: #e2e8f0;
    padding: var(--space-xl) 0;
    margin-top: var(--space-xl);
}

.footer-nav ul {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    list-style: none;
}

.footer-nav a {
    color: #94a3b8;
    font-family: var(--font-ui);
    font-weight: 500;
}

.footer-nav a:hover {
    color: #fff;
}

/* Archive / Category Feed */
.archive-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.archive-title {
    font-size: 2.5rem;
    color: var(--primary);
    /* text-transform: uppercase; */
    letter-spacing: -0.02em;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.archive-post-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--border);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.archive-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.archive-post-thumb {
    height: 220px;
    overflow: hidden;
}

.archive-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.archive-post-card:hover .archive-post-thumb img {
    transform: scale(1.05);
}

.archive-post-content {
    padding: var(--space-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.archive-post-title {
    font-size: 1.35rem;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.archive-post-meta {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.archive-post-excerpt {
    font-size: 1rem;
    color: var(--text-body);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pagination {
    margin-top: var(--space-xl);
    display: flex;
    gap: var(--space-xs);
}

.page-numbers {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-numbers:hover:not(.current) {
    border-color: var(--accent);
    color: var(--accent);
}

/* Scroll Progress Bar */
#scroll-progress-container {
    position: fixed;
    top: 0;
    /* Adjust if header isn't sticky, but our header IS sticky */
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
    /* Above header */
    pointer-events: none;
}

#scroll-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--accent), #ff2b56);
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px var(--accent);
}

/* Adjust progress bar position to be just below header since header is sticky */
.site-header+#scroll-progress-container {
    top: 0;
    /* It overlaps the header's very top or bottom. Let's put it at the very top of the window */
}

/* Responsive */
@media (max-width: 768px) {
    .main-story-title {
        font-size: 1.75rem;
    }

    .entry-title {
        font-size: 2rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .category-row-wide {
        grid-template-columns: 1fr;
    }
}