/*
Theme Name: Dainik Aakash Mail
Theme URI: https://dainikaakashmail.com
Author: Dainik Aakash Mail Team
Author URI: https://dainikaakashmail.com
Description: Native WordPress news portal with Jobs, Matrimonial, Video Reels, E-Paper, Live TV, and Owner Ad Management. Fully Hindi/Devanagari compatible.
Version: 2.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dainik-aakash-mail
Tags: news, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===================== CSS VARIABLES ===================== */
:root {
    --navy: #0f172a;
    --red: #ef4444;
    --red-dark: #dc2626;
    --off-white: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --transition: 0.2s ease;
}

/* ===================== RESET & BASE ===================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--off-white);
    color: var(--gray-800);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Serif Display', 'Noto Serif Devanagari', Georgia, serif;
    font-weight: 500;
    line-height: 1.25;
    color: var(--navy);
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===================== LAYOUT ===================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    padding: 2rem 0;
}

.main-content { min-width: 0; }

/* ===================== HEADER ===================== */
.site-header {
    background-color: var(--navy);
    color: white;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: var(--shadow-lg);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-branding { display: flex; align-items: center; gap: 0.75rem; }

.site-title a {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'DM Serif Display', Georgia, serif;
}

.site-tagline { color: var(--gray-400); font-size: 0.8rem; }

.header-actions { display: flex; gap: 0.5rem; align-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
}

.btn-outline {
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    background: transparent;
}

.btn-outline:hover { background: rgba(255,255,255,0.1); color: white; }

.btn-red { background: var(--red); color: white; }
.btn-red:hover { background: var(--red-dark); color: white; }

/* ===================== NAV ===================== */
.main-nav { background: rgba(255,255,255,0.05); border-top: 1px solid rgba(255,255,255,0.08); }

.main-nav > ul {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav > ul::-webkit-scrollbar { display: none; }

.main-nav > ul > li > a {
    display: block;
    padding: 0.6rem 1rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a {
    color: white;
    border-bottom-color: var(--red);
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    border-radius: 4px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===================== TOP BANNER AD ===================== */
.top-banner-ad {
    background: var(--white);
    text-align: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

/* ===================== BREAKING NEWS TICKER ===================== */
.breaking-news {
    background: var(--red);
    color: white;
    padding: 0.5rem 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.breaking-label {
    background: var(--navy);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.breaking-ticker {
    flex: 1;
    overflow: hidden;
    padding: 0 1rem;
}

.ticker-inner {
    display: flex;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-inner:hover { animation-play-state: paused; }

.ticker-inner span {
    padding: 0 2rem;
    font-size: 0.875rem;
}

@keyframes ticker-scroll {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* ===================== CARDS ===================== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: box-shadow var(--transition), transform var(--transition);
    border: 1px solid var(--gray-200);
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.card-image { position: relative; overflow: hidden; }
.card-image img { width: 100%; height: 220px; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-image img { transform: scale(1.03); }

.card-image .category-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--red);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-content { padding: 1rem 1.25rem 1.25rem; }

.card-title { font-size: 1.15rem; margin-bottom: 0.5rem; line-height: 1.35; }
.card-title a:hover { color: var(--red); }

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 0.6rem;
}

.card-meta span { display: flex; align-items: center; gap: 0.25rem; }

.card-excerpt { font-size: 0.9rem; color: var(--gray-600); line-height: 1.6; }

/* Featured card (horizontal) */
.card-horizontal {
    display: grid;
    grid-template-columns: 280px 1fr;
}

.card-horizontal .card-image img { height: 100%; min-height: 180px; }

/* ===================== BADGES ===================== */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
}

.badge-salary { background: #dcfce7; color: #166534; }
.badge-location { background: #dbeafe; color: #1e40af; }
.badge-bride { background: #fce7f3; color: #9d174d; }
.badge-groom { background: #e0e7ff; color: #3730a3; }
.badge-category { background: var(--gray-100); color: var(--gray-600); }
.badge-new { background: #fef9c3; color: #854d0e; }

/* ===================== ARCHIVE HEADER ===================== */
.archive-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.archive-title {
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.archive-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.75rem;
    background: var(--red);
    border-radius: 2px;
}

/* ===================== SECTION HEADINGS ===================== */
.section-heading {
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-heading::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.4rem;
    background: var(--red);
    border-radius: 2px;
}

/* ===================== SIDEBAR ===================== */
.sidebar { position: sticky; top: 90px; align-self: start; }

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.sidebar-widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--red);
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-post-list { display: flex; flex-direction: column; gap: 0.75rem; }

.sidebar-post-item { display: flex; gap: 0.75rem; align-items: flex-start; }

.sidebar-post-item img { width: 70px; height: 55px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }

.sidebar-post-item .title { font-size: 0.85rem; font-weight: 500; line-height: 1.35; }
.sidebar-post-item .date { font-size: 0.75rem; color: var(--gray-600); margin-top: 0.2rem; }

/* ===================== IN-FEED AD ===================== */
.in-feed-ad {
    background: var(--gray-100);
    border: 1px dashed var(--gray-200);
    padding: 1rem;
    text-align: center;
    margin: 1.5rem 0;
    border-radius: var(--radius);
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* ===================== SINGLE POST ===================== */
.single-post-header { margin-bottom: 1.5rem; }

.post-categories { margin-bottom: 0.75rem; }

.post-title { font-size: 2rem; margin-bottom: 0.75rem; line-height: 1.2; }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.post-featured-image { margin-bottom: 1.5rem; border-radius: var(--radius); overflow: hidden; }
.post-featured-image img { width: 100%; max-height: 500px; object-fit: cover; }

.post-content { font-size: 1rem; line-height: 1.8; color: var(--gray-800); }
.post-content p { margin-bottom: 1.25rem; }
.post-content h2 { margin: 1.5rem 0 0.75rem; }
.post-content h3 { margin: 1.25rem 0 0.6rem; }
.post-content ul, .post-content ol { margin: 0 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content blockquote {
    border-left: 4px solid var(--red);
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
    background: var(--gray-100);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

/* Share bar */
.share-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin: 1.5rem 0;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    border: none;
    transition: opacity var(--transition);
}

.share-btn:hover { opacity: 0.85; color: white; }
.share-whatsapp { background: #25d366; }
.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-copy { background: var(--gray-600); }

/* ===================== JOBS SPECIAL STYLES ===================== */
.job-meta-box {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.job-meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.job-meta-label { font-size: 0.75rem; color: var(--gray-600); text-transform: uppercase; }
.job-meta-value { font-weight: 600; font-size: 0.9rem; }

.apply-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--red);
    color: white;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background var(--transition);
}

.apply-btn:hover { background: var(--red-dark); color: white; }

/* ===================== MATRIMONIAL SPECIAL STYLES ===================== */
.matrimonial-profile-card {
    background: linear-gradient(135deg, #fce7f3, #e0e7ff);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

/* ===================== VIDEO REELS ===================== */
.reels-container {
    height: calc(100vh - 60px);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    background: #000;
    -webkit-overflow-scrolling: touch;
}

.reel-item {
    scroll-snap-align: start;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

.reel-item iframe {
    width: 100%;
    max-width: 400px;
    height: 100%;
    border: none;
}

.reel-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

.reel-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }

/* ===================== MODALS ===================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-box {
    position: relative;
    width: 95%;
    max-width: 1000px;
    height: 85vh;
    background: var(--navy);
    border-radius: var(--radius);
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 1.75rem;
    color: white;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    background: rgba(0,0,0,0.5);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover { background: var(--red); }

.modal-box iframe { width: 100%; height: 100%; border: none; }

/* ===================== E-PAPER TEMPLATE ===================== */
.epaper-viewer { background: #333; padding: 1rem; border-radius: var(--radius); text-align: center; }
.epaper-viewer iframe { width: 100%; height: 80vh; border: none; border-radius: var(--radius); }

/* ===================== LIVE TV TEMPLATE ===================== */
.livetv-player { background: #000; border-radius: var(--radius); overflow: hidden; }
.livetv-player iframe { width: 100%; aspect-ratio: 16/9; border: none; }

/* ===================== FOOTER ===================== */
.site-footer {
    background: var(--navy);
    color: var(--gray-400);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 { color: white; font-size: 0.95rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }

.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { font-size: 0.875rem; color: var(--gray-400); }
.footer-col ul li a:hover { color: var(--red); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
}

/* ===================== MOBILE BOTTOM NAV ===================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.12);
    z-index: 600;
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
}

.bottom-nav-items a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.65rem;
    color: var(--gray-600);
    gap: 0.2rem;
    min-width: 60px;
    transition: color var(--transition);
}

.bottom-nav-items a:hover,
.bottom-nav-items a.active { color: var(--red); }

.bottom-nav-items a .icon { font-size: 1.25rem; line-height: 1; }

/* ===================== PAGINATION ===================== */
.pagination, .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--gray-200);
    font-size: 0.875rem;
    transition: all var(--transition);
}

.page-numbers:hover, .page-numbers.current {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

/* ===================== SEARCH ===================== */
.search-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-box input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
}

.search-box button {
    padding: 0.6rem 1.2rem;
    background: var(--red);
    color: white;
    border-radius: var(--radius);
    font-weight: 600;
}

/* ===================== MATRIMONIAL GRID ===================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .card-horizontal { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .main-nav.open { display: block; }
    .menu-toggle { display: flex; }
    .mobile-bottom-nav { display: block; }
    body { padding-bottom: 65px; }
    .post-title { font-size: 1.5rem; }
    .header-actions .btn-outline { display: none; }
    .site-title a { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .content-grid { padding: 1rem 0; }
    .card-image img { height: 180px; }
}

/* ===================== LOADING SKELETON ===================== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===================== UTILITIES ===================== */
.text-red { color: var(--red); }
.text-muted { color: var(--gray-600); }
.text-sm { font-size: 0.875rem; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
