/**
 * Aya Trend - Euronews-Inspired European Broadcast Stylesheet
 * Signature Cobalt Blue: #0055a5
 */

:root {
    --primary-blue: #0055a5;
    --primary-dark: #003e7e;
    --primary-light: #e6f0fa;
    --accent-red: #c53030;
    --text-main: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border-light: #e5e7eb;
    --border-dark: #d1d5db;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --font-sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --container-max: 1280px;
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

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

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

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

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

/* Top Utility Bar */
.top-utility-bar {
    background-color: #0f172a;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 500;
    border-bottom: 1px solid #1e293b;
    padding: 0.4rem 0;
}

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

.top-edition .edition-label {
    color: #cbd5e1;
    font-weight: 700;
    margin-right: 0.4rem;
    letter-spacing: 0.5px;
}

.top-edition .edition-current {
    color: #38bdf8;
}

/* Main Masthead */
.main-masthead {
    background-color: #ffffff;
    border-bottom: 2px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.masthead-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Hamburger button */
.btn-menu-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 0.45rem 0.65rem;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-menu-toggle:hover {
    background-color: #f1f5f9;
    color: var(--primary-blue);
}

.hamburger-box {
    width: 22px;
    height: 16px;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    margin-right: 0.6rem;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
    width: 22px;
    height: 2.5px;
    background-color: currentColor;
    position: absolute;
    left: 0;
    border-radius: 1px;
    transition: transform 0.2s ease;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    content: '';
    top: -6px;
}

.hamburger-inner::after {
    content: '';
    top: 6px;
}

/* Brand Square Logo */
.brand-brandmark {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-left: 0.25rem;
}

.brand-logo-img {
    height: 50px;
    width: 50px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 85, 165, 0.25);
}

/* Nav Links */
.masthead-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.nav-link {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    position: relative;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-blue);
    background-color: #f8fafc;
}

.nav-link.active {
    color: var(--primary-blue);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0.75rem;
    right: 0.75rem;
    height: 3px;
    background-color: var(--primary-blue);
}

/* Right Controls (Strictly Search only - NO Log In, NO Live) */
.masthead-right {
    display: flex;
    align-items: center;
}

.btn-search-trigger {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.45rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-search-trigger:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background-color: var(--primary-light);
}

/* Search Modal Overlay */
.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: flex-start;
    padding-top: 10vh;
}

.search-overlay.active {
    display: flex;
}

.search-modal-body {
    position: relative;
    max-width: 720px;
}

.search-modal-form {
    width: 100%;
}

.search-input-group {
    display: flex;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.search-input-group input {
    flex: 1;
    border: none;
    padding: 1.1rem 1.4rem;
    font-size: 1.15rem;
    font-family: inherit;
    outline: none;
    color: var(--text-main);
}

.btn-search-submit {
    background-color: var(--primary-blue);
    color: #ffffff;
    border: none;
    padding: 0 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-search-submit:hover {
    background-color: var(--primary-dark);
}

.btn-search-close {
    position: absolute;
    top: -45px;
    right: 1.25rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background-color: #ffffff;
    z-index: 1100;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    left: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.drawer-brand img {
    border-radius: 3px;
}

.drawer-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
}

.drawer-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.drawer-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.drawer-link {
    display: block;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    border-radius: 6px;
    transition: var(--transition);
}

.drawer-link:hover, .drawer-link.active {
    background-color: var(--primary-light);
    color: var(--primary-blue);
}

.drawer-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 0.75rem 0;
}

.drawer-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

.drawer-backdrop.active {
    display: block;
}

/* ==============================================================
   HOMEPAGE LAYOUT: EURONEWS HERO + LATEST TIMELINE
   ============================================================== */

.news-showcase {
    padding: 1.75rem 0 2.5rem;
}

/* Breaking / Urgent Banner */
.breaking-ticker {
    display: flex;
    align-items: center;
    background-color: #fee2e2;
    border-left: 4px solid var(--accent-red);
    padding: 0.6rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 4px 4px 0;
}

.breaking-badge {
    background-color: var(--accent-red);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    letter-spacing: 0.5px;
    margin-right: 0.85rem;
    white-space: nowrap;
}

.breaking-headline {
    font-size: 0.92rem;
    font-weight: 600;
    color: #991b1b;
}

/* Top Hero Grid: 2 Columns (Main Story Left + Mid, Latest News Timeline Right) */
.hero-stage-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    margin-bottom: 2.25rem;
}

/* Lead Feature Article (Euronews Style: Text Left, Photo Right) */
.lead-story-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lead-story-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.5rem;
    padding: 1.75rem;
    align-items: center;
}

.lead-story-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.lead-story-meta .category-kicker {
    background-color: var(--primary-light);
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
}

.lead-story-meta .story-time {
    color: var(--text-muted);
}

.lead-story-title {
    font-size: 1.85rem;
    line-height: 1.25;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.lead-story-title a:hover {
    color: var(--primary-blue);
}

.lead-story-dek {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.lead-story-byline {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lead-story-byline .bureau-loc {
    color: var(--primary-blue);
    font-weight: 700;
}

.lead-story-media {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.lead-story-media img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lead-story-card:hover .lead-story-media img {
    transform: scale(1.02);
}

/* Latest News Timeline (Euronews Signature Right Box) */
.latest-timeline-panel {
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 2px solid var(--primary-blue);
    background-color: #fafbfc;
}

.timeline-header-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-red);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.2);
}

.timeline-all-link {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.timeline-feed {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.timeline-item {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-item:hover {
    background-color: #f8fafc;
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.timeline-time {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--primary-blue);
    font-variant-numeric: tabular-nums;
}

.timeline-cat {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

.timeline-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
}

.timeline-title a:hover {
    color: var(--primary-blue);
}

/* ==============================================================
   SUB-FEATURE 3-COLUMN ROW (Below Hero)
   ============================================================== */

.sub-features-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.sub-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.sub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.sub-card-media {
    position: relative;
    overflow: hidden;
}

.sub-card-media img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.sub-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sub-card-cat {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.sub-card-title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.sub-card-title a:hover {
    color: var(--primary-blue);
}

.sub-card-dek {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex: 1;
}

.sub-card-foot {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    padding-top: 0.75rem;
    display: flex;
    justify-content: space-between;
}

/* ==============================================================
   CATEGORIZED SECTION FEED
   ============================================================== */

.category-showcase-section {
    margin-bottom: 3rem;
}

.section-ribbon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--text-main);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.section-ribbon-title {
    font-size: 1.35rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-main);
    position: relative;
}

.section-ribbon-title::after {
    content: '';
    position: absolute;
    bottom: -0.65rem;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-blue);
}

.section-ribbon-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.cards-quad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ==============================================================
   ARTICLE VIEW PAGE
   ============================================================== */

.article-page-layout {
    padding: 2rem 0 4rem;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb-nav a:hover {
    color: var(--primary-blue);
}

.breadcrumb-sep {
    color: #cbd5e1;
}

.article-content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
}

.article-main-body {
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 2.5rem;
}

.article-header {
    margin-bottom: 1.75rem;
}

.article-cat-badge {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary-blue);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.65rem;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.article-title-main {
    font-size: 2.35rem;
    line-height: 1.22;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.article-dek-main {
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.article-author-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.author-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bureau-badge-pill {
    background-color: #f1f5f9;
    color: var(--primary-dark);
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

.article-hero-photo {
    margin-bottom: 2rem;
}

.article-hero-photo img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
}

.article-photo-caption {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--primary-blue);
}

.article-prose {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #1f2937;
}

.article-prose p {
    margin-bottom: 1.5rem;
}

.article-prose .lead {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.7;
    color: #111827;
}

.article-prose h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 2rem 0 1rem;
    color: #0f172a;
}

.article-prose blockquote {
    border-left: 4px solid var(--primary-blue);
    padding: 1rem 1.5rem;
    background-color: var(--primary-light);
    margin: 2rem 0;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--primary-dark);
    border-radius: 0 4px 4px 0;
}

/* Sidebar Widgets */
.sidebar-box {
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    letter-spacing: 0.5px;
}

/* ==============================================================
   FOOTER STYLES (Strictly NO yellow live broadcast box)
   ============================================================== */

.main-footer {
    background-color: #0b1329;
    color: #e2e8f0;
    margin-top: 4rem;
}

.footer-top-accent {
    height: 4px;
    background: linear-gradient(90deg, #0055a5 0%, #38bdf8 50%, #0055a5 100%);
}

.footer-content {
    padding: 3.5rem 1.25rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brandmark {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.footer-brandmark img {
    border-radius: 3px;
}

.footer-brand-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.footer-mission {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.footer-bureau-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.06);
    padding: 0.45rem 0.85rem;
    border-radius: 20px;
    font-size: 0.78rem;
    color: #cbd5e1;
}

.bureau-indicator {
    width: 6px;
    height: 6px;
    background-color: #38bdf8;
    border-radius: 50%;
}

.footer-heading {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-nav-list a {
    font-size: 0.88rem;
    color: #94a3b8;
    transition: var(--transition);
}

.footer-nav-list a:hover {
    color: #38bdf8;
    padding-left: 4px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    color: #64748b;
}

.footer-back-to-top a {
    color: #94a3b8;
    font-weight: 600;
}

.footer-back-to-top a:hover {
    color: #ffffff;
}

/* ==============================================================
   RESPONSIVE MEDIA QUERIES
   ============================================================== */

@media (max-width: 1024px) {
    .masthead-nav {
        display: none;
    }
    
    .hero-stage-grid {
        grid-template-columns: 1fr;
    }
    
    .sub-features-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-content-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .lead-story-inner {
        grid-template-columns: 1fr;
    }
    
    .lead-story-media {
        order: -1;
    }
    
    .lead-story-title {
        font-size: 1.5rem;
    }
    
    .sub-features-row {
        grid-template-columns: 1fr;
    }
    
    .article-main-body {
        padding: 1.5rem;
    }
    
    .article-title-main {
        font-size: 1.75rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
