/*
Theme Name: I7 News Professional
Theme URI: https://i7news.com
Author: I7 Dev Team
Description: Complete professional news portal with breaking news ticker, trending posts, video news, social sharing, Google News–friendly structure, and fully responsive design.
Version: 3.2.0
Text Domain: i7-news-pro
*/

/* =========================
   RESET & BASE
========================= */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #f3f4f6;
    min-height: 100vh;
    overflow-x: hidden; /* mobile horizontal scroll fix */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color .2s;
}

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

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* =========================
   COLORS & SHADOWS
========================= */

:root {
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --primary-light: #fca5a5;
    --secondary: #1f2937;
    --dark: #111827;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* =========================
   UTILITIES
========================= */

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

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-5 {
    gap: 20px;
}

.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================
   TOP BAR
========================= */

.top-bar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.top-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.date-time {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-time span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

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

.social-links a {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all .3s;
}

.social-links a:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
}

/* =========================
   BREAKING NEWS BAR
========================= */

.breaking-bar {
    background: var(--secondary);
    color: var(--white);
    padding: 12px 0;
    overflow: hidden;
    border-bottom: 3px solid var(--primary);
}

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

.breaking-label {
    background: var(--primary);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(220,38,38,.4);
    position: relative;
}

.breaking-label:before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: .5;
        transform: translateY(-50%) scale(1.2);
    }
}

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

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

.breaking-scroll:hover {
    animation-play-state: paused;
}

.breaking-item {
    padding-right: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breaking-item:before {
    content: '●';
    color: var(--primary);
    font-size: 8px;
}

.breaking-item a {
    transition: color .2s;
}

.breaking-item a:hover {
    color: var(--primary-light);
}

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

/* =========================
   HEADER
========================= */

.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 15px;
}

.site-logo a {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-logo .i7 {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-logo .news {
    color: var(--secondary);
}

/* =========================
   NAVIGATION
========================= */

.main-nav {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.nav-menu a {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    border-radius: 6px;
    transition: all .2s;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

/* =========================
   SEARCH BOX
========================= */

.search-wrapper {
    position: relative;
    width: 260px;
    max-width: 100%;
}

.search-wrapper input {
    width: 100%;
    padding: 9px 45px 9px 18px;
    border: 2px solid var(--gray-200);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all .3s;
    background: var(--white);
}

.search-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.search-wrapper button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--white);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s;
}

.search-wrapper button:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

/* =========================
   APP DOWNLOAD BUTTON (HEADER)
========================= */

.app-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(220,38,38,.4);
    transition: all .3s;
}

.app-download-btn span.small {
    font-size: 11px;
    opacity: .9;
}

.app-download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* =========================
   MOBILE MENU TOGGLE
========================= */

.mobile-toggle {
    display: none;
    background: var(--primary);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 18px;
    transition: background .3s;
}

.mobile-toggle:hover {
    background: var(--primary-dark);
}

/* =========================
   HERO SLIDER
========================= */

.hero-section {
    margin: 0 0 25px;
    padding: 0 0 25px;
}

.hero-section .hero-swiper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-slide {
    position: relative;
    height: 520px;
    overflow: hidden;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 10s ease;
}

.hero-slide:hover img {
    transform: scale(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(0,0,0,.95) 0%,
        rgba(0,0,0,.6) 40%,
        rgba(0,0,0,.3) 70%,
        transparent 100%);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 45px 7vw;
    color: var(--white);
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(220,38,38,.5);
}

.hero-title {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0,0,0,.5);
}

.hero-title a {
    color: var(--white);
}

.hero-title a:hover {
    color: var(--primary-light);
}

.hero-excerpt {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 12px;
    max-width: 700px;
    opacity: .95;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    opacity: .9;
}

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

/* Swiper controls */

.swiper-button-next,
.swiper-button-prev {
    color: var(--white);
    width: 45px;
    height: 45px;
    background: rgba(220,38,38,.8);
    border-radius: 50%;
    transition: all .3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
    font-weight: 900;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: var(--white);
    opacity: .5;
}

.swiper-pagination-bullet-active {
    background: var(--primary);
    opacity: 1;
    width: 30px;
    border-radius: 6px;
}

/* =========================
   TRENDING SECTION
========================= */

.trending-section {
    margin: 35px 0;
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--gray-100);
}

.section-title {
    font-size: 24px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--secondary);
}

.section-title:before {
    content: '';
    width: 5px;
    height: 30px;
    background: var(--primary);
    border-radius: 3px;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.trending-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all .3s;
}

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

.trending-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform .5s;
}

.trending-card:hover img {
    transform: scale(1.1);
}

.trending-number {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
    z-index: 5;
}

.trending-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.3), transparent);
}

.trending-title {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    z-index: 5;
}

/* =========================
   RECENT POSTS SECTION
========================= */

.recent-posts-section {
    margin: 35px 0 10px;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* =========================
   POST CARDS
========================= */

.post-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all .3s;
    display: flex;
    flex-direction: column;
}

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

.post-thumb {
    position: relative;
    height: 210px;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s;
}

.post-card:hover .post-thumb img {
    transform: scale(1.08);
}

.post-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: var(--white);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 5;
}

.post-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 10px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-meta span:before {
    content: '●';
    color: var(--primary);
    font-size: 6px;
}

.post-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-title a {
    color: var(--gray-900);
}

.post-title a:hover {
    color: var(--primary);
}

.post-excerpt {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 12px;
    flex: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    transition: gap .2s;
}

.read-more:hover {
    gap: 10px;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}

.widget {
    background: var(--white);
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--gray-100);
    color: var(--secondary);
    position: relative;
}

.widget-title:before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
}

/* Popular posts */

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.popular-item {
    display: flex;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

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

.popular-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.popular-item:hover .popular-thumb img {
    transform: scale(1.1);
}

.popular-info {
    flex: 1;
}

.popular-info h4 {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 4px;
}

.popular-info h4 a {
    color: var(--gray-900);
}

.popular-info h4 a:hover {
    color: var(--primary);
}

.popular-meta {
    font-size: 11px;
    color: var(--gray-500);
    display: flex;
    gap: 8px;
}

/* Categories widget */

.cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    transition: all .2s;
}

.cat-list a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateX(4px);
}

.cat-count {
    background: var(--white);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

/* =========================
   FOOTER
========================= */

.footer {
    background: linear-gradient(135deg, var(--gray-900), var(--dark));
    color: var(--gray-300);
    padding: 60px 0 0;
    margin-top: 60px;
    position: relative;
}

.footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark), var(--primary));
}

.footer-top {
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-widget h4 {
    color: var(--white);
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 18px;
    padding-bottom: 10px;
    position: relative;
}

.footer-widget h4:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-about p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 18px;
    color: var(--gray-400);
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all .3s;
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-links a {
    font-size: 14px;
    color: var(--gray-300);
    padding: 4px 0;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-posts {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-post-item {
    display: flex;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-post-item:last-child {
    border: none;
    padding-bottom: 0;
}

.footer-post-thumb {
    width: 55px;
    height: 55px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.footer-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-post-info h5 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
}

.footer-post-info h5 a {
    color: var(--gray-200);
}

.footer-post-info h5 a:hover {
    color: var(--primary-light);
}

.footer-post-date {
    font-size: 11px;
    color: var(--gray-500);
}

.footer-bottom {
    padding: 18px 0;
    margin-top: 20px;
    background: rgba(0,0,0,.35);
}

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

.footer-credits a {
    color: var(--primary-light);
}

/* =========================
   MAIN GRID & SINGLE
========================= */

.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    margin: 30px 0;
}

.single-post {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.single-header {
    margin-bottom: 25px;
}

.single-title {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--gray-900);
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 0;
    border-top: 2px solid var(--gray-100);
    border-bottom: 2px solid var(--gray-100);
    font-size: 13px;
    color: var(--gray-600);
}

.single-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.single-featured {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
}

.single-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-800);
}

.single-content p {
    margin-bottom: 18px;
}

.single-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 28px 0 15px;
    color: var(--gray-900);
}

.single-content img {
    border-radius: 8px;
    margin: 22px 0;
}

/* Share section */

.share-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--gray-100);
}

.share-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-btn {
    padding: 10px 18px;
    border-radius: 8px;
    color: var(--white);
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .3s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.2);
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-whatsapp { background: #25d366; }
.share-linkedin { background: #0077b5; }

/* =========================
   404 PAGE
========================= */

.error-page {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: var(--shadow);
}

.error-code {
    font-size: 120px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 20px;
}

.error-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
}

.error-text {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 25px;
}

.btn-home {
    display: inline-block;
    padding: 13px 30px;
    background: var(--primary);
    color: var(--white);
    border-radius: 25px;
    font-weight: 700;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {

    /* Hero ko tablet+mobile pe full-bleed feel */
    .hero-section .hero-swiper {
        width: 100vw;
        max-width: none;
        margin: 0;
        margin-left: 50%;
        transform: translateX(-50%);
    }

    .trending-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .recent-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .top-info {
        flex-direction: column;
        gap: 8px;
    }

    .date-time {
        flex-direction: column;
        gap: 4px;
    }

    .mobile-toggle {
        display: block;
    }

    .main-nav {
        display: none;
    }

    .main-nav.active {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        padding: 10px 0;
    }

    .header-content {
        flex-wrap: wrap;
        padding: 10px 0;
        gap: 10px;
    }

    .site-logo a {
        font-size: 22px;
    }

    .search-wrapper {
        width: 100%;
        order: 3;
        margin-top: 6px;
    }

    .app-download-btn {
        display: none; /* header button hide, app link footer/nav se milega */
    }

    /* App-like hero */
    .hero-section {
        margin: 0 0 16px;
        padding: 0 0 16px;
    }

    .hero-slide {
        height: 70vh;
        min-height: 340px;
        max-height: 520px;
    }

    .hero-content {
        padding: 18px 16px 22px;
    }

    .hero-title {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .hero-excerpt {
        font-size: 14px;
        line-height: 1.5;
        max-width: 100%;
    }

    .hero-meta {
        font-size: 12px;
        gap: 10px;
    }

    /* Cards & sections */
    .trending-section {
        padding: 18px 14px;
        border-radius: 12px;
        box-shadow: 0 6px 16px rgba(0,0,0,.08);
        margin: 20px 0;
    }

    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .trending-card img {
        height: 170px;
    }

    .recent-posts-section {
        margin: 20px 0 8px;
    }

    .recent-posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .post-card {
        border-radius: 14px;
        box-shadow: 0 6px 16px rgba(0,0,0,.06);
    }

    .post-thumb {
        height: 190px;
    }

    .post-body {
        padding: 14px 12px 16px;
    }

    .post-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .post-excerpt {
        font-size: 13px;
    }

    .main-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin: 20px 0;
    }

    .single-post {
        padding: 18px 14px;
        border-radius: 14px;
    }

    .single-title {
        font-size: 22px;
    }

    .sidebar {
        position: static;
    }

    .footer {
        margin-top: 30px;
    }

    .footer-top {
        padding-bottom: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-slide {
        height: 75vh;
        min-height: 360px;
    }

    .hero-title {
        font-size: 20px;
    }

    /* Agar excerpt chhota rakhna ho to isko comment-out kar sakte ho */
    .hero-excerpt {
        display: none;
    }

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

    .trending-card img {
        height: 190px;
    }

    .post-thumb {
        height: 180px;
    }

    .section-title {
        font-size: 20px;
    }

    .widget {
        padding: 18px 14px;
    }
}



/* --- Mobile View Full Width Fix for Single Post --- */
@media (max-width: 768px) {
    
    /* 1. Post Box ko faila kar full width karna */
    .single-post {
        margin-left: -20px !important;  /* Container ki 20px jagah ko cover karega */
        margin-right: -20px !important; /* Right side se bhi cover karega */
        width: calc(100% + 40px) !important; /* Box ko screen size par fit karega */
        
        /* 2. Andar ka space adjust karna */
        padding: 20px 15px !important; /* Pehle 30px tha, ab 15px kar diya taaki text kinare tak jaye */
        
        /* 3. Box styling ko mobile friendly banana */
        border-radius: 0 !important;   /* Gol kinare hata diye taaki poora chipak jaye */
        box-shadow: none !important;   /* Mobile par shadow ki zarurat nahi */
        border: none !important;
    }

    /* 4. Featured Image ko adjust karna */
    .single-featured {
        border-radius: 0 !important;
        margin-left: -15px; /* Image ko box ke andar bhi full wide karne ke liye */
        margin-right: -15px;
        width: calc(100% + 30px);
        margin-top: -20px; /* Title aur Image ke beech ka gap kam karne ke liye */
    }
    
    /* 5. Main Grid ka gap kam karna */
    .main-grid {
        margin-top: 0 !important;
        display: block !important; /* Grid hata kar simple block banayenge */
    }
}