/* ============================================
   NEWSMATIC CLEAN THEME - PERFECT STYLING
   Fixed squeezed layout - Full width design
   ============================================ */

/* CSS Variables */
:root {
    --primary: #d32f2f;
    --primary-dark: #b71c1c;
    --primary-light: #ff6659;
    --secondary: #1a237e;
    --secondary-dark: #0d1745;
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f9f9f9;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    --text: #333333;
    --border: #e5e5e5;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   CONTAINER - FIXED WIDTH (NOT SQUEEZED)
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Full width sections */
.full-width {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* ============================================
   HEADER - STICKY
   ============================================ */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo-area {
    flex-shrink: 0;
}

.logo-area img {
    max-height: 50px;
    width: auto;
}

.site-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.site-title a {
    color: var(--text);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 10px 18px;
    color: var(--text);
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--radius-sm);
}

.nav-menu a:hover {
    color: var(--primary);
    background: rgba(211, 47, 47, 0.05);
}

.nav-menu .current-menu-item a {
    color: var(--primary);
    font-weight: 600;
}

/* Dropdown */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 999;
    list-style: none;
    padding: 10px 0;
    border: 1px solid var(--border);
}

.nav-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu a {
    padding: 8px 20px;
    font-size: 14px;
}

/* Mobile Toggle */
.mobile-menu-toggle,
.search-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    color: var(--text);
}

/* Search Dropdown */
.search-dropdown {
    display: none;
    background: var(--gray-100);
    padding: 20px;
    border-top: 1px solid var(--border);
    width: 100%;
}

.search-dropdown.show {
    display: block;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 30px 0 0 30px;
    font-size: 16px;
}

.search-form button {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
}

/* ============================================
   HOMEPAGE SECTIONS - FULL WIDTH
   ============================================ */
.homepage-section {
    width: 100%;
    margin: 0 0 50px 0;
}

/* ============================================
   FEATURED SLIDER
   ============================================ */
.widget-featured-slider {
    width: 100%;
    margin: 0 0 40px 0;
}

.slide-item {
    position: relative;
    height: 550px;
    width: 100%;
    overflow: hidden;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    color: white;
    z-index: 2;
}

.slide-categories a {
    background: var(--primary);
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.slide-content h2 {
    font-size: 2.2rem;
    margin: 10px 0;
    line-height: 1.2;
}

.slide-content h2 a {
    color: white;
}

.slide-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    opacity: 0.9;
}

/* Slider Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(0,0,0,0.5);
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px;
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    background: var(--primary);
    opacity: 1;
}

/* ============================================
   HERO GRID
   ============================================ */
.widget-hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
    width: 100%;
}

.hero-large {
    grid-row: span 2;
    min-height: 420px;
}

.hero-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 200px;
}

.hero-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-item:hover img {
    transform: scale(1.05);
}

.hero-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    z-index: 2;
}

.hero-category span {
    background: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.hero-content h3 {
    font-size: 1.1rem;
    margin-top: 10px;
    line-height: 1.3;
}

.hero-content h3 a {
    color: white;
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 25px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

.view-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

/* ============================================
   LATEST NEWS GRID
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
}

/* 2 columns layout */
.news-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Post Card */
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.post-img {
    overflow: hidden;
}

.post-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-img img {
    transform: scale(1.05);
}

.post-cat {
    padding: 15px 15px 5px;
}

.post-cat a {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    margin-right: 5px;
}

.post-card h3 {
    padding: 0 15px 5px;
    font-size: 1.1rem;
    line-height: 1.4;
}

.post-card h3 a {
    color: var(--text);
}

.post-card h3 a:hover {
    color: var(--primary);
}

.post-meta {
    padding: 0 15px 10px;
    font-size: 12px;
    color: var(--gray-600);
    display: flex;
    gap: 15px;
}

.post-meta i {
    margin-right: 4px;
}

.post-card p {
    padding: 0 15px 15px;
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.5;
}

.read-more {
    display: inline-block;
    margin: 0 15px 15px;
    font-weight: 600;
    font-size: 13px;
    color: var(--primary);
}

.read-more i {
    transition: transform 0.3s;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* ============================================
   CATEGORY POSTS
   ============================================ */
.category-posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
}

.cat-post {
    display: flex;
    gap: 15px;
    background: var(--gray-100);
    padding: 15px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.cat-post:hover {
    background: var(--gray-200);
    transform: translateX(5px);
}

.cat-post-img {
    width: 80px;
    flex-shrink: 0;
}

.cat-post-img img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cat-post-content h4 {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.cat-post-content h4 a {
    color: var(--text);
}

.cat-post-content .post-date {
    font-size: 11px;
    color: var(--gray-600);
}

/* ============================================
   CONTENT WRAPPER (MAIN + SIDEBAR)
   ============================================ */
.content-wrapper {
    display: flex;
    gap: 40px;
    margin: 50px 0;
    width: 100%;
}

.main-content {
    flex: 2;
    min-width: 0;
}

.sidebar {
    flex: 1;
    min-width: 280px;
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.widget {
    background: var(--white);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* Trending Widget */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.trend-num {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.trend-views {
    margin-left: auto;
    font-size: 11px;
    color: var(--gray-600);
}

/* Popular Widget */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popular-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.popular-views {
    font-size: 11px;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 20px;
}

/* Social Widget */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateX(5px);
}

.social-fb { background: #1877f2; }
.social-tw { background: #1da1f2; }
.social-ig { background: linear-gradient(45deg, #f09433, #d62976, #962fbf); }
.social-yt { background: #ff0000; }

/* Newsletter Widget */
.newsletter-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.newsletter-form button {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

/* Tabbed Widget */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 8px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-post {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-post a {
    color: var(--text);
}

.tab-post span {
    font-size: 11px;
    color: var(--gray-600);
}

/* Search Widget */
.widget-search .search-form {
    display: flex;
}

.widget-search .search-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius) 0 0 var(--radius);
}

.widget-search .search-form button {
    padding: 10px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}

/* Category List */
.category-list {
    list-style: none;
}

.category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.category-list a {
    color: var(--text);
}

.category-list .count {
    color: var(--gray-600);
    font-size: 12px;
}

/* Video Widget */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.video-item {
    position: relative;
}

.video-thumb {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: white;
    opacity: 0.8;
}

.video-item h4 {
    font-size: 13px;
    margin-top: 8px;
}

/* Related Posts */
.related-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.related-item {
    text-align: center;
}

.related-img img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
}

.related-item h4 {
    font-size: 12px;
    margin-top: 8px;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--radius);
}

.author-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 8px;
}

/* Post Meta */
.post-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 20px 0;
}

.post-meta-info span {
    font-size: 13px;
    color: var(--gray-600);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: var(--radius);
    color: white;
    font-size: 13px;
}

.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-wa { background: #25d366; }

/* ============================================
   SINGLE POST PAGE
   ============================================ */
.single-post .entry-title {
    font-size: 2.2rem;
    margin: 20px 0;
}

.post-thumbnail {
    margin: 20px 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.entry-content h2,
.entry-content h3 {
    margin: 30px 0 15px;
}

.entry-content p {
    margin-bottom: 20px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}

.page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-numbers:hover:not(.current) {
    background: var(--gray-100);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--secondary);
    color: var(--gray-500);
    margin-top: 60px;
    width: 100%;
}

.footer-widgets {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-widget h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-widget p {
    color: var(--gray-400);
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-widget a {
    color: var(--gray-400);
}

.footer-widget a:hover {
    color: white;
}

.bottom-footer {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    text-align: center;
}

.copyright {
    font-size: 13px;
    color: var(--gray-400);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .widget-hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-large {
        min-height: 350px;
    }
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-posts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle,
    .search-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        padding: 20px;
        z-index: 999;
        border-top: 1px solid var(--border);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--border);
    }
    
    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
        border: none;
    }
    
    .nav-menu .sub-menu.show {
        display: block;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid.cols-2 {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .slide-item {
        height: 400px;
    }
    
    .slide-content h2 {
        font-size: 1.4rem;
    }
    
    .slide-content {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .hero-large {
        min-height: 280px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .related-posts {
        grid-template-columns: 1fr;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-box img {
        margin: 0 auto;
    }
    
    .post-meta-info {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .slide-item {
        height: 300px;
    }
    
    .slide-content h2 {
        font-size: 1.1rem;
    }
    
    .post-img img {
        height: 180px;
    }
    
    .post-card h3 {
        font-size: 1rem;
    }
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark {
    --white: #1a1a1a;
    --text: #e0e0e0;
    --border: #333;
    --gray-100: #252525;
    --gray-200: #2d2d2d;
    --gray-300: #3d3d3d;
}

body.dark .post-card,
body.dark .widget,
body.dark .cat-post {
    background: #1a1a1a;
}

body.dark .nav-menu .sub-menu {
    background: #1a1a1a;
    border-color: #333;
}

body.dark .search-dropdown {
    background: #252525;
}
/* Sticky Header Scroll Effect */
.site-header.scrolled {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.site-header.scrolled .header-inner {
    padding: 10px 30px;
}

.site-header.scrolled .logo img {
    max-height: 40px;
    transition: all 0.3s;
}