/*
Theme Name: AZ News Custom
Theme URI: https://parthingx.dotanpix.com
Author: Parth Sheth
Description: Exact User Design (Desktop 4-Col) + Mobile Ticker Image Fixed.
Version: 11.8
Text Domain: az-news-custom
*/

:root {
    --font-headings: 'Oswald', sans-serif; 
    --font-content: 'Open Sans', sans-serif;
    --primary-color: #6fdceb; 
    --secondary-color: #03002e; 
    --dark-bg: #000000; 
    --light-gray: #f4f4f4;
    --white: #ffffff;
}

body { font-family: var(--font-content); margin: 0; padding: 0; background: var(--light-gray); color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; display: block; }
html { scroll-behavior: smooth; }

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-headings); font-weight: 700; margin-top: 0; color: var(--secondary-color); }

/* HEADER & MENU */
.top-bar { background: #fff; color: #333; padding: 0; font-size: 12px; line-height: 35px; border-bottom: 1px solid #eee; }
.top-social { float: right; }
.top-social a { margin-left: 15px; color: #555; }

/* DEFAULT CONTAINER */
.container { width: 90%; max-width: 1200px; margin: 0 auto; position: relative; }

.main-header { background: var(--white); padding: 15px 0; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }

/* Logo Text Styling */
.logo a { font-size: 32px; font-weight: 900; color: var(--secondary-color); text-transform: uppercase; line-height: 1; font-family: var(--font-headings); }
.logo span { color: var(--primary-color); }

/* Header Logo Image Sizing */
.logo img, .custom-logo-link img { 
    height: 50px; 
    width: auto; 
    max-width: 250px; 
    object-fit: contain; 
}

/* --- DESKTOP MENU --- */
.main-menu { background: var(--dark-bg); color: #fff; height: 50px; display: flex; align-items: center; position: relative; z-index: 100; }

.menu-toggle { display: none; }
.mobile-nav-wrapper { display: none; }
.mobile-overlay { display: none; }

.nav-links { display: flex; height: 100%; align-items: center; }
.nav-links > li { position: relative; height: 100%; display: flex; align-items: center; }
.nav-links > li > a { color: #ffffff; padding: 0 15px; font-family: var(--font-headings); font-weight: 500; text-transform: uppercase; font-size: 14px; letter-spacing: 1px; display: flex; align-items: center; height: 100%; }
.nav-links > li:hover > a { color: var(--primary-color); }
.menu-item-has-children > a::after { content: '\f107'; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: 5px; font-size: 10px; color: #888; }
.nav-links ul { position: absolute; top: 100%; left: 0; background: #111; min-width: 200px; display: none; flex-direction: column; box-shadow: 0 5px 10px rgba(0,0,0,0.3); border-top: 3px solid var(--primary-color); }
.nav-links li:hover > ul { display: flex; }
.nav-links ul li { width: 100%; border-bottom: 1px solid #222; }
.nav-links ul li a { padding: 12px 15px; display: block; font-size: 13px; text-transform: capitalize; color: #ccc; font-weight: 400; font-family: var(--font-content); }
.nav-links ul li a:hover { background: #222; color: #fff; }

/* NEWS TICKER */
.ticker-wrapper { background: #fff; border-bottom: 1px solid #e5e5e5; height: 80px; overflow: hidden; margin-bottom: 30px; }
.ticker-track { display: flex; width: max-content; animation: scroll-left 40s linear infinite; align-items: center; height: 100%; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item { display: flex; align-items: center; margin-right: 50px; height: 100%; padding: 10px 0; }
.ticker-img { height: 60px; width: auto; border-radius: 4px; display: block; margin-right: 12px; }
.ticker-title { font-family: var(--font-headings); font-weight: 700; font-size: 16px; color: var(--secondary-color); text-decoration: none; line-height: 1.15; letter-spacing: -0.3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 280px; white-space: normal; }
.ticker-title:hover { color: var(--primary-color); }

/* --- HOMEPAGE GRIDS --- */
.featured-strip { margin-bottom: 40px; }
.strip-heading { margin-bottom: 15px; font-size: 18px; text-transform: uppercase; border-left: 4px solid var(--primary-color); padding-left: 10px; color: var(--secondary-color); }

/* Grid Setup */
.featured-grid, .four-box-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
}

/* 1. TOP STRIP CARD (Tiny Card) */
.feat-card { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 4px 8px rgba(0,0,0,0.08); border: 1px solid #eaeaea; transition: transform 0.3s; }
.feat-card:hover { transform: translateY(-3px); }
.feat-media { 
    height: 160px; /* Fixed Height for Top Strip */
    background: #000; 
    overflow: hidden; 
    border-bottom: 1px solid #f0f0f0; 
}
.feat-img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* Contain for Top Strip */
    display: block; 
}
.feat-body { padding: 15px; }
.feat-title { font-size: 15px; font-weight: 700; line-height: 1.35; margin: 0 0 10px 0; color: var(--secondary-color); font-family: var(--font-headings); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feat-title:hover { color: var(--primary-color); }
.feat-meta { font-size: 11px; color: #999; }

/* 2. CATEGORY BOX CARD (Big Cards - Movie Reviews etc) */
.box-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.08); border: 1px solid #eaeaea; transition: transform 0.3s ease; display: flex; flex-direction: column; }
.box-card:hover { transform: translateY(-5px); }
.box-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }

/* RESTORED: Aspect Ratio 16:9 for Homepage Boxes */
.box-media { 
    width: 100%; 
    aspect-ratio: 16 / 9; 
    overflow: hidden; 
    background: #000; 
}
/* RESTORED: Object Fit Cover for Homepage Boxes */
.box-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.3s ease; 
}
.box-card:hover .box-img { transform: scale(1.05); }

.box-body { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.box-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin: 0 0 10px 0; color: var(--secondary-color); font-family: var(--font-headings); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.box-title:hover { color: var(--primary-color); }
.box-meta { font-size: 12px; color: #888; font-weight: 600; margin-top: auto; }

/* Sections */
.custom-cat-section { margin-bottom: 50px; }
.black-strip { background-color: #1a1a1a; padding: 8px 15px; display: flex; justify-content: space-between; align-items: center; border-radius: 4px; margin-bottom: 25px; border-left: 5px solid var(--primary-color); }
.strip-title { color: #ffffff; font-size: 18px; font-weight: 800; margin: 0; text-transform: uppercase; letter-spacing: 0.5px; }
.red-btn { background-color: #ff0055; color: #ffffff; font-size: 11px; font-weight: 800; text-transform: uppercase; padding: 6px 12px; border-radius: 3px; transition: background 0.3s ease; font-family: var(--font-headings); }
.red-btn:hover { background-color: #d60047; color: #fff; }
.red-btn i { margin-left: 5px; }

/* Single Post & Page */
.single-page-container { display: grid; grid-template-columns: 70% 28%; gap: 2%; margin-top: 30px; margin-bottom: 50px; }
.post-header { margin-bottom: 20px; }
.cat-badge-single { background: var(--primary-color); color: var(--secondary-color); padding: 3px 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; border-radius: 3px; display: inline-block; margin-bottom: 10px; }
.single-title { font-size: 36px; line-height: 1.2; margin-bottom: 15px; color: var(--secondary-color); }
.single-meta { font-size: 13px; color: #888; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.meta-item { margin-right: 15px; }
.meta-item i { color: var(--primary-color); margin-right: 5px; }
.single-featured-img { margin-bottom: 30px; border-radius: 6px; overflow: hidden; }
.single-featured-img img { width: 100%; height: auto; display: block; }
.toc-container { background: #fdfdfd; border: 1px solid #e5e5e5; border-top: 3px solid var(--primary-color); padding: 20px; margin-bottom: 35px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); display: inline-block; min-width: 300px; max-width: 100%; }
.toc-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }
.toc-title { font-size: 18px; font-family: var(--font-headings); color: var(--secondary-color); text-transform: uppercase; font-weight: 700; }
.toc-toggle { font-size: 13px; cursor: pointer; color: #555; font-weight: 600; }
.toc-toggle:hover { color: var(--primary-color); }
.toc-toggle i { margin-left: 5px; }
#toc-list { padding-left: 20px; margin: 0; }
#toc-list li { list-style: decimal; margin-bottom: 8px; color: #555; font-size: 15px; }
.toc-sub-item { margin-left: 20px; list-style: circle !important; }
#toc-list li a { color: #333; font-weight: 600; text-decoration: none; transition: color 0.2s; }
#toc-list li a:hover { color: var(--primary-color); text-decoration: underline; }
.post-content { font-size: 17px; line-height: 1.8; color: #333; margin-bottom: 40px; }
.post-content p { margin-bottom: 20px; }
.post-content h2, .post-content h3 { margin-top: 30px; margin-bottom: 15px; color: var(--secondary-color); font-family: var(--font-headings); }
.post-content blockquote { border-left: 5px solid var(--primary-color); background: #fff; padding: 15px 20px; font-style: italic; margin: 20px 0; color: #555; }
.post-tags { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.tag-label { font-weight: 800; color: var(--secondary-color); }
.post-tags a { background: #fff; border: 1px solid #ddd; padding: 3px 8px; font-size: 12px; margin-right: 5px; border-radius: 3px; color: #666; }

/* Category & Hero */
.hero-section { margin-bottom: 50px; }
.hero-wrapper { display: grid; grid-template-columns: 1.6fr 1fr; gap: 25px; align-items: start; }
.hero-left { position: relative; border-radius: 6px; overflow: hidden; line-height: 0; }
.hero-media { position: relative; width: 100%; }
.hero-img-big { width: 100%; height: auto; display: block; object-fit: cover; }
.hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 30px; background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%); z-index: 2; line-height: 1.6; }
.cat-badge { background: var(--primary-color); color: var(--secondary-color); padding: 4px 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; display: inline-block; margin-bottom: 10px; border-radius: 3px; }
.hero-big-title { font-size: 28px; margin: 0 0 10px 0; line-height: 1.2; font-family: var(--font-headings); color: #ffffff !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
.hero-meta { font-size: 12px; font-weight: 600; color: #ffffff !important; text-shadow: 1px 1px 2px rgba(0,0,0,0.8); }
.hero-meta i { color: #ffffff !important; }
.hero-right { display: flex; flex-direction: column; gap: 15px; }
.hero-small-card { display: block; background: #fff; border-radius: 6px; overflow: hidden; border: 1px solid #eee; }
.small-card-link { display: flex; align-items: center; padding: 10px; }
.small-card-link:hover { background: #f9f9f9; }
.small-media { width: 110px; height: 70px; flex-shrink: 0; margin-right: 15px; border-radius: 4px; overflow: hidden; background: #000; }
.hero-img-small { width: 100%; height: 100%; object-fit: cover; }
.small-info { flex-grow: 1; }
.hero-small-title { font-size: 15px; font-weight: 700; line-height: 1.3; margin: 0 0 5px 0; color: var(--secondary-color); font-family: var(--font-headings); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.small-date { font-size: 11px; color: #999; font-weight: 600; }
.cat-hero-section { background-color: var(--secondary-color); padding: 80px 0; text-align: center; margin-bottom: 40px; }
.cat-page-title { color: #ffffff; font-size: 48px; margin-bottom: 30px; font-family: var(--font-headings); text-transform: capitalize; }
.cat-search-wrapper { max-width: 500px; margin: 0 auto; position: relative; }
.cat-search-form { display: flex; background: #fff; border-radius: 5px; overflow: hidden; height: 50px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.cat-search-input { border: none; padding: 0 20px; flex-grow: 1; font-size: 16px; outline: none; color: #333; }
.cat-search-submit { background: #fff; border: none; padding: 0 20px; color: var(--secondary-color); font-size: 18px; cursor: pointer; transition: color 0.3s; }
.cat-search-submit:hover { color: var(--primary-color); }
.cat-grid-wrapper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.load-more-wrapper { text-align: center; margin-top: 50px; }
#az_load_more_btn { background-color: var(--primary-color); color: var(--secondary-color); font-family: var(--font-headings); font-weight: 700; text-transform: uppercase; padding: 12px 30px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; transition: background 0.3s, transform 0.2s; }
#az_load_more_btn:hover { background-color: #5bcbd8; transform: translateY(-2px); }

/* Sidebar & Footer */
.single-sidebar { position: sticky; top: 20px; height: fit-content; }
.widget-title { font-size: 18px; text-transform: uppercase; border-bottom: 2px solid var(--secondary-color); padding-bottom: 10px; margin-bottom: 20px; color: var(--secondary-color); }
.sidebar-list li { list-style: none; margin-bottom: 15px; }
.side-link { display: flex; align-items: center; }
.side-img { width: 80px; height: 60px; flex-shrink: 0; margin-right: 15px; border-radius: 4px; overflow: hidden; background: #000; }
.side-img img { width: 100%; height: 100%; object-fit: cover; }
.side-title { font-size: 14px; margin: 0 0 5px 0; line-height: 1.3; font-family: var(--font-headings); }
.side-date { font-size: 11px; color: #999; }

footer { background-color: var(--secondary-color); color: #e0e0e0; padding: 70px 0 0; margin-top: 60px; font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 40px; margin-bottom: 50px; }
.footer-widget h3 { color: #ffffff; font-size: 18px; margin-bottom: 25px; font-family: var(--font-headings); text-transform: capitalize; font-weight: 700; }
.branding-widget .footer-logo a { color: #fff; font-size: 30px; font-weight: 900; font-family: var(--font-headings); text-transform: uppercase; text-decoration: none; display: inline-block; margin-bottom: 20px; }
.branding-widget .footer-logo span { color: var(--primary-color); }
.branding-widget .footer-logo img { width: auto; max-width: 200px; height: auto; display: block; margin-bottom: 20px; }
.footer-desc { line-height: 1.8; margin-bottom: 25px; color: #ffffff; font-weight: 500; }
.footer-links li { margin-bottom: 12px; list-style: none; }
.footer-links li a { color: #ffffff; font-weight: 600; text-decoration: none; transition: 0.3s; display: inline-block; }
.footer-links li a:hover { color: var(--primary-color); transform: translateX(5px); }
.newsletter-widget p { margin-bottom: 20px; color: #ffffff; font-weight: 500; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input[type="email"] { padding: 12px 15px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); color: #fff; font-family: var(--font-content); outline: none; }
.newsletter-form input[type="email"]::placeholder { color: #ccc; }
.newsletter-form input[type="email"]:focus { border-color: var(--primary-color); background: rgba(0,0,0,0.2); }
.newsletter-form button { background: var(--primary-color); color: var(--secondary-color); border: none; padding: 12px; border-radius: 4px; font-weight: 700; text-transform: uppercase; cursor: pointer; font-family: var(--font-headings); transition: 0.3s; }
.newsletter-form button:hover { background: #fff; }
.newsletter-form button i { margin-left: 6px; }
.copyright { background-color: rgba(0,0,0,0.2); padding: 20px 0; text-align: center; font-size: 13px; color: #ffffff; font-weight: 600; border-top: 1px solid rgba(255,255,255,0.05); }
.copyright a:hover { color: var(--primary-color) !important; }

/* =========================================
   RESPONSIVE (MEDIA QUERIES) - CRITICAL PART
   ========================================= */

@media (max-width: 992px) {
    /* Hide Desktop Menu */
    .desktop-nav-wrapper { display: none !important; }

    /* SHOW Toggle Button */
    .menu-toggle { display: block; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

    /* MOBILE SLIDE MENU (Drawer) */
    .mobile-nav-wrapper {
        display: block; position: fixed; top: 0; left: -280px; width: 280px; height: 100vh;
        background: #111; z-index: 9999; transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    }
    .mobile-nav-wrapper.active { left: 0; }

    /* Mobile Menu Internal */
    .mobile-menu-header { background: var(--primary-color); padding: 15px; display: flex; justify-content: space-between; align-items: center; }
    .mobile-menu-header h3 { margin: 0; color: #000; font-size: 18px; text-transform: uppercase; }
    .mobile-close-btn { background: none; border: none; font-size: 22px; color: #000; cursor: pointer; }

    .mobile-links { padding: 0; margin: 0; }
    .mobile-links li { 
        border-bottom: 1px solid #222; 
        position: relative; /* Needed for Toggle Button */
    }
    .mobile-links li a { display: block; padding: 12px 20px; color: #fff; font-family: var(--font-headings); text-transform: uppercase; font-size: 14px; }
    .mobile-links li a:hover { background: #222; color: var(--primary-color); }
    
    /* === FIX 1: HIDE SUB-MENU BY DEFAULT === */
    .mobile-links .sub-menu { 
        display: none; /* Hide Sub-Menus initially */
        background: #000; 
        position: static; 
        box-shadow: none; 
        border: none; 
    }
    .mobile-links .sub-menu li a { padding-left: 35px; color: #aaa; font-size: 13px; text-transform: capitalize; }
    
    /* === FIX 2: REMOVE THE EXTRA ARROW NEXT TO NAME ON MOBILE === */
    .mobile-links .menu-item-has-children > a::after {
        display: none !important;
        content: none !important;
    }

    /* === DROPDOWN ARROW STYLE (Right Side Button) === */
    .dropdown-toggle {
        position: absolute;
        top: 0;
        right: 0;
        width: 50px;
        height: 45px; /* Match link height */
        background: transparent;
        border: none;
        color: #fff;
        font-size: 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s;
        z-index: 10;
    }
    .dropdown-toggle.active {
        transform: rotate(180deg);
        color: var(--primary-color);
    }

    /* OVERLAY */
    .mobile-overlay { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 9998; opacity: 0; visibility: hidden; transition: 0.3s; }
    .mobile-overlay.active { opacity: 1; visibility: visible; }

    /* Grid Adjustments for Tablet */
    .four-box-grid, .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-wrapper { grid-template-columns: 1fr; }
    .hero-right { display: grid; grid-template-columns: 1fr 1fr; }
    .cat-grid-wrapper { grid-template-columns: repeat(2, 1fr); }
    .footer-cols { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 600px) {
    /* === FIX: INCREASE MOBILE WIDTH TO FIT SCREEN === */
    .container {
        width: 95% !important; 
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* === IMPORTANT FIX: REMOVE GRID LAYOUT FOR SINGLE POST ON MOBILE === */
    .single-page-container {
        display: block !important; 
        grid-template-columns: none !important;
    }
    .single-main {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* === FIX: RELATED POSTS STACKED ON MOBILE === */
    .related-grid { 
        grid-template-columns: 1fr; /* 1 Column on Mobile */
    }

    /* === FIX: HOME PAGE GRID 1 COL ON MOBILE === */
    .four-box-grid, .featured-grid { 
        grid-template-columns: 1fr; 
        gap: 15px; 
    }

    /* === FIX FOR HAMBURGER MENU VISIBILITY === */
    .menu-toggle {
        margin-left: 0;
    }

    /* Reduce Logo Area Padding */
    .main-header { padding: 10px 0; } 
    .logo img { max-height: 40px; width: auto; }

    /* === FIX FOR SLIDER/TICKER === */
    .ticker-wrapper { 
        height: auto; 
        padding: 5px 0; 
        margin-bottom: 20px; 
    }
    .ticker-item { 
        margin-right: 15px; /* Reduced space between items */
    }
    /* --- MOBILE TICKER IMAGE RESTORED HERE --- */
    .ticker-img {
        display: block !important; /* Force show image on mobile */
        height: 40px; 
        width: auto;
        margin-right: 10px;
    }
    .ticker-title {
        font-size: 14px; /* Smaller text for slider */
        width: auto; /* Let text flow naturally */
        white-space: nowrap;
    }
    
    /* === FIX FOR HUGE TITLE ON MOBILE === */
    .single-title {
        font-size: 26px; /* Reduced from 36px to fit screen */
    }

    /* Spacing between sections */
    .featured-strip { margin-bottom: 20px; }
    .custom-cat-section { margin-bottom: 25px; }
    .hero-section { margin-bottom: 25px; }

    .cat-grid-wrapper { grid-template-columns: 1fr; }
    .cat-page-title { font-size: 32px; }
    .footer-cols { grid-template-columns: 1fr; }
    .branding-widget { text-align: center; }
}

/* =========================================
   MOBILE VISIBILITY HELPERS
   ========================================= */
@media (max-width: 600px) {
    .hide-on-mobile {
        display: none !important;
    }
}
.show-only-mobile {
    display: none !important;
}
@media (max-width: 600px) {
    .show-only-mobile {
        display: block !important;
    }
}

/* === SPECIAL: SHOW ONLY 1 POST IN GRID ON MOBILE === */
@media (max-width: 600px) {
    .mobile-limit-one .box-card:nth-child(n+2) {
        display: none !important;
    }
}