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

* {
    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-color: rgba(241, 196, 15, 0.1);
    /* Vibrant Yellow with low opacity */
}

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

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

ul {
    list-style: none;
}

/* Header Styles */
header {
    background-color: var(--neutral-light);
    /* Off-White */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 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, #dc2626, #b91c1c);
    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%;
    overflow-x: hidden;
}

.news-card {
    background-color: var(--neutral-light);
    /* Off-White */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateY(-5px);
}

.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-color: var(--accent-yellow);
    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 */
}

.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: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-teal);
    color: var(--neutral-dark);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--accent-purple);
}

/* 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;
    }
}












/* YouTube Videos Grid */
.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* 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;
}