/* Base Styles */
@import url('colors.css');

:root {
    --max-width: 1200px;
    --gutter: 20px;
    --space-lg: 48px;
    --space-md: 24px;
    --space-sm: 12px;
    --primary-color: #2b6cb0;
    --secondary-color: #764ba2;
    --accent-color: #e11d48;
    --neutral-dark: #1f2937;
    --white: #ffffff;
}

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

html,
body {
    max-width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--neutral-dark);
    background: linear-gradient(135deg, #fff9c4 0%, #ffffff 50%, #e1f5fe 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Site wrapper and section spacing */
.site-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

main {
    padding: var(--space-md) 0;
}

section {
    padding: var(--space-md) 0;
}

.section-title {
    margin-bottom: var(--space-md);
    font-size: 1.6rem;
}

/* Improve consistent card and panel spacing */
.card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16,24,40,0.06);
}

/* Focus-visible for keyboard accessibility */
:focus {
    outline: none;
}

:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid rgba(59,130,246,0.18);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 10px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 10000;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
}

/* Button utilities */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59,130,246,0.12);
}

.btn-secondary {
    background: var(--secondary-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header Styles */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: none;
}

header::after {
    content: '';
    display: block;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    height: 60px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

nav ul {
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 20px;
    position: relative;
}

nav ul li a {
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

nav ul li a:hover,
nav ul li a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
    transform: translateY(-2px);
}

/* Simple Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    min-width: 160px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--primary-color);
    transition: background-color 0.2s ease;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: var(--gradient-primary);
    color: var(--white);
}

.dropdown-toggle i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.auth-buttons button {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.auth-buttons button:first-child {
    margin-left: 0;
}

.auth-buttons button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Breaking News Ticker Styles */
.breaking-news {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    padding: 0;
    margin: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    border-bottom: 3px solid #991b1b;
}

.breaking-news-container {
    display: flex;
    align-items: center;
    height: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breaking-news-label {
    background: #991b1b;
    color: white;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0 25px 25px 0;
    margin-right: 20px;
    position: relative;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.breaking-news-label::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 10px;
    background: #991b1b;
    border-radius: 25px 0 0 25px;
}

.breaking-news-label i {
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.breaking-news-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.breaking-news-ticker {
    display: flex;
    animation: scroll-left 60s linear infinite;
    white-space: nowrap;
}

.breaking-news-item {
    margin-right: 150px;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    position: relative;
    padding: 0 20px;
    transition: all 0.3s ease;
}

.breaking-news-item::before {
    content: '🔴';
    margin-right: 15px;
    font-size: 10px;
    animation: pulse 2s infinite;
}

.breaking-news-item::after {
    content: '|';
    position: absolute;
    right: -75px;
    color: #fbbf24;
    font-weight: bold;
    font-size: 18px;
    opacity: 0.7;
}

.breaking-news-item:hover {
    color: #fbbf24;
    cursor: pointer;
    transform: scale(1.02);
}

.breaking-news-item.loading-item {
    color: #fbbf24;
    font-style: italic;
    animation: none;
}

.breaking-news-item.loading-item::before {
    content: '';
    margin-right: 10px;
}

.breaking-news-item.loading-item::after {
    display: none;
}

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

    100% {
        transform: translateX(-100%);
    }
}



/* Responsive Breaking News */
@media (max-width: 768px) {
    .breaking-news-container {
        padding: 0 15px;
        height: 45px;
    }

    .breaking-news-label {
        padding: 10px 15px;
        font-size: 12px;
        margin-right: 15px;
    }

    .breaking-news-item {
        font-size: 14px;
        margin-right: 120px;
        padding: 0 15px;
    }

    .breaking-news-item::after {
        right: -60px;
        font-size: 16px;
    }
}

/* Main Content Styles */
main {
    padding: 0 0 30px;
}

.latest-news-section {
    margin-bottom: 40px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.news-card {
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
    position: relative;
    width: 100%;
}

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

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

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

.news-category {
    display: inline-block;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: var(--neutral-dark);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
    font-weight: 600;
}

.news-content h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--primary-color);
    /* Deep Blue */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    line-height: 1.4;
}

.news-content p {
    color: var(--neutral-dark);
    /* Charcoal Black */
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    color: #999;
    font-size: 12px;
    margin-top: auto;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    font-size: 18px;
    color: #666;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.pagination button {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover:not([disabled]) {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination button[disabled] {
    background: #ccc;
    cursor: not-allowed;
}

#currentPage {
    font-weight: 600;
}

/* Enhanced Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--white);
    margin: 15% auto;
    padding: 0;
    border-radius: 8px;
    width: 80%;
    max-width: 320px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    border: none;
    overflow: hidden;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content.news-detail {
    max-width: 800px;
}

/* Enhanced Close Button */
.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.close:hover {
    color: var(--white);
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Login Modal Specific Styles */
.modal-content h2 {
    background: var(--gradient-primary);
    color: var(--white);
    margin: 0;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-radius: 8px 8px 0 0;
    position: relative;
    overflow: hidden;
}

.modal-content h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.modal-content form {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--neutral-dark);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 13px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e1e5e9;
    border-radius: 5px;
    background-color: var(--white);
    transition: all 0.3s ease;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover {
    border-color: var(--primary-light);
}

/* Input validation states */
.form-group input:valid {
    border-color: var(--success);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

/* Enhanced Login Button */
form button[type="submit"] {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

form button[type="submit"] i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

form button[type="submit"]:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.3);
}

form button[type="submit"]:hover i {
    transform: translateX(3px);
}

form button[type="submit"]:active {
    transform: translateY(0);
}

/* Loading state for login button */
form button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

form button[type="submit"].loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Login Footer */
.login-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e1e5e9;
    text-align: center;
}

.login-footer p {
    color: #666;
    font-size: 11px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.login-footer i {
    color: var(--success);
    font-size: 12px;
}

/* News Detail Styles */
.news-detail-header {
    margin-bottom: 20px;
}

.news-detail-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.news-detail-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.news-detail-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.news-detail-content {
    line-height: 1.8;
}

/* Section Styles */
.section-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: none;
    background: linear-gradient(45deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    display: flex;
    align-items: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #8e44ad);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 120px;
}

.section-title i {
    margin-right: 10px;
    background: linear-gradient(135deg, #ff9ff3, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 350px;
}

.toast {
    width: 100%;
    margin-bottom: 15px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s ease-out forwards;
    opacity: 0;
    transform: translateX(100%);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
}

.toast.success {
    background-color: #ffffff;
    color: #333333;
    border-left: 5px solid #4CAF50;
}

.toast.error {
    background-color: #ffffff;
    color: #333333;
    border-left: 5px solid #F44336;
}

.toast.info {
    background-color: #ffffff;
    color: #333333;
    border-left: 5px solid #2196F3;
}

.toast-icon {
    margin-right: 12px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success .toast-icon {
    color: #4CAF50;
}

.toast.error .toast-icon {
    color: #F44336;
}

.toast.info .toast-icon {
    color: #2196F3;
}

.toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 24px;
    height: 24px;
}

.toast-close:hover {
    color: #333;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.1);
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transition: width linear;
}

.toast.success .toast-progress-bar {
    background-color: #4CAF50;
}

.toast.error .toast-progress-bar {
    background-color: #F44336;
}

.toast.info .toast-progress-bar {
    background-color: #2196F3;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Responsive Styles */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    .logo img {
        height: 50px;
    }

    .logo h1 {
        font-size: 24px;
    }

    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px;
    }

    nav ul li a {
        padding: 6px 10px;
        font-size: 14px;
    }

    /* Mobile dropdown */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0;
        min-width: auto;
        display: none;
    }

    .dropdown:hover .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        padding: 6px 10px;
        font-size: 14px;
        margin: 2px 0;
        border-radius: 4px;
    }

    .auth-buttons {
        margin-top: 15px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 85%;
        margin: 25% auto;
        max-width: 280px;
    }

    .modal-content h2 {
        padding: 14px 16px;
        font-size: 16px;
    }

    .modal-content form {
        padding: 16px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .form-group input {
        padding: 8px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    form button[type="submit"] {
        padding: 8px 14px;
        font-size: 12px;
    }

    .login-footer {
        margin-top: 10px;
        padding-top: 10px;
    }

    .login-footer p {
        font-size: 10px;
    }

    .toast-container {
        width: 90%;
        right: 5%;
    }
}

/* Enhanced News Detail Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #ffffff;
    margin: 2% auto;
    padding: 0;
    border: none;
    border-radius: 15px;
    width: 95%;
    max-width: 1000px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content.news-detail {
    max-width: 1000px;
    padding: 0;
}

.close {
    color: #666;
    float: right;
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    right: 25px;
    top: 20px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close:hover,
.close:focus {
    color: #fff;
    background: #e74c3c;
    transform: scale(1.1);
    text-decoration: none;
    cursor: pointer;
}

/* News Detail Container */
.news-detail-container {
    padding: 40px;
    line-height: 1.8;
    font-family: 'Georgia', serif;
}

/* Article Header */
.news-detail-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 25px;
}

.news-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.news-detail-title {
    font-size: 2.2em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    line-height: 1.3;
    text-align: left;
}

.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

.meta-item i {
    color: #3498db;
    font-size: 16px;
}

/* Article Image */
.news-detail-image {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.news-detail-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-detail-image:hover img {
    transform: scale(1.02);
}

/* Article Content */
.news-detail-content {
    margin-top: 30px;
}

.article-body {
    font-size: 18px;
    line-height: 1.8;
    color: #34495e;
    margin-bottom: 40px;
    text-align: justify;
}

.article-body p {
    margin-bottom: 20px;
}

/* Article Footer */
.article-footer {
    border-top: 2px solid #f0f0f0;
    padding-top: 30px;
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.article-tags i {
    color: #3498db;
    font-size: 16px;
}

.tag {
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    color: #2c3e50;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.article-share span {
    color: #7f8c8d;
    font-weight: 500;
    font-size: 14px;
}

.share-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    color: white;
}

.share-btn:nth-child(2) {
    background: #3b5998;
}

/* Facebook */
.share-btn:nth-child(3) {
    background: #1da1f2;
}

/* Twitter */
.share-btn:nth-child(4) {
    background: #25d366;
}

/* WhatsApp */

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Related News Section */
.related-news-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 3px solid #3498db;
}

.related-news-section h3 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.related-news-section h3 i {
    color: #3498db;
    font-size: 24px;
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.related-news-card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.related-news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.related-news-image {
    height: 180px;
    overflow: hidden;
}

.related-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.related-news-content {
    padding: 20px;
}

.related-news-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.4;
}

.related-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #7f8c8d;
}

.related-category {
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.related-date {
    font-weight: 500;
}

.no-related {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Mobile Responsive for News Detail */
@media (max-width: 768px) {
    .modal-content {
        width: 98%;
        margin: 1% auto;
        max-height: 98vh;
    }

    .news-detail-container {
        padding: 20px;
    }

    .news-detail-title {
        font-size: 1.8em;
    }

    .news-detail-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .related-news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .close {
        right: 15px;
        top: 15px;
        font-size: 28px;
        width: 35px;
        height: 35px;
    }
}




/* Media layout: left 50% / right 50% */
.media-layout {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 30px;
    align-items: start;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .media-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* YouTube Videos Grid (2 items per row in the left column) */
.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 12px 0;
}

@media (max-width: 900px) {
    .youtube-videos-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .youtube-videos-grid {
        grid-template-columns: 1fr;
    }
}

/* Latest News: horizontal scroll on the right column */
.media-right .news-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 8px;
    scroll-behavior: smooth;
}

.media-right .news-grid::-webkit-scrollbar { height: 10px; }
.media-right .news-grid::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 10px; }

.media-right .news-card { min-width: 260px; flex: 0 0 300px; width: auto; }

@media (max-width: 992px) {
    .media-right .news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

/* View More Button Styles */
.view-more-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
}

.view-more-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

/* Individual video card */
.youtube-video-card {
    cursor: pointer;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.youtube-video-card:hover {
    transform: scale(1.02);
}

.youtube-video-thumbnail {
    position: relative;
}

.youtube-video-thumbnail img {
    width: 100%;
    display: block;
}

.youtube-video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 32px;
    background: rgba(0, 0, 0, 0.5);
    padding: 12px;
    border-radius: 50%;
}

/* Video content (title, category, etc.) */
.youtube-video-content {
    padding: 10px 15px;
}

.youtube-video-category {
    font-size: 12px;
    color: #999;
}

.youtube-video-title {
    margin: 5px 0;
    font-size: 16px;
    color: #333;
}

.youtube-video-date {
    font-size: 12px;
    color: #aaa;
}

/* YouTube Modal – Centered and Responsive */
.youtube-video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.youtube-video-modal-content {
    position: relative;
    width: 90%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}


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

.youtube-video-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#closeYoutubeModal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive fix for small devices */
@media (max-width: 480px) {
    .youtube-video-modal-content {
        margin: 10px;
    }
}

/* Loading Text */
.loading {
    text-align: center;
    color: #555;
    font-size: 16px;
    padding: 20px;
}


/* Date/Time Display - Top Right */
.datetime-display {
    position: absolute;
    top: -35px;
    right: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #dc3545;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.datetime-display span {
    display: inline-block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Header Layout Fix */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: relative;
    margin-top: 40px;
}

/* Logo positioning - left side */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
    order: 1;
}

/* Desktop nav - center */
.desktop-nav {
    order: 2;
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Hamburger - right side */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
    order: 4;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 15;
}

.hamburger:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

/* Professional Mobile Sidebar */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 80%;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    padding: 0;
    z-index: 2000;
    border-left: 1px solid #e0e0e0;
    overflow-x: hidden;
}

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

.mobile-menu ul {
    list-style: none;
    padding: 60px 0 20px 0;
    margin: 0;
    height: 100%;
    overflow-y: auto;
    background: #ffffff;
}

.mobile-menu ul li {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu ul li a {
    display: block;
    padding: 16px 25px;
    font-size: 15px;
    font-weight: 500;
    color: #333333;
    transition: all 0.2s ease;
    text-decoration: none;
    background: #fff99f;
}

.mobile-menu ul li a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border-left: 4px solid #667eea;
}

.mobile-menu ul li a.admin-link {
    color: #dc3545;
    font-weight: 600;
    background: #fff5f5;
    border-top: 1px solid #ffe6e6;
}

.close-menu {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    font-size: 18px;
    cursor: pointer;
    color: #666666;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-menu:hover {
    background: #e9ecef;
    color: #333333;
    border-color: #d0d0d0;
}

/* Admin Links Styling */
.mobile-menu ul li a.admin-link:hover {
    background: #fff0f0;
    color: #dc3545;
}

/* Responsive rules */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .hamburger {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
    }

    header .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
        margin-top: 35px;
    }

    .logo {
        order: 1;
        align-self: flex-start;
    }

    .datetime-display {
        order: 2;
        position: absolute;
        top: -30px;
        right: 20px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .logo img {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        width: 55%;
        max-width: none;
        right: -100%;
    }

    .hamburger {
        top: 10px;
        right: 15px;
    }

    header .container {
        padding: 8px 15px;
        margin-top: 30px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo img {
        height: 40px;
    }

    .datetime-display {
        font-size: 10px;
        top: -25px;
        right: 15px;
        padding: 3px 6px;
    }
}


.footer-links ul {
    list-style: none;
    /* removes bullets */
    padding: 0;
    margin: 0;
    display: flex;
    /* makes list horizontal */
    gap: 10px;
    /* space between items */
}

.footer-links li a {
    white-space: nowrap;
    /* keeps "About Us" in one line */
    text-decoration: none;
}

/* Popup News Modal Styles */
.popup-news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.popup-news-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.popup-news-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

.popup-news-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.popup-news-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    flex-shrink: 0;
}

.popup-news-text {
    flex: 1 1 auto;
    padding: 30px;
    overflow-y: auto;
    min-height: 0;
    max-height: 350px;
}

@media (max-width: 768px) {
    .popup-news-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }

    .popup-news-image {
        height: 200px;
    }

    .popup-news-text {
        padding: 20px;
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .popup-news-content {
        width: 98%;
        border-radius: 10px;
    }

    .popup-news-image {
        height: 180px;
    }

    .popup-news-text {
        padding: 15px;
        max-height: 180px;
    }
}


.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10002;
    transition: all 0.3s ease;
}

.popup-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.popup-news-body {
    display: flex;
    flex-direction: column;
}

.popup-news-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

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

.popup-news-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: pulse 2s infinite;
}

.popup-news-text {
    padding: 30px;
}

.popup-news-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.popup-news-text p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 25px 0;
}

.popup-news-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.popup-read-more-btn,
.popup-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.popup-read-more-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.popup-read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.popup-video-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.popup-video-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.popup-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #888;
}

.popup-news-source {
    font-weight: 600;
    color: var(--primary-color);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .popup-news-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }

    .popup-news-image {
        height: 200px;
    }

    .popup-news-text {
        padding: 20px;
    }

    .popup-news-text h2 {
        font-size: 22px;
    }

    .popup-news-text p {
        font-size: 15px;
    }

    .popup-news-actions {
        flex-direction: column;
        gap: 10px;
    }

    .popup-read-more-btn,
    .popup-video-btn {
        justify-content: center;
        width: 100%;
    }

    .popup-news-meta {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .popup-news-content {
        width: 98%;
        border-radius: 10px;
    }

    .popup-news-image {
        height: 180px;
    }

    .popup-news-text {
        padding: 15px;
    }

    .popup-news-text h2 {
        font-size: 20px;
    }

    .popup-close-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Fallback Content Styles */
.fallback-card {
    border: 2px dashed var(--primary-color);
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.05), rgba(241, 196, 15, 0.1));
    position: relative;
    overflow: hidden;
}

.fallback-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(241, 196, 15, 0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
    pointer-events: none;
}

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

    100% {
        transform: translateX(100%);
    }
}

.fallback-card .news-category {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fallback-card h3 {
    color: var(--primary-color);
    font-weight: 700;
}

.fallback-card .news-date {
    color: var(--primary-color);
    font-weight: 600;
    font-style: italic;
}

/* Trending fallback styles */
.trending-card.fallback-card {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(52, 152, 219, 0.1));
    border-color: var(--accent-blue);
}

.trending-card.fallback-card .news-category {
    background: var(--accent-blue);
}

.trending-card.fallback-card h3 {
    color: var(--accent-blue);
}

/* Slider fallback styles */
.slide.fallback-slide {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.05), rgba(46, 204, 113, 0.1));
    border: 2px dashed var(--accent-green);
}

.slide.fallback-slide .slide-content h2 {
    color: var(--accent-green);
}

.slide.fallback-slide .read-more-btn {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.slide.fallback-slide .read-more-btn:hover {
    background: var(--accent-green-dark);
    border-color: var(--accent-green-dark);
}

/* --- New Features & Dark Mode --- */

/* Card Actions (Bookmark & Share) */
.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #bdc3c7;
    transition: all 0.3s ease;
    font-size: 1.2em;
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    color: #ff6b6b;
    transform: scale(1.1);
    background-color: rgba(255, 107, 107, 0.1);
    border-radius: 50%;
}

.action-btn.bookmarked {
    color: #f1c40f; /* Yellow for saved */
}

/* Floating Action Button for Saved News */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 990; /* Below modals */
}

.fab-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9966, #ff5e62);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.fab-btn:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 6px 20px rgba(255, 94, 98, 0.5);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    .news-card, .modal-content, header, .mobile-menu, .popup-news-content, .related-news-card {
        background-color: #1e1e1e;
        color: #e0e0e0;
        border-color: #333;
    }

    .news-content h3, .news-detail-title, .related-news-content h4 {
        color: #ffffff;
    }

    .news-content p, .article-body {
        color: #b0b0b0;
    }

    .card-actions {
        border-top-color: rgba(255,255,255,0.1);
    }

    .search-container input {
        background-color: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }
}

/* Search Bar Styles */
.search-section {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.search-container {
    display: flex;
    width: 100%;
    max-width: 600px;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 15px 20px;
    padding-right: 60px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

@media (max-width: 1024px) {
    .youtube-videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .youtube-videos-grid {
        grid-template-columns: 1fr;
    }
}

/* Horizontal Scroll Wrapper & Buttons */
.news-scroll-wrapper {
    position: relative;
    display: block;
    align-items: center;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex; /* show on desktop */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.scroll-arrow:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.05);
}

.scroll-arrow.left { left: -25px; }
.scroll-arrow.right { right: -25px; }

/* When in the right column, arrows sit closer to the list */
.media-right .scroll-arrow.left { left: -18px; }
.media-right .scroll-arrow.right { right: -18px; }

@media (max-width: 992px) {
    /* On smaller screens the layout stacks and touch scrolling is preferred */
    .scroll-arrow { display: none; }
}