/*
Theme Name: uinews
Theme URI: https://example.com/uinews
Author: Antigravity
Author URI: https://example.com
Description: A blazing fast, debloated news theme with a "Big News" aesthetic.
Version: 1.0.0
Text Domain: uinews
*/

:root {
    --color-primary: #c00;
    /* News Red */
    --color-text: #1a1a1a;
    --color-text-light: #555;
    --color-bg: #fff;
    --color-bg-alt: #f4f4f4;
    --color-border: #e0e0e0;
    --color-accent: #0056b3;

    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    /* System stack */
    --font-serif: Georgia, Times, "Times New Roman", serif;
    /* For that traditional news feel in headers if desired, currently using system for speed */

    --container-width: 1200px;
    --gap: 20px;
}

/* Base & Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.5em;
    line-height: 1.2;
    font-weight: 700;
    color: #111;
}

p {
    margin: 0 0 1em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    background: #eee;
}

ul,
ol {
    padding: 0;
    list-style: none;
    margin: 0;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn:hover {
    background: #a00;
    color: #fff;
}

/* Header */
.top-bar {
    background: #111;
    color: #fff;
    font-size: 0.8rem;
    padding: 5px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header {
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.branding h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    letter-spacing: -0.02em;
    margin: 0;
}

.header-ad {
    width: 728px;
    height: 90px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
    display: none;
    /* Hidden on mobile */
}

@media(min-width: 900px) {
    .header-ad {
        display: flex;
    }
}

/* Navigation */
.main-nav {
    background: #fff;
    border-bottom: 3px solid var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.nav-list {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
}

.nav-list li a {
    display: block;
    padding: 15px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
}

.nav-list li a:hover {
    border-bottom-color: var(--color-primary);
}

/* Breaking News Ticker */
.breaking-news {
    background: #f9f9f9;
    border-bottom: 1px solid var(--color-border);
    padding: 10px 0;
    font-size: 0.9rem;
}

.breaking-news .container {
    display: flex;
    align-items: center;
}

.breaking-label {
    background: var(--color-primary);
    color: #fff;
    padding: 2px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    margin-right: 15px;
    border-radius: 2px;
}

/* Layout: F-Pattern Grid */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media(min-width: 1024px) {
    .news-grid {
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-rows: auto auto;
    }
}

/* Article Cards */
.article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.article-card:last-child {
    border-bottom: none;
}

.article-card h3 {
    font-size: 1.1rem;
    margin-top: 10px;
    font-family: var(--font-heading);
}

.article-meta {
    font-size: 0.75rem;
    color: #888;
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    gap: 10px;
}

.article-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-img img {
    transform: scale(1.05);
}

.cat-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-primary);
    color: #fff;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Main Feature (Top Left key position) */
.main-feature {
    grid-column: 1;
    grid-row: 1;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.main-feature .article-img {
    aspect-ratio: 16/9;
    margin-bottom: 15px;
}

.main-feature h3 {
    font-size: 2rem;
    font-family: var(--font-serif);
}

.main-feature p {
    font-size: 1.1rem;
    color: #444;
}

/* Sub Feature (Top Right 1) */
.sub-feature-1 {
    grid-column: 2;
    grid-row: 1;
}

/* Sub Feature (Top Right 2 - Sidebar-ish) */
.sub-feature-2 {
    grid-column: 3;
    grid-row: 1 / span 2;
    border-left: 1px solid var(--color-border);
    padding-left: 20px;
}

/* Latest List (Below Main) */
.latest-list {
    grid-column: 1 / span 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    border-top: 1px solid var(--color-border);
    padding-top: 30px;
}

.small-card {
    display: flex;
    gap: 15px;
    align-items: start;
}

.small-card .article-img {
    width: 100px;
    height: 75px;
    flex-shrink: 0;
    aspect-ratio: 4/3;
}

.small-card h3 {
    font-size: 1rem;
    margin-top: 0;
}

/* Footer */
.site-footer {
    background: #111;
    color: #aaa;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-widget h4 {
    color: #fff;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
    border-bottom: 1px solid #222;
    padding-bottom: 5px;
}

.footer-links li a:hover {
    color: #fff;
    margin-left: 5px;
}

/* Single Post */
.single-content {
    max-width: 65ch;
    font-size: 1.125rem;
    line-height: 1.7;
}

.single-content p {
    margin-bottom: 1.5em;
}

/* Search Results */
.search-results-list .article-card {
    flex-direction: row;
    gap: 20px;
}

.search-results-list .article-img {
    width: 250px;
}

/* Comments */
.comments-area {
    max-width: 65ch;
    margin-top: 40px;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
}

input,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    font-family: inherit;
}

/* SVG Icons - Helper classes */
.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    vertical-align: middle;
}

/* Social Links */
.footer-social {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    transition: opacity 0.2s;
}

.social-link:hover {
    opacity: 0.8;
    color: #fff;
}

.social-facebook {
    background: #1877f2;
}

.social-twitter {
    background: #1da1f2;
}

.social-instagram {
    background: #e1306c;
}

.social-youtube {
    background: #ff0000;
}

.social-linkedin {
    background: #0077b5;
}

/* Gallery CPT */
.gallery-article .entry-content img {
    width: 100%;
    border-radius: 4px;
}

.gallery-article .wp-block-gallery {
    gap: 20px;
}

.gallery-article .wp-block-image figcaption {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

.gallery-navigation a {
    font-weight: 700;
    color: var(--color-primary);
}

/* Block Editor Adjustments */
.entry-content>* {
    margin-bottom: 1.5em;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 2em;
}