/* Shared UI Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-border);
    color: var(--color-dark);
}

.btn-outline:hover {
    border-color: var(--color-dark);
    background-color: var(--color-hover-bg);
}

.btn-danger {
    background-color: #fef2f2;
    color: var(--color-danger);
    border-color: #fee2e2;
}

.btn-danger:hover {
    background-color: var(--color-danger);
    color: #ffffff;
}

.btn-sm {
    height: 32px;
    padding: 0 16px;
    font-size: 0.8rem;
}

/* Cards */
.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: var(--transition-fast);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    padding: var(--space-card);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: var(--space-card);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark-navy);
}

.form-control {
    width: 100%;
    height: 42px;
    padding: 0 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-dark);
    transition: var(--transition-fast);
    background-color: #fff;
}

textarea.form-control {
    height: auto;
    padding: 15px;
    min-height: 120px;
    resize: vertical;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

/* Search Input */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 15px;
    color: var(--color-muted);
}

.search-input-wrapper .form-control {
    padding-left: 40px;
    border-radius: 40px;
}

/* Section Titles */
.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 30px;
    background-color: var(--color-primary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: rgba(211, 47, 47, 0.1); color: var(--color-primary); }
.badge-success { background: #d1fae5; color: var(--color-success); }
.badge-warning { background: #fef3c7; color: var(--color-warning); }
.badge-danger { background: #fee2e2; color: var(--color-danger); }
.badge-muted { background: #f3f4f6; color: var(--color-muted); }

/* Frontend Metro News Styling */


:root {
    /* Colors */
    --color-primary: #d32f2f; /* Deep red accent */
    --color-primary-hover: #b71c1c;
    --color-dark: #111827; /* Dark navy/black */
    --color-dark-navy: #1f2937;
    --color-muted: #6b7280;
    --color-bg-light: #f8fafc; /* Off-white */
    --color-border: #e5e7eb;
    --color-card-bg: #ffffff;
    --color-hover-bg: #f3f4f6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
  
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
  
    /* Spacing */
    --space-section: 60px;
    --space-card: 20px;
    --space-grid-gap: 30px;
    --container-width: 1200px;
  
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
  
    /* Shadows */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: all 0.2s ease;

    /* Legacy Map */
    --primary-font: var(--font-heading);
    --secondary-font: var(--font-body);
    --accent-red: var(--color-primary);
    --text-dark: var(--color-dark);
    --text-body: var(--color-muted);
    --bg-light: var(--color-bg-light);
    --border-color: var(--color-border);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: var(--container-width, 1200px);
    margin: 0 auto;
    padding: 0 15px;
}

html {
    overflow-x: hidden;
    width: 100%;
}

img, video {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-dark);
}

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

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

/* --- HEADER --- */
.main-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-red);
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.main-nav a {
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-nav a:hover {
    color: var(--accent-red);
    background-color: #fff0f1;
}

.main-nav a.active {
    color: #ffffff !important;
    background-color: var(--accent-red);
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}
.search-icon {
    color: var(--accent-red);
    cursor: pointer;
    font-size: 1.3rem;
}
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* --- BREAKING TICKER --- */
.breaking-news-bar {
    background: var(--color-dark-navy);
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 40px;
    border-top: 2px solid var(--accent-red);
}

.breaking-badge {
    background: var(--accent-red);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
    text-transform: uppercase;
}

.breaking-ticker {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    box-sizing: border-box;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 25s linear infinite;
    font-size: 0.9rem;
    font-weight: 500;
}

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

.ticker-separator {
    color: var(--accent-red);
    margin: 0 15px;
}

@keyframes ticker {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* --- HERO SECTION --- */
.hero-section {
    max-width: var(--container-width);
    margin: var(--space-section) auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-grid-gap);
}

.featured-main {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    color: white;
    height: 500px;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-main:hover .featured-img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 40px;
    z-index: 2;
}

.category-badge {
    background: var(--accent-red);
    color: white;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 15px;
}

.featured-overlay h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
}

.featured-overlay p {
    font-size: 1rem;
    opacity: 0.9;
}

.latest-headlines {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.headline-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.headline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.headline-category {
    color: var(--accent-red);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.headline-title {
    font-size: 1.2rem;
    margin: 8px 0;
    line-height: 1.4;
}
.headline-title a:hover {
    color: var(--accent-red);
}

.headline-meta {
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* --- TOP STORIES --- */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    border-left: 4px solid var(--accent-red);
    padding-left: 15px;
    text-transform: uppercase;
}

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

.story-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition-fast);
}

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

.story-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.empty-stories {
    grid-column: span 3;
    text-align: center;
    padding: 40px;
    color: var(--color-muted);
    background: #fff;
    border-radius: var(--radius-md);
}

/* --- VIDEOS SECTION --- */
.videos-section {
    background: var(--color-dark-navy);
    padding: 60px 0;
    color: white;
}

.videos-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.videos-header h2 {
    color: white;
    border-left-color: var(--accent-red);
}

.view-all {
    color: var(--accent-red);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}
.view-all:hover {
    text-decoration: underline;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.video-card {
    position: relative;
    cursor: pointer;
}

.video-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-md);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.video-card:hover img {
    opacity: 1;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    border: 2px solid white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    transition: var(--transition-fast);
}

.video-card:hover .play-btn {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

.play-btn i {
    margin-left: 3px;
    color: white;
}

.video-card h4 {
    margin-top: 15px;
    font-size: 1rem;
    color: white;
    font-family: var(--font-body);
}

/* --- CATEGORY GRID --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.cat-block h3 {
    border-bottom: 2px solid var(--color-dark);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1rem;
    text-transform: uppercase;
}

.cat-block p {
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.cat-block span {
    font-size: 0.8rem;
    color: var(--color-muted);
}

.gallery-block {
    grid-column: span 2;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.gallery-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* --- NEWSLETTER SECTION --- */
.newsletter-section {
    padding: var(--space-section) 0;
    background: #fff;
    border-top: 1px solid var(--border-color);
}

.newsletter-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.newsletter-card {
    background: var(--color-bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    box-shadow: var(--shadow-card);
}

.newsletter-text {
    flex: 1;
}

.newsletter-text h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.newsletter-text p {
    color: var(--color-muted);
}

.newsletter-form {
    flex: 1;
    display: flex;
    gap: 15px;
}

.newsletter-form .form-control {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
}

.newsletter-form .form-control:focus {
    outline: none;
    border-color: var(--accent-red);
}

.newsletter-form .btn {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 0 30px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form .btn:hover {
    background: var(--color-primary-hover);
}

/* --- FOOTER --- */
.main-footer {
    background: var(--color-dark-navy);
    color: #d1d5db;
    padding-top: 60px;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand h2 {
    color: white;
    margin-bottom: 20px;
}

.footer-brand p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--accent-red);
}

.link-column h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-family: var(--font-body);
    letter-spacing: 1px;
}

.link-column a {
    display: block;
    color: #9ca3af;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.link-column a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    background: #111827;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #6b7280;
}

.tagline {
    font-style: italic;
    font-family: var(--font-heading);
}

/* Utilities */
.ad-container {
    max-width: var(--container-width);
    margin: 20px auto;
    background: var(--color-border);
    padding: 30px;
    text-align: center;
    color: var(--color-muted);
    font-weight: bold;
    letter-spacing: 2px;
    border-radius: var(--radius-md);
}

/* --- RESPONSIVE GRIDS --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}
.latest-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 40px;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* --- MOBILE MENU STYLES --- */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: -300px;
    width: 300px;
    max-width: 80vw;
    height: 100vh;
    background: white;
    padding: 30px 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active .mobile-menu-content {
    right: 0;
}

.mobile-menu-close {
    align-self: flex-end;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-dark);
    margin-bottom: 30px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav a {
    font-size: 1.2rem;
    font-family: var(--font-heading);
    color: var(--color-dark);
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 15px;
}

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

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
    }
    .featured-main {
        height: 400px;
    }
    .videos-grid, .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero-section {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    .featured-main {
        height: 300px;
    }
    .featured-overlay h1 {
        font-size: 1.8rem;
    }
    .stories-grid {
        grid-template-columns: 1fr;
    }
    .videos-grid, .category-grid {
        grid-template-columns: 1fr;
    }
    .gallery-block {
        grid-column: span 1;
    }
    .newsletter-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .newsletter-text h2 {
        font-size: 1.5rem;
    }
    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }
    .contact-grid, .latest-grid, .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        gap: 40px;
    }
    .latest-grid {
        gap: 30px;
    }
    .newsletter-form .btn {
        width: 100%;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 20px 30px;
    }
    .footer-brand h2 {
        font-size: 1.5rem;
    }
    .footer-bottom-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* --- DARK MODE --- */
body[data-theme='dark'] {
    --color-dark: #f9fafb;
    --color-dark-navy: #111827;
    --color-muted: #9ca3af;
    --color-bg-light: #111827;
    --color-border: #374151;
    --color-card-bg: #1f2937;
    --color-hover-bg: #374151;
    --text-dark: #f9fafb;
    --text-body: #d1d5db;
    --bg-light: #111827;
    --border-color: #374151;
}

body[data-theme='dark'] .main-header {
    background: #1f2937;
    border-bottom-color: #374151;
}

body[data-theme='dark'] .main-nav a {
    color: #f9fafb;
}

body[data-theme='dark'] .main-nav a:hover {
    color: var(--color-primary);
    background-color: #374151;
}

body[data-theme='dark'] .header-actions i {
    color: #f9fafb;
}

body[data-theme='dark'] .breaking-news-bar {
    background: #111827;
}

body[data-theme='dark'] .latest-headlines,
body[data-theme='dark'] .story-card,
body[data-theme='dark'] .newsletter-section,
body[data-theme='dark'] .newsletter-card,
body[data-theme='dark'] .form-control {
    background: #1f2937;
    color: #f9fafb;
}

body[data-theme='dark'] .empty-stories {
    background: #1f2937;
}

body[data-theme='dark'] .search-form {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

body[data-theme='dark'] .search-form input {
    color: #f9fafb !important;
}
