/**
 * News Portal CMS - Main Stylesheet
 * Modern, responsive design with 3D box effects
 */

/* CSS Variables */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #f1f5f9;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-3d: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Merriweather', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-heading);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

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

ul {
    list-style: none;
}

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

/* Top Bar */
.top-bar {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #94a3b8;
    padding: 8px 0;
    font-size: 0.85rem;
}

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

.top-bar-left .date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-right {
    display: flex;
    gap: 15px;
}

.top-bar-right a {
    color: #94a3b8;
    transition: var(--transition);
}

.top-bar-right a:hover {
    color: #fff;
}

/* Breaking News Ticker */
.breaking-news {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 10px 0;
    overflow: hidden;
}

.breaking-news .container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.breaking-label {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    animation: pulse 2s infinite;
}

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

.breaking-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-wrapper {
    display: flex;
    gap: 50px;
    white-space: nowrap;
}

.ticker-item {
    color: white;
    font-weight: 500;
}

.ticker-item:hover {
    text-decoration: underline;
}

/* Main Header */
.main-header {
    background: var(--bg-white);
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
}

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

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 60px;
    width: auto;
}

.logo-text h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.header-ad {
    flex-shrink: 0;
}

.header-ad img {
    max-height: 90px;
    width: auto;
    border-radius: var(--radius-sm);
}

/* Navigation */
.main-nav {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    position: relative;
    z-index: 1000;
}

.main-nav.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

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

.main-menu {
    display: flex;
    align-items: center;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 18px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.main-menu > li > a:hover,
.main-menu > li.active > a {
    color: white;
    background: rgba(255,255,255,0.1);
    border-bottom-color: var(--accent-color);
}

.main-menu > li > a i:first-child {
    font-size: 0.9rem;
}

/* Dropdown Menu */
.has-dropdown .fa-chevron-down {
    font-size: 0.7rem;
    transition: var(--transition);
}

.has-dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

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

.dropdown-menu li a {
    display: block;
    padding: 12px 18px;
    color: var(--text-color);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background: var(--bg-color);
    color: var(--secondary-color);
    padding-left: 25px;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box form {
    display: flex;
    align-items: center;
}

.search-box input {
    width: 200px;
    padding: 10px 40px 10px 15px;
    border: none;
    border-radius: 25px;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-box input:focus {
    outline: none;
    width: 280px;
    background: rgba(255,255,255,0.25);
}

.search-box button {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
}

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

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    transition: var(--transition);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

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

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title h2 i {
    color: var(--secondary-color);
}

.view-all {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.view-all:hover {
    color: var(--primary-color);
}

.view-all i {
    margin-left: 5px;
}

/* Featured Section */
.featured-section {
    margin-bottom: 50px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 25px;
}

/* Main Featured Card */
.featured-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-3d);
    transform-style: preserve-3d;
    transition: var(--transition);
}

.featured-main:hover {
    transform: translateY(-5px) rotateX(2deg);
    box-shadow: 0 30px 40px -10px rgba(0,0,0,0.2);
}

.featured-main .card-image {
    position: relative;
    height: 100%;
    min-height: 450px;
}

.featured-main .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-main .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
}

.featured-main .category-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: white;
}

.featured-main h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-main h2:hover {
    color: var(--accent-color);
}

.featured-main .meta {
    display: flex;
    gap: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
}

.featured-main .meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Featured Side Cards */
.featured-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-card {
    display: flex;
    gap: 15px;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.side-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.side-card .card-image {
    width: 120px;
    flex-shrink: 0;
}

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

.side-card .card-content {
    padding: 15px;
    flex: 1;
}

.side-card .category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: white;
}

.side-card h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-card .meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Category Boxes - The Core Feature */
.category-boxes {
    margin-bottom: 50px;
}

.boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
}

.category-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.category-box:hover {
    transform: translateY(-8px) rotateX(3deg);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

/* Box Header with Category Color */
.box-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.box-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background: currentColor;
}

.box-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.box-header h3 i {
    font-size: 1.2rem;
}

.box-header .view-more {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.box-header .view-more:hover {
    opacity: 1;
}

/* Box Content */
.box-content {
    padding: 20px;
}

/* Main Article in Box */
.box-main-article {
    margin-bottom: 20px;
}

.box-main-article .article-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 15px;
}

.box-main-article .article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

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

.box-main-article h4 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.box-main-article h4:hover {
    color: var(--secondary-color);
}

.box-main-article p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article List in Box */
.box-article-list {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.box-article-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.box-article-item:last-child {
    border-bottom: none;
}

.box-article-item .item-image {
    width: 70px;
    height: 55px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.box-article-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.box-article-item .item-content {
    flex: 1;
}

.box-article-item h5 {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.box-article-item h5:hover {
    color: var(--secondary-color);
}

.box-article-item .meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* Latest News Section */
.latest-section {
    margin-bottom: 50px;
}

.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.news-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-card .card-image {
    position: relative;
    overflow: hidden;
}

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

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

.news-card .category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

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

.news-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card h3:hover {
    color: var(--secondary-color);
}

.news-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.news-card .meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-card .meta .author img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

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

.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--secondary-color);
}

/* Popular News Widget */
.popular-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item .rank {
    width: 35px;
    height: 35px;
    background: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-shrink: 0;
}

.popular-item:nth-child(1) .rank {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.popular-item:nth-child(2) .rank {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    color: white;
}

.popular-item:nth-child(3) .rank {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

.popular-item .content {
    flex: 1;
}

.popular-item h5 {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 5px;
}

.popular-item h5:hover {
    color: var(--secondary-color);
}

.popular-item .views {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Sidebar Ads */
.sidebar-ad {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow);
}

.sidebar-ad img {
    width: 100%;
    border-radius: var(--radius-sm);
}

/* Footer Ads */
.footer-ads {
    padding: 40px 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.footer-ads-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.footer-ad-item img {
    width: 100%;
    border-radius: var(--radius);
}

/* Main Footer */
.main-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #94a3b8;
    padding: 60px 0 0;
}

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

.footer-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-about p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

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

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

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

.footer-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-links i {
    font-size: 0.8rem;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 0.9rem;
}

.newsletter-form input::placeholder {
    color: #64748b;
}

.newsletter-form button {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

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

.scroll-top:hover {
    transform: translateY(-5px);
}

/* Article Page Styles */
.article-page {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.article-header {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.article-header .category-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
    margin-bottom: 15px;
}

.article-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.article-meta .author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-meta .author img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.article-meta .author-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.article-meta .author-info span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.article-meta .date-views {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
}

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

.article-featured-image {
    margin-bottom: 30px;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.article-content {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-color);
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: var(--font-heading);
    margin: 30px 0 15px;
}

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

.article-content img {
    border-radius: var(--radius);
    margin: 20px 0;
}

.article-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding: 20px 25px;
    margin: 25px 0;
    background: var(--bg-color);
    font-style: italic;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 8px;
}

/* In-article Ad */
.in-article-ad {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius);
    text-align: center;
}

.in-article-ad::before {
    content: 'Advertisement';
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Article Tags */
.article-tags {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.article-tags h4 {
    font-size: 1rem;
    margin-bottom: 15px;
}

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

.tag {
    padding: 8px 16px;
    background: var(--bg-color);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.tag:hover {
    background: var(--secondary-color);
    color: white;
}

/* Related Articles */
.related-articles {
    margin-top: 50px;
}

.related-articles h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Category Page */
.category-header {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: var(--shadow);
}

.category-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.category-header p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.category-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Page Template */
.page-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--shadow);
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.page-content h2 {
    font-size: 1.8rem;
    margin: 35px 0 15px;
}

.page-content h3 {
    font-size: 1.4rem;
    margin: 25px 0 12px;
}

.page-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Search Page */
.search-header {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: var(--shadow);
}

.search-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.search-header p {
    color: var(--text-light);
}

.search-form-large {
    max-width: 600px;
    margin: 25px auto 0;
    position: relative;
}

.search-form-large input {
    width: 100%;
    padding: 15px 60px 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-form-large input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.search-form-large button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.search-form-large button:hover {
    background: var(--primary-color);
}

/* Pagination */
.pagination-nav {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 8px;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.pagination li a:hover {
    background: var(--secondary-color);
    color: white;
}

.pagination li.active span {
    background: var(--secondary-color);
    color: white;
}

.pagination li.ellipsis span {
    background: none;
    box-shadow: none;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-main .card-image {
        min-height: 350px;
    }
    
    .boxes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .latest-grid,
    .category-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .mobile-toggle {
        display: flex;
    }
    
    .main-menu {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background: var(--primary-color);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: var(--transition);
        z-index: 1001;
        overflow-y: auto;
    }
    
    .main-menu.active {
        left: 0;
    }
    
    .main-menu > li {
        width: 100%;
    }
    
    .main-menu > li > a {
        padding: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        box-shadow: none;
        background: rgba(0,0,0,0.2);
    }
    
    .has-dropdown.open .dropdown-menu {
        display: block;
    }
    
    .mobile-overlay.active {
        display: block;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .page-content {
        padding: 30px;
    }
    
    .page-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .header-wrapper {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .search-box {
        display: none;
    }
    
    .boxes-grid {
        grid-template-columns: 1fr;
    }
    
    .latest-grid,
    .category-news-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-ads-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .article-page {
        padding: 25px;
    }
    
    .article-header h1 {
        font-size: 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .category-header,
    .search-header {
        padding: 25px;
    }
    
    .category-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .featured-main .card-overlay {
        padding: 20px;
    }
    
    .featured-main h2 {
        font-size: 1.3rem;
    }
    
    .side-card {
        flex-direction: column;
    }
    
    .side-card .card-image {
        width: 100%;
        height: 150px;
    }
    
    .article-page {
        padding: 20px;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .page-content h1 {
        font-size: 1.6rem;
    }
}

/* Print Styles */
@media print {
    .top-bar,
    .breaking-news,
    .main-nav,
    .header-ad,
    .sidebar,
    .main-footer,
    .scroll-top,
    .in-article-ad {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .article-page {
        box-shadow: none;
    }
}
