/* Main Styles */
:root {
    --primary-color: #2563eb;
    --primary-rgb: 37, 99, 235;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #0ea5e9;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1e293b;
}

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

a:hover {
    color: var(--secondary-color);
}

/* Header & Navigation */
.navbar {
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
    background-color: var(--dark-color) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
}

.navbar .dropdown-item {
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.navbar .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Search Form */
.search-form .form-control {
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.search-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-form .form-control:focus {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.search-form .btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: var(--dark-color);
    color: white;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Featured Articles */
.featured-article {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    height: 500px;
}

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

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

.featured-article-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    color: white;
}

.featured-article-content h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.featured-article-content p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

/* Article Cards */
.article-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.article-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.article-card .article-meta {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 0.75rem;
}

.article-card .card-text {
    flex: 1;
    margin-bottom: 1rem;
}

/* Category Pills */
.category-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background-color: var(--primary-color);
    color: white;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: var(--transition);
}

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

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0;
}

footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

footer a:hover {
    color: white;
    text-decoration: none;
}

footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-right: 0.75rem;
    transition: var(--transition);
}

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

/* News Ticker */
.ticker-wrapper {
    overflow: hidden;
    width: 100%;
}

.ticker {
    position: relative;
    width: 100%;
    height: 24px;
    overflow: hidden;
}

.ticker__item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: opacity 0.5s ease;
}

.ticker__item:not(:first-child) {
    display: none;
    opacity: 0;
}

.ticker__item a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Language Switcher */
.language-switcher .btn {
    color: white;
    background-color: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

.language-switcher .btn:hover,
.language-switcher .btn:focus {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.language-switcher .dropdown-menu {
    min-width: 10rem;
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
}

.language-switcher .dropdown-item {
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.language-switcher .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.language-switcher .dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
}

.language-flag {
    font-size: 1.2rem;
}

/* Ad Containers */
.ad-container {
    position: relative;
    width: 100%;
    text-align: center;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 2rem;
}

.ad-label {
    position: relative;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--gray-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-banner {
    display: block;
    transition: var(--transition);
}

.ad-banner:hover {
    opacity: 0.9;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Sponsored Content Styling */
.sponsored-content-banner {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.sponsored-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sponsor-info {
    font-size: 0.9rem;
}

/* Weather Widget Styling */
.weather-widget {
    overflow: hidden;
}

.weather-widget .current-weather {
    background-color: rgba(13, 110, 253, 0.05);
    padding: 1.5rem;
    text-align: center;
}

.weather-widget .weather-icon {
    width: 64px;
    height: 64px;
}

.weather-widget .temperature {
    font-size: 2rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.weather-widget .weather-description {
    margin-bottom: 1rem;
    text-transform: capitalize;
}

.weather-widget .weather-details {
    display: flex;
    justify-content: space-around;
    font-size: 0.9rem;
}

.weather-widget .forecast .list-group-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.weather-widget .forecast .day {
    width: 40px;
}

.weather-widget .forecast .icon img {
    width: 40px;
    height: 40px;
}

.weather-widget .forecast .description {
    flex-grow: 1;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.weather-widget .forecast .temps {
    text-align: right;
}

.weather-widget .forecast .max-temp {
    color: var(--danger-color);
}

.weather-widget .forecast .min-temp {
    color: var(--info-color);
}

/* Comment Styles */
.comment-section {
    margin-top: 2rem;
}

.comment-section .card {
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.comment-section .card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.comment-form textarea {
    border-radius: var(--border-radius);
    resize: none;
}

.comment-section .replies {
    margin-left: 2rem;
}

.comment-section .reply-toggle {
    color: var(--primary-color);
    text-decoration: none;
}

.comment-section .reply-toggle:hover {
    text-decoration: underline;
}

/* Comment Reply Page */
.original-comment .card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}

.existing-replies .card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}

.reply-form textarea {
    border-radius: var(--border-radius);
    resize: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.reply-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.pagination .page-item {
    margin: 0 0.25rem;
}

.pagination .page-link {
    border-radius: var(--border-radius);
    color: var(--primary-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    transition: var(--transition);
    font-weight: 500;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pagination .page-item.disabled .page-link {
    color: var(--gray-color);
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .featured-article {
        height: 350px;
    }

    .featured-article-content {
        padding: 1.5rem;
    }

    .featured-article-content h2 {
        font-size: 1.5rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .search-form {
        margin-top: 1rem;
        margin-bottom: 1rem;
        width: 100%;
    }

    /* Mobile language switcher */
    .language-switcher {
        margin-top: 1rem;
        margin-bottom: 1rem;
        width: 100%;
        text-align: center;
    }

    .language-switcher .btn {
        color: var(--dark-color);
        width: 100%;
        border: 1px solid rgba(0, 0, 0, 0.1);
        padding: 0.5rem 1rem;
    }

    /* Mobile pagination */
    .pagination .page-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .pagination .page-item {
        margin: 0 0.15rem;
    }
}
