/* ================================
   BAYROQDOR24 - Military News Portal
   Dark Green Military Theme
   ================================ */

/* CSS Variables */
:root {
    /* Primary Colors - Military Green */
    --primary-dark: #1a2e1a;
    --primary: #2d4a2d;
    --primary-light: #3d5c3d;
    --primary-lighter: #4a6b4a;
    
    /* Accent Colors - Gold/Bronze */
    --accent-gold: #c9a227;
    --accent-bronze: #b8860b;
    --accent-copper: #cd7f32;
    
    /* Background Colors */
    --bg-dark: #0d1a0d;
    --bg-main: #121e12;
    --bg-card: #1a2a1a;
    --bg-hover: #243424;
    
    /* Text Colors */
    --text-primary: #e8efe8;
    --text-secondary: #a8b8a8;
    --text-muted: #6b7b6b;
    --text-light: #ffffff;
    
    /* Danger/Alert */
    --danger: #b22222;
    --danger-light: #dc3545;
    
    /* Borders */
    --border-color: #3d5c3d;
    --border-light: rgba(201, 162, 39, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    /* Spacing */
    --container-max: 1400px;
    --section-padding: 40px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================
   TOP BAR
   ================================ */
.top-bar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--bg-dark) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
}

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

.date-time {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-time .separator {
    color: var(--accent-gold);
}

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

.social-links a {
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    color: var(--accent-gold);
    transform: translateY(-2px);
}

/* ================================
   HEADER
   ================================ */
.main-header {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-bottom: 3px solid var(--accent-gold);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

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

.logo img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform var(--transition-normal);
}

.logo:hover img {
    transform: scale(1.05);
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 5px;
}

.nav-list li a {
    display: block;
    padding: 12px 18px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    border-radius: 4px;
    position: relative;
    transition: all var(--transition-fast);
}

.nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width var(--transition-normal);
}

.nav-list li a:hover,
.nav-list li a.active {
    background: var(--bg-hover);
    color: var(--accent-gold);
}

.nav-list li a:hover::after,
.nav-list li a.active::after {
    width: 80%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ================================
   BREAKING NEWS TICKER
   ================================ */
.breaking-news {
    background: linear-gradient(90deg, var(--danger) 0%, var(--danger-light) 100%);
    padding: 10px 0;
    overflow: hidden;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ticker-label {
    background: var(--text-light);
    color: var(--danger);
    padding: 6px 15px;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 3px;
    animation: pulse 2s infinite;
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ticker-content {
    flex: 1;
    overflow: hidden;
}

.ticker-text {
    display: flex;
    gap: 80px;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-text span {
    font-weight: 500;
    color: var(--text-light);
}

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

/* ================================
   MAIN CONTENT
   ================================ */
.main-content {
    padding: var(--section-padding) 0;
}

/* ================================
   HERO SECTION
   ================================ */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: var(--section-padding);
}

.hero-main {
    position: relative;
}

.hero-article {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 100%;
    min-height: 500px;
}

.hero-article a {
    display: block;
    height: 100%;
}

.hero-image {
    position: absolute;
    inset: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.hero-article:hover .hero-image img {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(13, 26, 13, 0.95) 0%, rgba(13, 26, 13, 0.3) 50%, transparent 100%);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    z-index: 1;
}

.category-tag {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--primary-dark);
    padding: 6px 14px;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    margin-bottom: 15px;
}

.category-tag.small {
    padding: 4px 10px;
    font-size: 10px;
}

.hero-content h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-light);
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-excerpt {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Hero Sidebar */
.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-article {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.sidebar-article:hover {
    transform: translateX(-5px);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-lg);
}

.sidebar-article a {
    display: flex;
    gap: 15px;
    padding: 12px;
}

.sidebar-image {
    width: 120px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-content h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sidebar-content .date {
    font-size: 11px;
    color: var(--text-muted);
}

/* ================================
   CATEGORIES SECTION
   ================================ */
.categories-section {
    margin-bottom: var(--section-padding);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 .icon {
    font-size: 1.5rem;
}

.view-all {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-fast);
}

.view-all:hover {
    color: var(--accent-copper);
    transform: translateX(5px);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.articles-grid.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

/* Article Card */
.article-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-gold);
    box-shadow: 0 12px 30px rgba(201, 162, 39, 0.2);
}

.article-card a {
    display: block;
}

.card-image {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.article-card:hover .card-image img {
    transform: scale(1.1);
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(0deg, rgba(26, 42, 26, 0.9) 0%, transparent 100%);
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}

.article-card:hover .card-content h3 {
    color: var(--accent-gold);
}

.card-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Horizontal Article Card */
.article-card.horizontal a {
    display: flex;
    flex-direction: column;
}

.article-card.horizontal .card-image {
    height: 160px;
}

/* ================================
   VIDEO SECTION
   ================================ */
.video-section {
    margin-bottom: var(--section-padding);
}

.video-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 20px;
}

.video-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.video-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.video-thumbnail {
    position: relative;
    height: 200px;
}

.video-card.main-video .video-thumbnail {
    height: 300px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(13, 26, 13, 0.95) 0%, rgba(13, 26, 13, 0.2) 60%);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all var(--transition-fast);
}

.video-card:hover .play-button {
    background: var(--accent-copper);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button svg {
    width: 24px;
    height: 24px;
    color: var(--primary-dark);
    margin-left: 3px;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-light);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    z-index: 2;
}

.video-card h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    z-index: 2;
}

.video-card.main-video h3 {
    font-size: 18px;
    padding: 20px;
}

/* ================================
   FOOTER
   ================================ */
.main-footer {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--bg-dark) 100%);
    border-top: 3px solid var(--accent-gold);
    padding: 50px 0 20px;
    margin-top: var(--section-padding);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section.about {
    padding-right: 30px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 20px;
}

.footer-section.about p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-section h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.footer-section.links ul li {
    margin-bottom: 10px;
}

.footer-section.links ul li a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    display: inline-block;
}

.footer-section.links ul li a:hover {
    color: var(--accent-gold);
    transform: translateX(5px);
}

.footer-section.contact p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-section.contact p strong {
    color: var(--text-primary);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-hover);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

/* ================================
   BACK TO TOP BUTTON
   ================================ */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-gold);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: var(--accent-copper);
    transform: translateY(-5px);
}

#back-to-top svg {
    width: 24px;
    height: 24px;
    color: var(--primary-dark);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-card.main-video {
        grid-column: span 2;
    }
}

@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr;
    }
    
    .hero-article {
        min-height: 400px;
    }
    
    .hero-sidebar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-list li a {
        padding: 10px 12px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 10px 0;
    }
    
    .logo img {
        height: 45px;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        border-top: 1px solid var(--border-color);
        padding: 20px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-list li a {
        padding: 15px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .articles-grid.three-columns {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-sidebar {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content {
        padding: 25px;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-card.main-video {
        grid-column: auto;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section.about {
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid.three-columns {
        grid-template-columns: 1fr;
    }
    
    .hero-article {
        min-height: 350px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .card-image {
        height: 200px;
    }
    
    .ticker-label {
        display: none;
    }
    
    #back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card,
.sidebar-article,
.video-card {
    animation: fadeIn 0.5s ease-out;
}

/* Stagger animation for grid items */
.articles-grid .article-card:nth-child(1) { animation-delay: 0.1s; }
.articles-grid .article-card:nth-child(2) { animation-delay: 0.2s; }
.articles-grid .article-card:nth-child(3) { animation-delay: 0.3s; }
.articles-grid .article-card:nth-child(4) { animation-delay: 0.4s; }

/* Military-style decorative elements */
.section-header h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--accent-gold);
    margin-right: 12px;
    border-radius: 2px;
}

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}
