/* 
Theme Name: Town Talk Custom
Author: Custom
Description: Custom Modern Design with Professional Mobile Menu
Version: 2.0 
*/

/* =========================================
   1. VARIABLES & GLOBAL RESET
   ========================================= */
:root {
    /* Colors */
    --primary-black: #111111;
    --primary-white: #ffffff;
    --accent-blue: #0078ff;
    --accent-red: #ff3333;
    --accent-gold: #eebf36;
    --accent-orange: #d35400; /* Dark Orange */
    --gray-border: #e6e6e6;
    --gray-text: #555555;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;

    /* Fonts */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --font-book: 'Noto Serif Devanagari', serif;
}

.page{
   border: none !important;
   padding: 0px !important;
   height: auto !important;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: var(--font-primary); 
    background-color: var(--primary-white); 
    color: var(--primary-black); 
    overflow-x: hidden; 
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
a:hover { color: var(--accent-orange); }

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

/* WordPress Specific Fixes */
.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin-right: 20px; }
.alignright { float: right; margin-left: 20px; }
iframe { max-width: 100%; }

/* Containers */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.container-fluid { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 40px; }

@media (min-width: 1024px) {
    .container { padding: 0 4vw; } 
}

/* =========================================
   2. TOP BAR (Black)
   ========================================= */
.top-bar { background-color: #000; color: #ccc; font-size: 12px; padding: 10px 0; border-bottom: 1px solid #333; }
.top-bar-flex { display: flex; justify-content: space-between; align-items: center; }
.top-right { display: flex; align-items: center; gap: 20px; }
.social-icons { display: flex; gap: 15px; }
.social-icons a { color: #fff; font-size: 14px; transition: 0.3s; }
.social-icons a:hover { color: var(--accent-orange); transform: translateY(-2px); }


/* =========================================
   3. MAIN HEADER (Desktop Fixed Layout)
   ========================================= */
.main-header { 
    background-color: var(--bg-white); 
    border-bottom: 1px solid #eee; 
    position: sticky; 
    top: 0; 
    
    z-index: 1000; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.header-flex { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    min-height: 90px; 
    padding: 10px 0;
}

/* Logo Fix */
.site-logo {
    flex-shrink: 0; 
    margin-right: 40px; 
}
.site-logo a { display: flex; align-items: center; }
.site-logo img, 
.custom-logo {
    max-height: 60px !important; /* Limits huge logo size */
    width: auto !important;
    display: block;
    object-fit: contain;
}
.text-logo { font-size: 32px; font-weight: 900; color: #000; letter-spacing: -1px; }

/* Desktop Menu Fix (Single Line) */
.desktop-menu { 
    flex-grow: 1; 
    display: flex; 
    justify-content: flex-center; 
    margin-right: 30px; 
}
.nav-list { 
    display: flex; 
    gap: 25px; 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    align-items: center;
}
.nav-list li a { 
    font-size: 13px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    color: #000;
    white-space: nowrap; /* Prevents text from breaking into two lines */
}
.nav-list li a:hover { color: var(--accent-orange); }

/* Header Actions (Search & Mobile Toggle) */
.header-actions { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
    flex-shrink: 0; 
}
.action-btn { 
    background: none; 
    border: none; 
    font-size: 22px; 
    cursor: pointer; 
    color: #111; 
    transition: 0.3s; 
    padding: 0;
}
.action-btn:hover { color: var(--accent-orange); }
.mobile-only { display: none; } /* Hidden on desktop */


/* =========================================
   4. OFF-CANVAS MOBILE MENU & SEARCH 
   ========================================= */
/* Mobile Sidebar Panel */
.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -350px; /* Hidden off-screen initially */
    width: 320px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0); 
    display: flex;
    flex-direction: column;
}
.mobile-menu-container.active { right: 0; } 

.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 25px 30px; border-bottom: 1px solid #eee; }
.mobile-menu-header h3 { font-size: 18px; font-weight: 800; margin: 0; text-transform: uppercase; letter-spacing: 1px; }

.mobile-nav { padding: 30px; flex-grow: 1; overflow-y: auto; }
.mobile-nav-list { list-style: none; padding: 0; margin: 0; }
.mobile-nav-list li { margin-bottom: 20px; border-bottom: 1px solid #f5f5f5; padding-bottom: 15px; }
.mobile-nav-list li a { font-size: 16px; font-weight: 600; color: #111; display: block; }
.mobile-nav-list li a:hover { color: var(--accent-orange); padding-left: 5px; }

.mobile-menu-footer { padding: 30px; background: #f9f9f9; border-top: 1px solid #eee; }
.mobile-menu-footer p { font-size: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 0; color: #666; }

/* Dark Background Overlay */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); 
    z-index: 9998; opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

/* Search Overlay */
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(255,255,255,0.98); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.search-overlay.active { opacity: 1; visibility: visible; }
.search-close { position: absolute; top: 40px; right: 40px; font-size: 40px; background: none; border: none; cursor: pointer; color: #111; }
.search-form-overlay input { font-size: 40px; border: none; border-bottom: 3px solid #111; background: transparent; width: 80vw; max-width: 800px; outline: none; padding-bottom: 10px; font-weight: 700; }
.search-form-overlay input::placeholder { color: #ccc; font-weight: 400; }


/* =========================================
   5. BREAKING NEWS TICKER
   ========================================= */
.news-ticker-bar { background: black; color: #fff; height: 44px; overflow: hidden; }
.ticker-flex { display: flex; height: 100%; padding: 0; }
.ticker-label { background: var(--accent-red); color: #fff; font-weight: 800; font-size: 13px; text-transform: uppercase; padding: 0 25px; display: flex; align-items: center; flex-shrink: 0; position: relative; z-index: 10; }
.ticker-content { flex-grow: 1; overflow: hidden; display: flex; align-items: center; position: relative; }
.ticker-track { display: flex; white-space: nowrap; animation: marquee 25s linear infinite; }
.ticker-item { margin-right: 50px; font-size: 14px; font-weight: 500; }
.ticker-item a:hover { text-decoration: underline; color: var(--accent-orange); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }


/* =========================================
   6. HOME PAGE COMPONENTS
   ========================================= */
.news-carousel-section { background-color: var(--slider-bg); padding: 30px 0; border-bottom: 1px solid #eee; overflow: hidden; }
.carousel-track-container { width: 100%; overflow: hidden; margin: 0 40px; }
.carousel-track { display: flex; gap: 30px; transition: transform 0.5s ease-in-out; width: max-content; }
.carousel-card { display: flex; gap: 15px; width: calc((100vw - 160px) / 3); min-width: 350px; align-items: flex-start; }
.c-image { flex-shrink: 0; width: 120px; height: 80px; border-radius: 4px; overflow: hidden; }
.c-content { display: flex; flex-direction: column; }
.c-title { font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 5px; }
.c-excerpt { font-size: 13px; color: #777; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Grids */
.hero-section { padding: 30px 0;}
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.main-article .img-wrap { overflow: hidden; margin-bottom: 20px; border-radius: 4px; }
.main-article h1 { font-size: 36px; margin-bottom: 15px; font-weight: 800; line-height: 1.2; }
.main-article p { color: var(--gray-text); margin-bottom: 20px; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 2px solid var(--primary-black); padding-bottom: 10px; }
.section-title { font-size: 32px; font-weight: 800; margin: 0; }

.news-grid-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-bottom: 60px; }
.dual-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.card-img { height: 250px; margin-bottom: 15px; overflow: hidden; border-radius: 4px; }
.card-title { font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }

/* Misc Sections */
.newsletter-section { background-color: #fdf2f2; padding: 60px 0; margin: 60px 0; }
.videos-section { background: black; color: white; padding: 60px 0; margin-top: 60px; }
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cta-gold { background-color: #eebf36; padding: 60px 0; margin-top: 60px; }


/* =========================================
   7. SINGLE POST STYLING
   ========================================= */
.article-header { padding-bottom: 30px; margin-top: 20px; }
.cat-badge { background: var(--accent-blue); color: white; padding: 4px 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; border-radius: 3px; display: inline-block; margin-bottom: 15px; }
.entry-title { font-family: var(--font-heading); font-size: 42px; font-weight: 700; line-height: 1.2; margin-bottom: 20px; color: #000; }
.meta-data { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; font-size: 12px; color: #666; border-bottom: 1px solid var(--gray-border); padding-bottom: 20px; margin-bottom: 30px; }

.content-grid { display: grid; grid-template-columns: 1fr 340px; gap: 60px; position: relative; align-items: start; }
.article-body { font-size: 18px; line-height: 1.8; color: #333; }
.article-body p { margin-bottom: 25px; }
.article-body p:first-of-type::first-letter { float: left; font-size: 70px; line-height: 60px; font-weight: 700; padding-right: 10px; padding-top: 5px; color: var(--primary-black); font-family: var(--font-heading); }
blockquote { border-left: 4px solid var(--accent-orange); padding-left: 20px; margin: 30px 0; font-family: var(--font-heading); font-style: italic; font-size: 24px; color: #444; }

/* Sticky Share Icons */
.share-sticky-wrap { position: absolute; left: -60px; top: 0; height: 100%; }
.share-icons { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 10px; }
.share-btn { width: 35px; height: 35px; border: 1px solid #ddd; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #666; font-size: 14px; background: white; }
.share-btn:hover { background: black; color: white; border-color: black; }

/* Sidebar */
.sidebar { position: relative; }
.widget-title { font-size: 14px; font-weight: 800; text-transform: uppercase; border-bottom: 2px solid black; padding-bottom: 10px; margin-bottom: 20px; display: inline-block; }


/* =========================================
   8. 3D BOOK LAYOUT
   ========================================= */
.blog-single-container { display: flex; gap: 30px; max-width: 1400px; margin: 0 auto; padding: 40px 20px; min-height: 100vh; }
.book-wrapper { flex: 0 0 70%; }
.book-container { perspective: 2500px; height: 85vh; position: relative; background: linear-gradient(145deg, #f0f2f5, #ffffff); border-radius: 25px; box-shadow: 0 30px 80px rgba(0,0,0,0.15); overflow: hidden; }
.book { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; padding: 30px; transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1); }
.page { position: absolute; width: 100%; height: 100%; background: linear-gradient(145deg, #fefcf7, #f8f4e6); box-shadow: 0 10px 40px rgba(0,0,0,0.2), inset 0 0 30px rgba(255,255,255,0.9); border-radius: 20px; transform-origin: left center; backface-visibility: hidden; cursor: grab; display: flex; flex-direction: column; padding: 50px 40px; overflow-y: auto; border: 1px solid rgba(255,255,255,0.5); }
.page-image { width: 100%; height: 280px; object-fit: cover; border-radius: 18px; margin-bottom: 30px; }
.page-content { flex: 1; font-size: 20px; line-height: 1.9; color: #2d3748; font-family: var(--font-book); }
.page-number { position: absolute; bottom: 30px; right: 40px; font-size: 28px; font-weight: bold; color: #667eea; text-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.page.flipped { transform: rotateY(-180deg); z-index: 1; }
.page.current { z-index: 20; }

.book-nav { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 20px; z-index: 100; background: rgba(255,255,255,0.95); padding: 15px 30px; border-radius: 50px; backdrop-filter: blur(20px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.nav-btn { width: 60px; height: 60px; border: none; border-radius: 50%; background: white; color: #667eea; font-size: 24px; font-weight: bold; cursor: pointer; box-shadow: 0 8px 25px rgba(0,0,0,0.15); transition: 0.3s; }
.nav-btn:hover:not(:disabled) { transform: translateY(-5px) scale(1.05); background: #667eea; color: white; }
.nav-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.blog-sidebar { flex: 0 0 30%; position: sticky; top: 100px; height: fit-content; max-height: 85vh; overflow-y: auto; }
.sidebar-widget { background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); border-radius: 25px; padding: 35px; box-shadow: 0 25px 60px rgba(0,0,0,0.1); border: 1px solid rgba(255,255,255,0.3); }


/* =========================================
   9. COMMENTS & FOOTER
   ========================================= */
#respond { background: #ffffff; padding: 40px; margin: 40px 0; border-radius: 12px; border: 1px solid #eee; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
h3#reply-title { font-size: 24px; font-weight: 800; color: #111; margin-bottom: 20px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea { width: 100%; padding: 16px; background: #f9f9f9; border: 2px solid transparent; border-radius: 6px; font-size: 15px; margin-bottom: 20px; transition: 0.3s; }
.comment-form input:focus, .comment-form textarea:focus { background: #fff; border-color: #111; outline: none; }
input#submit { background-color: #111; color: #ffffff; font-size: 14px; font-weight: 700; text-transform: uppercase; padding: 15px 35px; border: none; border-radius: 4px; cursor: pointer; transition: 0.3s; }
input#submit:hover { background-color: var(--accent-orange); transform: translateY(-2px); }

footer { background: #111; color: white; padding: 40px 0; margin-top: 60px; font-size: 13px; text-align: center; }


/* =========================================
   10. 📱 RESPONSIVE MEDIA QUERIES
   ========================================= */

/* --- TABLET (Max 1024px) --- */
@media (max-width: 1024px) {
    /* Header */
    .desktop-menu { display: none; } /* Hide Desktop Menu */
    .mobile-only { display: block; } /* Show Hamburger */
    .site-logo { margin-right: 0; }
    
    /* Layout */
    .content-grid, .hero-grid, .news-grid-layout { grid-template-columns: 1fr; gap: 40px; }
    .share-sticky-wrap { display: none; }
    
    /* Video & CTA */
    .video-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-image { display: none; }

    /* Book */
    .blog-single-container { flex-direction: column; }
    .book-wrapper, .blog-sidebar { flex: none; width: 100%; }
    .book-container { height: 75vh; }
}

/* --- MOBILE (Max 768px) --- */
@media (max-width: 768px) {
    /* Top Bar */
    .top-date { display: none; }
    .top-bar-flex { justify-content: center; }
    
    /* Header */
    .site-logo img { max-height: 45px !important; } /* Smaller logo for mobile */
    .search-form-overlay input { font-size: 24px; }
    .search-close { top: 20px; right: 20px; font-size: 30px; }
    
    /* Ticker */
    .ticker-label { font-size: 11px; padding: 0 15px; }

    /* Sliders & Grids */
    .carousel-card { width: 100%; min-width: 85vw; }
    .dual-card-grid, .related-grid, .video-grid { grid-template-columns: 1fr; }
    .video-card .card-img { height: 250px; }

    /* Single Post Typography */
    .entry-title { font-size: 28px; }
    .article-body { font-size: 16px; }
    .article-body p:first-of-type::first-letter { font-size: 50px; line-height: 50px; }

    /* Book */
    .book-container { height: 70vh; padding: 15px; }
    .page { padding: 30px 20px; }
    .page-content { font-size: 16px; }

    /* Comments */
    #respond { padding: 25px; margin: 20px 0; }
    input#submit { width: 100%; text-align: center; }
}

/* --- SMALL MOBILE (Max 480px) --- */
@media (max-width: 480px) {
    .section-title { font-size: 24px; }
    .page-image { height: 200px; }
    .book-nav { width: 90%; justify-content: space-between; padding: 10px 20px; }
    .nav-btn { width: 50px; height: 50px; font-size: 20px; }
}