/* DNews Portal - Frontend Styles */

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: none;
}

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

ul, ol {
    list-style: none;
    padding: 0;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.date-time {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.social-links a {
    color: white;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

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

/* ===== SCROLLING TEXT ===== */
.top-bar-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.scrolling-text-container {
    flex: 1;
    max-width: 400px;
    overflow: hidden;
    white-space: nowrap;
    padding: 4px 12px;
    margin-right: 15px;
}

.scrolling-text {
    display: flex;
    animation: scroll-text 15s linear infinite;
    will-change: transform;
}

.scrolling-text[data-speed="slow"] {
    animation-duration: 20s;
}

.scrolling-text[data-speed="medium"] {
    animation-duration: 15s;
}

.scrolling-text[data-speed="fast"] {
    animation-duration: 8s;
}

.scrolling-text[data-speed="very-fast"] {
    animation-duration: 5s;
}

.scroll-content {
    display: inline-block;
    padding-right: 50px; /* Space between copies */
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

@keyframes scroll-text {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .top-bar-right {
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
    }
    
    .scrolling-text-container {
        max-width: 250px;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .social-links {
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .scrolling-text-container {
        max-width: 200px;
    }
    
    .scroll-content {
        font-size: 0.8rem;
    }
}

/* ===== NAVIGATION ===== */
.main-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 40px;
    z-index: 999;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    color: #333 !important;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #007bff !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #007bff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Navigation Menu Styles */
.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: #333 !important;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border: none;
    background: transparent;
}

.nav-link:hover {
    color: #007bff !important;
    background: rgba(0, 123, 255, 0.1);
    text-decoration: none;
}

.nav-link.active {
    color: #007bff !important;
    background: rgba(0, 123, 255, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #007bff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link i {
    font-size: 0.9rem;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* ===== SEARCH SECTION ===== */
.search-section {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.search-form {
    max-width: 700px;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px 0 0 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-btn {
    padding: 12px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #0056b3;
}

/* ===== HEADER ACTIONS ===== */
.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

/* ===== TRENDING TOPICS ===== */
.trending-section {
    background: white;
    padding: 30px 0;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    position: relative;
    padding-left: 20px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #007bff;
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag-breaking {
    background: #dc3545;
    color: white;
}

/* ===== BREAKING NEWS TICKER ===== */
.breaking-news-ticker .ticker-label {
    background: rgba(139, 0, 0, 0.9);
    color: white;
    padding: 5px 15px;
    font-weight: bold;
    border-radius: 3px;
}

.tag-trending {
    background: #28a745;
    color: white;
}

.tag-exclusive {
    background: #ffc107;
    color: #333;
}

.tag-featured {
    background: #17a2b8;
    color: white;
}

.tag-editorial {
    background: #e83e8c;
    color: white;
}

.tag-interview {
    background: #20c997;
    color: white;
}

.tag-analysis {
    background: #fd7e14;
    color: white;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* ===== CATEGORY FILTER ===== */
.category-filter {
    background: white;
    padding: 20px 0;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pill {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    background: #f8f9fa;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-pill:hover,
.category-pill.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* ===== NEWS CARDS ===== */
.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.news-image {
    width: 100% !important;
    height: var(--news-image-height) !important;
    aspect-ratio: var(--news-image-aspect-ratio) !important;
    object-fit: cover;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.news-images-grid {
    display: grid;
    width: 100%;
    height: 100%;
    gap: 2px;
}

.news-images-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.news-images-grid[data-columns="2"] {
    grid-template-columns: 1fr 1fr;
}

.news-images-grid[data-columns="3"] {
    grid-template-columns: 1fr 1fr 1fr;
}

.news-images-grid[data-columns="4"] {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.news-images-grid[data-columns="5"] {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

.news-grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: var(--news-image-aspect-ratio) !important;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-title:hover {
    color: #007bff;
}

.news-excerpt {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
}

.news-author {
    font-weight: 500;
    color: #666;
}

.news-date {
    color: #999;
}

/* ===== PAGINATION ===== */
.pagination {
    justify-content: center;
    margin-top: 40px;
}

.page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    margin: 0 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.page-item.active .page-link {
    background: #007bff;
    border-color: #007bff;
}

/* ===== ARTICLE PAGE ===== */
.article-title {
    font-size: 2rem !important;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.article-excerpt {
    background: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #007bff;
    border-radius: 0 8px 8px 0;
}

.article-excerpt .lead {
    font-size: 1.2rem;
    font-weight: 300;
    color: #495057;
    margin: 0;
    line-height: 1.6;
}

.article-image {
    margin: 30px 0;
    text-align: center;
}

.article-image img {
    max-width: var(--article-image-width);
    height: var(--article-image-height);
    aspect-ratio: var(--article-image-aspect-ratio);
    border-radius: 0px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    object-fit: cover;
}

.article-image img.featured-main {
    width: var(--article-featured-width);
    max-width: 100%;
    height: var(--article-featured-height);
    aspect-ratio: var(--article-featured-aspect-ratio);
    object-fit: cover;
    border-radius: 0px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .top-bar .social-links {
        display: none !important;
    }
    
    .top-bar .scrolling-text {
        display: none !important;
    }
    
    /* Show navigation menu horizontally on mobile */
    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 10px 0 !important;
        gap: 5px !important;
        list-style: none !important;
        margin: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    /* Hide scrollbar for cleaner look */
    .nav-menu::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Make top bar sticky on mobile */
    .top-bar {
        position: sticky !important;
        top: 0 !important;
        z-index: 1001 !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    /* Make navigation sticky on mobile (below top bar) */
    .main-nav {
        position: sticky !important;
        top: 40px !important; /* Adjust based on top bar height */
        z-index: 1000 !important;
        background: white !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    .nav-menu .nav-item {
        flex: 0 0 auto !important;
        margin: 2px !important;
    }
    
    .nav-menu .nav-link {
        white-space: nowrap !important;
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
        display: inline-block !important;
        text-decoration: none !important;
        border-radius: 4px !important;
        transition: all 0.3s ease !important;
    }
    
    .nav-menu .nav-link:hover {
        background: rgba(0, 123, 255, 0.1) !important;
        color: #007bff !important;
    }
    
    .nav-menu .nav-link.active {
        background: #007bff !important;
        color: white !important;
    }
}

/* ===== FOOTER ===== */
.main-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
    position: relative;
    width: 100%;
    left: 0;
    right: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
}

.footer-section {
    margin-bottom: 30px;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #ffffff;
    position: relative;
    padding-bottom: 15px;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
}

.footer-logo img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    filter: brightness(1.1);
}

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

.footer-intro {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    font-weight: 400;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    color: white;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-link:hover {
    color: white;
    transform: translateX(5px);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.footer-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
}

.footer-link:hover i {
    transform: translateX(3px);
    color: white;
}

.footer-contact {
    margin-top: 15px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    font-weight: 400;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.contact-item i {
    margin-right: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    min-width: 20px;
}

.contact-item span {
    line-height: 1.5;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.contact-link:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 40px;
    padding-top: 25px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-bottom p {
    margin: 0;
    font-weight: 400;
}

.footer-bottom a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .main-footer {
        padding: 40px 0 20px;
        margin-top: 40px;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
    
    .footer-title {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .main-footer {
        padding: 30px 0 20px;
    }
    
    .footer-intro {
        font-size: 0.9rem;
    }
    
    .contact-item {
        font-size: 0.9rem;
    }
}

/* ===== HEADER LOGO LAYOUT ===== */
.logo-content {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: fit-content;
}

.logo-placeholder {
    width: 200px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.site-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

/* Title tag - prevent text wrapping to keep all words on single line */
.title-tag {
    font-size: 1.2rem;
    color: #666;
    margin: 0;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.logo-link {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* Responsive Logo Layout */
@media (max-width: 768px) {
    .logo-content {
        gap: 6px;
    }
    
    .site-title {
        font-size: 0.9rem;
    }
    
    .title-tag {
        font-size: 1rem;
    }
    
    .logo-placeholder {
        width: 150px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .logo-content {
        gap: 5px;
    }
    
    .site-title {
        font-size: 0.8rem;
    }
    
    .title-tag {
        font-size: 0.95rem;
    }
    
    .logo-placeholder {
        width: 120px;
        height: 40px;
        font-size: 18px;
    }
}

/* ===== HEADER ANIMATIONS ===== */
.main-header {
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    transition: all 0.3s ease;
    animation: logoPulse 3s ease-in-out infinite;
}

.logo:hover {
    transform: scale(1.1) rotate(2deg);
    filter: brightness(1.2);
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.logo-link {
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-link:hover .logo {
    animation: logoFloat 2s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
}

/* ===== LIVE TIME EFFECTS ===== */
.live-time {
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    animation: timeBlink 1s ease-in-out infinite;
    position: relative;
}

@keyframes timeBlink {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(255,255,255,0.8);
    }
    50% {
        opacity: 0.7;
        text-shadow: 0 0 5px rgba(255,255,255,0.3);
    }
}

@keyframes pulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}


/* ===== YOUTUBE VIDEO SECTIONS ===== */

.youtube-section {
    margin-bottom: 50px;
}

.youtube-section .section-title {
    color: #ff0000;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 700;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.youtube-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.youtube-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.youtube-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.youtube-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-info {
    padding: 20px;
}

.youtube-info h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.youtube-info h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.youtube-info h4 a:hover {
    color: #ff0000;
}

.youtube-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.youtube-date {
    color: #666;
    font-size: 0.9rem;
}

.youtube-link .btn-outline-danger {
    border-color: #ff0000;
    color: #ff0000;
    font-size: 0.85rem;
    padding: 5px 12px;
    transition: all 0.3s ease;
}

.youtube-link .btn-outline-danger:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: white;
}

/* YouTube Sidebar Styles */
.youtube-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* YouTube Sidebar Embed Styles */
.youtube-sidebar-embed {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-video-embed {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-video-embed:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.video-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-embed-info {
    padding: 15px;
}

.video-embed-info h4 {
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.video-embed-info h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.video-embed-info h4 a:hover {
    color: #ff0000;
}

.video-embed-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.video-embed-date {
    color: #666;
}

.video-embed-link .btn-outline-danger {
    border-color: #ff0000;
    color: #ff0000;
    font-size: 0.75rem;
    padding: 4px 8px;
    transition: all 0.3s ease;
}

.video-embed-link .btn-outline-danger:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: white;
}

.sidebar-video-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.sidebar-video-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.sidebar-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-video-thumbnail:hover img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    transition: all 0.3s ease;
}

.sidebar-video-thumbnail:hover .play-overlay {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.sidebar-video-content {
    flex: 1;
    min-width: 0;
}

.sidebar-video-content h4 {
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-video-content h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-video-content h4 a:hover {
    color: #ff0000;
}

.sidebar-video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

.video-date i,
.video-duration i {
    margin-right: 4px;
}

.video-duration {
    color: #ff0000;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .youtube-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .youtube-info h4 {
        font-size: 1.1rem;
    }
    
    .youtube-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .sidebar-video-item {
        gap: 10px;
        padding: 10px;
    }
    
    .sidebar-video-thumbnail {
        width: 70px;
        height: 50px;
    }
    
    .sidebar-video-content h4 {
        font-size: 0.9rem;
    }
    
    .sidebar-video-meta {
        font-size: 0.75rem;
    }
}

/* ===== SIDEBAR STYLES ===== */
.sidebar-section {
    margin-bottom: 2rem;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-title i {
    color: #007bff;
}

.featured-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-news-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.sidebar-news-item:hover {
    background: #f8f9fa;
}

.sidebar-news-item.compact {
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-news-image {
    flex-shrink: 0;
    width: 70px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
}

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

.sidebar-news-content {
    flex: 1;
    min-width: 0;
}

.sidebar-news-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.sidebar-news-content h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-news-content h4 a:hover {
    color: #007bff;
}

.sidebar-news-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.75rem;
    color: #6c757d;
}

.sidebar-news-meta .category-badge {
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
}

.sidebar-news-meta .date {
    font-size: 0.75rem;
}

.latest-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trending-tags-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item-sidebar {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tag-item-sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .trending-tags,
    .category-pills {
        justify-content: center;
    }

    .news-card {
        margin-bottom: 20px;
    }

    .navbar-nav .nav-link {
        margin: 0 5px;
    }

    /* Responsive image grid */
    .news-images-grid[data-columns="3"],
    .news-images-grid[data-columns="4"],
    .news-images-grid[data-columns="5"] {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .search-box {
        padding: 0 20px;
    }

    .search-section {
        justify-content: center;
        margin-bottom: 15px;
    }

    .search-form {
        max-width: 500px;
    }

    .header-actions {
        justify-content: center;
        gap: 8px;
    }

    .social-links {
        gap: 10px;
    }

    /* Responsive image grid for small screens */
    .news-images-grid[data-columns="2"],
    .news-images-grid[data-columns="3"],
    .news-images-grid[data-columns="4"],
    .news-images-grid[data-columns="5"] {
        grid-template-columns: 1fr;
    }
}
    
    /* Scroll to top button mobile adjustments */
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
        z-index: 9999 !important;
        pointer-events: auto !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* ===== LOADING ANIMATION ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.scroll-to-top:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.4);
}

/* Scroll to top button animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-to-top.show {
    display: flex;
    animation: fadeInUp 0.3s ease forwards;
}

/* ===== FOOTER CONTACT STYLES ===== */
.footer-contact {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-item i {
    width: 20px;
    margin-right: 12px;
    color: #007bff;
    font-size: 16px;
    text-align: center;
    flex-shrink: 0;
}

.contact-item span {
    flex: 1;
    line-height: 1.4;
}

.contact-item a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #007bff;
    text-decoration: underline;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-links li a:hover {
    color: #fff;
    text-decoration: none;
    transform: translateX(3px);
    display: inline-block;
}

/* ===== LANGUAGE SWITCHER ===== */
.top-bar-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-switcher i {
    color: #fff;
    font-size: 14px;
}

.language-switcher select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 80px;
}

.language-switcher select:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.language-switcher select option {
    background: #333;
    color: #fff;
}

/* Responsive language switcher */
@media (max-width: 768px) {
    .top-bar-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .language-switcher {
        align-self: flex-end;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .top-bar,
    .main-nav,
    .trending-section,
    .category-filter,
    .pagination,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .news-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* ===== IMAGE GALLERY ===== */
.image-gallery {
    margin: 30px 0;
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-main {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gallery-main img,
.gallery-main-img {
    width: 100%;
    height: var(--article-featured-height) !important;
    aspect-ratio: var(--article-featured-aspect-ratio) !important;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: block;
}

.gallery-main img:hover,
.gallery-main-img:hover {
    opacity: 0.95;
}

/* Navigation Dots */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.gallery-dot:hover {
    background-color: #999;
}

.gallery-dot.active {
    background-color: #667eea;
    transform: scale(1.2);
}

/* Navigation Arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(0,0,0,0.8);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: #667eea;
    color: white;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .gallery-nav.prev {
        left: 5px;
    }
    
    .gallery-nav.next {
        right: 5px;
    }
    
    .gallery-dot {
        width: 10px;
        height: 10px;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 85%;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}
