/*
Theme Name: Mango Bunch
Theme URI: https://mangobunch.com
Author: Vipul
Author URI: https://mangobunch.com
Description: Custom news theme for Mango Bunch
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mangobunch
*/

/* ============================================
   MANGO BUNCH - MAIN STYLESHEET
   Two-Row Header with Smart Hide/Show + Simplified Footer
   ============================================ */

/* CSS Variables */
:root {
    --primary-orange: #fcb040;
    --primary-orange-hover: #e09a00;
    --dark-bg: #231f20;
    --darker-bg: #1a1618;
    --text-dark: #231f20;
    --text-body: #444444;
    --text-gray: #6d6e70;
    --text-light: #888888;
    --text-muted: #999999;
    --border-color: #e8e8e8;
    --border-light: #f0f0f0;
    --bg-light: #f8f8f8;
    --white: #ffffff;
    --black: #231f20;
    --font-main: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-headings: 'Roboto Condensed', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
    --header-height: 130px; /* 110px header + 20px gap */
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-body);
    background-color: var(--white);
    font-weight: 400;
    padding-top: var(--header-height);
}

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

a:hover {
    color: var(--primary-orange);
}

ul, ol {
    list-style: none;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-dark);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================
   SMART HEADER - Two Row Layout
   Row 1: Logo + Google Source (white bg)
   Row 2: Navigation Menu (dark bg)
   Hide on scroll down, show on scroll up
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

/* Header hidden state - scroll down */
.site-header.header-hidden {
    transform: translateY(-100%);
}

/* Header visible with shadow when scrolled */
.site-header.header-scrolled {
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
}

/* Row 1: Logo + Google Source */
.header-top {
    background: var(--white);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* WordPress Admin Bar Fix */
body.admin-bar .site-header {
    top: 32px;
}

body.admin-bar {
    padding-top: calc(var(--header-height) + 32px);
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
    
    body.admin-bar {
        padding-top: calc(var(--header-height) + 46px);
    }
}

/* Logo */
.logo a {
    display: block;
}

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

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Google Source Button */
.google-source-btn a {
    display: flex;
    align-items: center;
    background: var(--white);
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: 8px;
    gap: 12px;
    border: 1px solid #dadce0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all var(--transition);
}

.google-source-btn a:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    color: var(--text-dark);
}

.gs-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gs-icon svg {
    width: 28px;
    height: 28px;
}

.gs-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text-dark);
}

/* Mobile Menu Toggle - Hidden on Desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark-bg);
    font-size: 22px;
    padding: 10px;
    cursor: pointer;
}

/* Row 2: Navigation */
.main-nav {
    background: var(--dark-bg);
    position: relative;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

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

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--white);
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: background var(--transition);
}

.nav-menu > li > a:hover,
.nav-menu > li:hover > a {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.nav-menu > li > a i.fa-chevron-down {
    font-size: 9px;
    opacity: 0.7;
}

/* Dropdown - Desktop */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    z-index: 1000;
    border-top: 3px solid var(--primary-orange);
}

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

.dropdown li a {
    display: block;
    padding: 10px 18px;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition);
}

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

.dropdown li a:hover {
    background: var(--primary-orange);
    color: var(--white);
    padding-left: 22px;
}

/* Mobile Menu Panel - Hidden on Desktop */
.mobile-menu-panel {
    display: none;
    background: var(--dark-bg);
    border-top: 1px solid #333;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.site-main {
    min-height: 60vh;
}

/* ============================================
   FOOTER STYLES - Simplified (Trending + Copyright only)
   ============================================ */

.site-footer {
    background: var(--dark-bg);
    color: #cccccc;
    margin-top: 25px;
}

/* Footer Top - Trending */
.footer-top {
    background: var(--darker-bg);
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
}

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

.footer-trending {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-trending-label {
    background: var(--primary-orange);
    color: var(--dark-bg);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-trending-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-trending-links a {
    color: #aaaaaa;
    font-size: 12px;
    transition: color var(--transition);
}

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

/* Footer Bottom */
.footer-bottom {
    background: var(--dark-bg);
    padding: 15px 0;
    border-top: 1px solid #2a2a2a;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright {
    font-size: 12px;
    color: #777777;
}

.footer-bottom-links {
    display: flex;
    gap: 18px;
}

.footer-bottom-links a {
    font-size: 11px;
    color: #777777;
    transition: color var(--transition);
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */

.category-tag {
    display: inline-block;
    background: var(--primary-orange);
    color: var(--dark-bg);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 7px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.2;
}

.section-title {
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--primary-orange);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.article-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.article-meta .author {
    color: var(--text-gray);
    font-weight: 500;
}

/* Line Clamp for Headlines */
.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;
}

/* Image Hover Effect */
.img-hover {
    overflow: hidden;
}

.img-hover img {
    transition: transform 0.3s ease;
}

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

/* Screen Reader Text - Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

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

@media (max-width: 1024px) {
    .nav-menu > li > a {
        padding: 13px 14px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    /* Header Row 1 adjustments */
    .header-container {
        padding: 10px 15px;
    }
    
    .logo img {
        height: 38px;
    }
    
    /* Show hamburger menu on mobile */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hide Google text on mobile, show icon only */
    .gs-text {
        display: none;
    }
    
    .google-source-btn a {
        padding: 8px;
        border-radius: 6px;
    }
    
    /* Hide desktop nav menu on mobile */
    .main-nav .nav-container {
        display: none;
    }
    
    /* Mobile menu panel */
    .mobile-menu-panel {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--dark-bg);
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        z-index: 999;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
    
    .mobile-menu-panel.active {
        display: block;
    }
    
    /* Mobile Search */
    .mobile-search {
        padding: 15px;
        border-bottom: 1px solid #333;
    }
    
    .mobile-search-form {
        display: flex;
        background: #3a3a3a;
        border-radius: 6px;
        overflow: hidden;
    }
    
    .mobile-search-form input {
        flex: 1;
        padding: 12px 15px;
        font-size: 14px;
        border: none;
        background: transparent;
        color: var(--white);
        outline: none;
    }
    
    .mobile-search-form input::placeholder {
        color: #888;
    }
    
    .mobile-search-form button {
        padding: 12px 15px;
        background: var(--primary-orange);
        color: var(--dark-bg);
        border: none;
        font-size: 14px;
    }
    
    /* Mobile Nav Menu */
    .mobile-nav-menu {
        padding: 10px 0;
    }
    
    .mobile-nav-menu > li {
        border-bottom: 1px solid #333;
    }
    
    .mobile-nav-menu > li:last-child {
        border-bottom: none;
    }
    
    .mobile-nav-menu > li > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 20px;
        color: var(--white);
        font-size: 14px;
        font-weight: 600;
    }
    
    .mobile-nav-menu > li > a i {
        font-size: 10px;
        opacity: 0.7;
    }
    
    /* Mobile Dropdown */
    .mobile-nav-menu .dropdown {
        position: static;
        background: #3a3a3a;
        box-shadow: none;
        border-top: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        min-width: 100%;
    }
    
    .mobile-nav-menu .has-dropdown.active .dropdown {
        display: block;
    }
    
    .mobile-nav-menu .dropdown li a {
        padding: 12px 20px 12px 35px;
        color: #ccc;
        border-bottom: 1px solid #4a4a4a;
        font-size: 13px;
    }
    
    .mobile-nav-menu .dropdown li:last-child a {
        border-bottom: none;
    }
    
    .mobile-nav-menu .dropdown li a:hover {
        background: var(--primary-orange);
        color: var(--dark-bg);
        padding-left: 40px;
    }
    
    /* Footer */
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-trending {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .logo img {
        height: 32px;
    }
    
    .google-source-btn a {
        padding: 6px;
    }
    
    .gs-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .menu-toggle {
        font-size: 20px;
        padding: 8px;
    }
}

/* ============================================
   TABLE STYLES - Universal (No Parent Class Required)
   ============================================ */

article table,
.single-post table,
.post table,
.page table,
.article-content table,
.entry-content table,
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 15px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

article thead,
.single-post thead,
.post thead,
.page thead,
.article-content thead,
.entry-content thead,
.post-content thead {
    background: #231f20;
}

article th,
.single-post th,
.post th,
.page th,
.article-content th,
.entry-content th,
.post-content th {
    color: #ffffff;
    font-family: 'Roboto Condensed', 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 3px solid #fcb040;
}

article td,
.single-post td,
.post td,
.page td,
.article-content td,
.entry-content td,
.post-content td {
    padding: 12px 15px;
    border-bottom: 1px solid #e8e8e8;
    color: #444444;
    line-height: 1.6;
}

article tbody tr:nth-child(even),
.single-post tbody tr:nth-child(even),
.post tbody tr:nth-child(even),
.page tbody tr:nth-child(even),
.article-content tbody tr:nth-child(even),
.entry-content tbody tr:nth-child(even),
.post-content tbody tr:nth-child(even) {
    background: #f8f8f8;
}

article tbody tr:hover,
.single-post tbody tr:hover,
.post tbody tr:hover,
.page tbody tr:hover,
.article-content tbody tr:hover,
.entry-content tbody tr:hover,
.post-content tbody tr:hover {
    background: #fff8e6;
}

article tbody tr:last-child td,
.single-post tbody tr:last-child td,
.post tbody tr:last-child td,
.page tbody tr:last-child td,
.article-content tbody tr:last-child td,
.entry-content tbody tr:last-child td,
.post-content tbody tr:last-child td {
    border-bottom: none;
}

article td:first-child,
.single-post td:first-child,
.post td:first-child,
.page td:first-child,
.article-content td:first-child,
.entry-content td:first-child,
.post-content td:first-child {
    font-weight: 600;
    color: #231f20;
}

/* Responsive Tables */
@media (max-width: 768px) {
    article table,
    .single-post table,
    .post table,
    .page table,
    .article-content table,
    .entry-content table,
    .post-content table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    article th,
    .single-post th,
    .post th,
    .page th,
    .article-content th,
    .entry-content th,
    .post-content th,
    article td,
    .single-post td,
    .post td,
    .page td,
    .article-content td,
    .entry-content td,
    .post-content td {
        padding: 10px 12px;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    article th,
    .single-post th,
    .post th,
    .page th,
    .article-content th,
    .entry-content th,
    .post-content th,
    article td,
    .single-post td,
    .post td,
    .page td,
    .article-content td,
    .entry-content td,
    .post-content td {
        padding: 8px 10px;
        font-size: 12px;
    }
}