/* ========================================
   RESPONSIVE STYLES — 100% Satya News
   Mobile-First Breakpoints
   ======================================== */

/* ---- Large Desktop (1440px+) ---- */
@media (min-width: 1440px) {
    .container { max-width: 1320px; }
    .container-wide { max-width: 1440px; }
}

/* ---- Desktop (1280px) ---- */
@media (max-width: 1280px) {
    .hero-grid {
        grid-template-columns: 1fr 350px 300px;
    }
    
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: var(--space-6);
    }
}

/* ---- Laptop (1024px) ---- */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 340px;
        gap: var(--space-4);
    }
    
    .content-layout {
        grid-template-columns: 1fr 300px;
        gap: var(--space-6);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .category-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---- Tablet (992px) ---- */
@media (max-width: 992px) {
    .top-bar {
        display: none !important;
    }
    
    .site-header {
        padding: 10px 0;
    }
    
    .site-header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }
    
    .site-logo {
        flex-shrink: 1;
        min-width: 0;
    }
    
    .site-logo__main {
        font-size: 22px;
        white-space: nowrap;
    }
    
    .site-logo__marathi {
        font-size: 12px;
    }
    
    .site-logo__tagline {
        display: none;
    }
    
    .header-search {
        display: none !important;
    }
    
    .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .search-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .theme-toggle-btn {
        display: inline-flex !important;
    }
    
    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
    }
    
    .nav-local {
        display: none;
    }
}

/* ---- Tablet & Mobile (768px) ---- */
@media (max-width: 768px) {
    :root {
        --text-3xl: 1.5rem;
        --text-4xl: 1.875rem;
    }
    
    /* Top bar - remove from mobile view */
    .top-bar {
        display: none !important;
    }
    
    /* Header */
    .site-header .container {
        gap: var(--space-3);
    }
    
    .header-search {
        display: none !important;
    }
    
    .menu-toggle {
        display: flex !important;
    }
    
    .mobile-menu {
        display: block;
    }
    
    /* Navigation */
    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-list li a {
        padding: 10px 10px;
        font-size: var(--text-xs);
    }
    
    .nav-local {
        display: none;
    }
    
    /* Hero */
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-main {
        min-height: 300px;
    }
    
    .featured-main__title {
        font-size: var(--text-xl);
    }
    
    .featured-small-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    
    /* Content layout */
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    /* News cards */
    .news-card {
        flex-direction: column;
    }
    
    .news-card__image-wrap {
        width: 100%;
        height: 200px;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
    
    /* Category cards */
    .category-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Article */
    .article-title {
        font-size: var(--text-2xl);
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-meta__stats {
        margin-left: 0;
    }
    
    /* Author */
    .author-header {
        flex-direction: column;
        text-align: center;
        padding: var(--space-6);
    }
    
    .author-header__social {
        justify-content: center;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom__links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ---- Mobile Large (576px) ---- */
@media (max-width: 576px) {
    :root {
        --text-2xl: 1.25rem;
        --text-3xl: 1.375rem;
    }
    
    .container {
        padding: 0 var(--space-3);
    }
    
    /* Top bar */
    .top-bar {
        display: none !important;
    }
    
    /* Header */
    .site-logo__main {
        font-size: 20px;
    }
    
    .site-logo__marathi {
        font-size: 12px;
    }
    
    .site-logo__tagline {
        display: none;
    }
    
    /* Breaking ticker */
    .breaking-ticker__label {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .breaking-ticker__link {
        display: none;
    }
    
    /* Hero */
    .featured-main {
        min-height: 250px;
    }
    
    .featured-main__title {
        font-size: var(--text-lg);
    }
    
    .featured-main__excerpt {
        display: none;
    }
    
    .featured-small-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-small__image {
        width: 90px;
        height: 65px;
    }
    
    /* News grid */
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    /* Category cards */
    .category-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
    
    .category-card {
        height: 150px;
    }
    
    /* Article */
    .article-title {
        font-size: var(--text-xl);
    }
    
    .article-subtitle {
        font-size: var(--text-md);
    }
    
    .article-content {
        font-size: var(--text-base);
    }
    
    /* Share buttons */
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination__btn {
        min-width: 36px;
        height: 36px;
        font-size: var(--text-xs);
    }
    
    /* Section headers */
    .section-header h2 {
        font-size: var(--text-md);
    }
    
    .section {
        padding: var(--space-6) 0;
    }
    
    /* Search page */
    .search-page__header {
        padding: var(--space-6) 0;
    }
    
    .search-page__header h1 {
        font-size: var(--text-xl);
    }
    
    /* Trending widget inside mobile */
    .trending-widget__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
    
    /* Contact */
    .contact-info-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    /* Page header */
    .page-header {
        padding: var(--space-6) 0;
    }
    
    .page-header h1 {
        font-size: var(--text-xl);
    }
}

/* ---- Mobile Small (360px) ---- */
@media (max-width: 360px) {
    .site-logo__main {
        font-size: 17px;
    }
    
    .nav-list li a {
        padding: 8px 8px;
        font-size: 11px;
    }
    
    .category-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Global Horizontal Scroll Prevention ---- */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.site-header,
.main-nav,
.breaking-ticker,
.hero-section,
.section,
.container,
.container-wide,
.content-layout,
.site-footer,
.footer-bottom,
main,
#mainContent {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.breaking-ticker .container {
    max-width: 100% !important;
    overflow: hidden;
}

.hero-grid,
.news-grid,
.featured-small-grid,
.category-cards-grid,
.footer-grid,
.content-layout {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hero-grid > *,
.news-grid > *,
.content-layout > * {
    min-width: 0;
}

/* ==============================================================================
   📱 MOBILE APP-LIKE UI COMPONENTS & EXPERIENCE
   ============================================================================== */

/* 1. Top Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3.5px;
    width: 0%;
    background: linear-gradient(90deg, #D32F2F, #FF5252, #FF9800);
    z-index: 999999;
    transition: width 0.08s ease-out;
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.7);
}

/* 2. Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 9990;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
}

[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.96);
    border-top-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--gray-600);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

[data-theme="dark"] .mobile-nav-item {
    color: #94a3b8;
}

.mobile-nav-item span {
    font-size: 10.5px;
    font-weight: 500;
    margin-top: 3px;
    line-height: 1;
    letter-spacing: -0.2px;
}

.mobile-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-item:active .mobile-nav-icon {
    transform: scale(0.85);
}

.mobile-nav-item.active {
    color: var(--color-primary, #D32F2F) !important;
}

.mobile-nav-item.active span {
    font-weight: 700;
}

.mobile-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    background: var(--color-primary, #D32F2F);
    border-radius: 0 0 4px 4px;
}

/* 3. Mobile Search Modal (App Dialog) */
.mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: flex-start;
    justify-content: center;
}

.mobile-search-modal.active {
    display: flex;
}

.mobile-search-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
}

.mobile-search-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: #ffffff;
    margin: 16px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: modalSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .mobile-search-modal__dialog {
    background: #1e293b;
    border: 1px solid #334155;
}

@keyframes modalSlideDown {
    from { opacity: 0; transform: translateY(-20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.mobile-search-modal__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--gray-200);
}

[data-theme="dark"] .mobile-search-modal__header {
    border-bottom-color: #334155;
}

.mobile-search-modal__form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    background: var(--gray-100);
    padding: 8px 12px;
    border-radius: 10px;
}

[data-theme="dark"] .mobile-search-modal__form {
    background: #0f172a;
}

.mobile-search-modal__form input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 14px;
    color: var(--gray-900);
}

[data-theme="dark"] .mobile-search-modal__form input {
    color: #f8fafc;
}

.mobile-search-modal__submit {
    background: var(--color-primary, #D32F2F);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.mobile-search-modal__close-btn {
    background: var(--gray-100);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .mobile-search-modal__close-btn {
    background: #334155;
    color: #cbd5e1;
}

.mobile-search-modal__body {
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
}

.mobile-search-quick-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-600);
    display: block;
    margin-bottom: 8px;
}

.mobile-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mobile-search-chips a {
    background: var(--gray-100);
    color: var(--gray-800);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--gray-200);
    transition: all 0.15s ease;
}

[data-theme="dark"] .mobile-search-chips a {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}

.mobile-search-chips a:hover,
.mobile-search-chips a:active {
    background: var(--color-primary, #D32F2F);
    color: white;
    border-color: var(--color-primary, #D32F2F);
}

.mobile-search-live-results {
    margin-top: 12px;
}

.mobile-search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--gray-900);
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid var(--gray-100);
}

.mobile-search-result-item:hover,
.mobile-search-result-item:active {
    background: var(--gray-100);
}

/* 4. Mobile Drawer */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: none;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.mobile-menu__panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: #ffffff;
    box-shadow: 10px 0 30px rgba(0,0,0,0.3);
    padding: 20px;
    overflow-y: auto;
    z-index: 2;
    animation: slideInLeft 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .mobile-menu__panel {
    background: #0f172a;
    box-shadow: 10px 0 30px rgba(0,0,0,0.6);
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.mobile-menu__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

[data-theme="dark"] .mobile-menu__header {
    border-bottom-color: #334155;
}

.mobile-menu__close-btn {
    background: var(--gray-100);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .mobile-menu__close-btn {
    background: #1e293b;
    color: #cbd5e1;
}

.mobile-drawer-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

[data-theme="dark"] .mobile-drawer-card {
    background: #1e293b;
    border-color: #334155;
}

.mobile-drawer-search {
    position: relative;
    margin-bottom: 16px;
}

.mobile-drawer-search input {
    width: 100%;
    padding: 10px 38px 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--gray-300);
    background: var(--gray-50);
    color: var(--gray-900);
    font-size: 13px;
    outline: none;
}

[data-theme="dark"] .mobile-drawer-search input {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

.mobile-drawer-search button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

.mobile-drawer-section {
    margin-bottom: 20px;
}

.mobile-drawer-section__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.mobile-district-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mobile-district-chips a {
    background: var(--gray-100);
    color: var(--gray-800);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--gray-200);
    transition: all 0.15s;
}

[data-theme="dark"] .mobile-district-chips a {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}

.mobile-district-chips a:hover,
.mobile-district-chips a:active {
    background: var(--color-primary, #D32F2F);
    color: white;
    border-color: var(--color-primary, #D32F2F);
}

.mobile-menu__nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    text-decoration: none;
    transition: background 0.15s;
    margin-bottom: 2px;
}

[data-theme="dark"] .mobile-menu__nav a {
    color: #e2e8f0;
}

.mobile-menu__nav a:hover,
.mobile-menu__nav a:active {
    background: var(--gray-100);
    color: var(--color-primary, #D32F2F);
}

[data-theme="dark"] .mobile-menu__nav a:hover,
[data-theme="dark"] .mobile-menu__nav a:active {
    background: #1e293b;
}

/* 5. Article Reader Toolbar */
.article-reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 10px 14px;
    border-radius: 12px;
    margin: var(--space-4) 0;
}

[data-theme="dark"] .article-reader-toolbar {
    background: #1e293b;
    border-color: #334155;
}

.reading-time-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

[data-theme="dark"] .reading-time-pill {
    color: #94a3b8;
}

.font-resizer {
    display: flex;
    align-items: center;
    gap: 4px;
}

.font-resizer__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    margin-right: 4px;
}

[data-theme="dark"] .font-resizer__label {
    color: #94a3b8;
}

.font-resizer__btn {
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-800);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

[data-theme="dark"] .font-resizer__btn {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

.font-resizer__btn:hover,
.font-resizer__btn.active {
    background: var(--color-primary, #D32F2F);
    color: white;
    border-color: var(--color-primary, #D32F2F);
}

.native-share-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary, #D32F2F);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
    transition: transform 0.15s;
}

.native-share-action-btn:active {
    transform: scale(0.95);
}

.article-content.font-sm {
    font-size: 15px !important;
    line-height: 1.7 !important;
}

.article-content.font-lg {
    font-size: 20px !important;
    line-height: 1.9 !important;
}

/* 6. Media queries for bottom nav spacing */
@media (max-width: 768px) {
    body {
        padding-bottom: 66px !important;
    }
    
    .mobile-bottom-nav {
        display: flex !important;
    }
    
    .back-to-top {
        bottom: 74px !important;
    }
}


