/*
Theme Name: My Custom News Blog
Description: Professional, Responsive News Theme with AdSense Ready Slots.
Author: Aap ka Naam
Version: 5.2
*/

:root {
    --primary-color: #e63946;
    --logo-blue: #00AEEF;
    --dark-bg: #1d3557;
    --light-blue-bg: #e0f2fe;
    --topbar-bg: #bae6fd;
    --nav-text: #0f172a;
    --text-dark: #222222;
    --text-light: #666666;
    --light-bg: #f8f9fa;
    --border-color: #eaeaea;
    --font-main: 'Figtree', Helvetica, Arial, sans-serif;
}

/* ===== RESET ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); line-height: 1.6; color: var(--text-dark); background: var(--light-bg); }
a { text-decoration: none; color: var(--text-dark); transition: all 0.3s ease; }
a:hover { color: var(--primary-color); }
img { max-width: 100%; height: auto; display: block; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.main-container { display: flex; gap: 30px; margin-top: 30px; margin-bottom: 50px; }
.main-content { flex: 3; min-width: 0; }
.sidebar { flex: 1; }

/* ===== TOP BAR ===== */
.top-bar { background: var(--topbar-bg); color: var(--nav-text); font-size: 13px; padding: 8px 0; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: var(--nav-text); font-weight: 500; }
.top-bar a:hover { color: var(--primary-color); }

/* ===== MAIN HEADER ===== */
.main-header { background: var(--light-blue-bg); padding: 25px 0; text-align: center; }

/* ===== SITE TITLE (LOGO STYLE) ===== */
.main-header h1 a {
    font-family: 'Figtree', Helvetica, Arial, sans-serif;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: #000000;
    display: inline-block;
    line-height: 1.1;
    text-decoration: none;
}

/* "On" — Pure BLACK */
.main-header h1 a .on {
    color: #000000;
    font-family: 'Figtree', Helvetica, Arial, sans-serif;
    font-weight: 800;
}

/* "Clouder" — Light BLUE */
.main-header h1 a .clouder {
    color: #00AEEF;
    font-family: 'Figtree', Helvetica, Arial, sans-serif;
    font-weight: 800;
}

/* ===== MAIN NAVIGATION ===== */
.main-nav { background: var(--light-blue-bg); border-bottom: 3px solid var(--primary-color); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.main-nav .container { display: flex; justify-content: center; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; }
nav ul li { position: relative; }
nav a { display: block; padding: 15px 20px; font-weight: 600; font-size: 14px; color: var(--nav-text); text-transform: uppercase; border-right: 1px solid rgba(0,0,0,0.05); }
nav li:first-child a { border-left: 1px solid rgba(0,0,0,0.05); }
nav a:hover { background: var(--primary-color); color: #fff; }

/* ===== DROPDOWN ===== */
nav ul .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #ffffff; min-width: 220px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 1000; flex-direction: column; padding: 10px 0; border-radius: 0 0 6px 6px; border: 1px solid var(--border-color); }
nav ul li:hover .sub-menu { display: block; }
nav ul .sub-menu li { width: 100%; border: none; }
nav ul .sub-menu a { color: var(--text-dark) !important; padding: 10px 20px; border: none !important; text-transform: none; font-weight: 500; font-size: 14px; text-align: left; }
nav ul .sub-menu a:hover { background: var(--primary-color); color: #fff !important; }

/* ===== AD SECTIONS ===== */
.ad-section { background: #fff; padding: 15px 0; text-align: center; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.ad-section-bottom { border-top: 1px solid var(--border-color); border-bottom: none; margin-top: 30px; margin-bottom: 0; padding: 20px 0; }
.ad-container { display: flex; justify-content: center; align-items: center; overflow: hidden; min-height: 90px; }
.in-feed-ad { grid-column: 1 / -1; text-align: center; margin: 20px 0; padding: 15px; background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.in-article-ad { margin: 25px 0; padding: 15px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); text-align: center; background: #fafafa; }
.ad-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; display: block; }

/* ===== POSTS GRID ===== */
.section-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 3px solid var(--primary-color); display: inline-block; text-transform: uppercase; color: var(--dark-bg); }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.article-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s ease; display: flex; flex-direction: column; }
.article-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.main-story { grid-column: span 2; }
.main-story .card-image img { height: 380px; object-fit: cover; }
.main-story .card-content h3 { font-size: 28px; }
.article-card .card-image img { height: 220px; object-fit: cover; }
.card-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-content h3 { font-size: 19px; margin-bottom: 10px; line-height: 1.4; }
.card-content h3 a { color: var(--dark-bg); }
.card-content p { font-size: 15px; color: var(--text-light); margin-bottom: 15px; flex-grow: 1; }
.post-meta { font-size: 12px; color: #888; text-transform: uppercase; margin-bottom: 10px; font-weight: 500; }
.post-meta .category { color: var(--primary-color); font-weight: 700; margin-right: 10px; }

/* ===== SIDEBAR ===== */
.sidebar .widget { background: #fff; padding: 20px; margin-bottom: 25px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.sidebar .widget h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--border-color); color: var(--dark-bg); }
.recent-posts-list { display: flex; flex-direction: column; gap: 15px; }
.sidebar-post-item { display: flex; gap: 12px; align-items: center; border-bottom: 1px dashed var(--border-color); padding-bottom: 15px; }
.sidebar-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-thumb img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.sidebar-post-info h4 { font-size: 14px; font-weight: 600; line-height: 1.3; margin-bottom: 5px; color: var(--dark-bg); }
.sidebar-post-info h4:hover { color: var(--primary-color); }
.sidebar-date { font-size: 11px; color: #888; text-transform: uppercase; }

/* ===== SINGLE POST ===== */
.single-post h1 { font-size: 38px; line-height: 1.2; margin-bottom: 15px; color: var(--dark-bg); }
.single-post .post-content { font-size: 18px; line-height: 1.8; color: #333; }
.single-post .post-content p { margin-bottom: 25px; }

/* ===== FOOTER ===== */
footer { text-align: center; padding: 40px 20px; background: var(--dark-bg); color: #aaa; }

/* ===== PAGINATION ===== */
.pagination { margin-top: 40px; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: 8px 15px; margin: 0 5px; background: #fff; border: 1px solid var(--border-color); border-radius: 4px; font-weight: 600; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .main-container { flex-direction: column; }
    .sidebar { width: 100%; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .main-story { grid-column: span 2; }
    .main-story .card-image img { height: 300px; }
}
@media (max-width: 768px) {
    .top-bar .container { flex-direction: column; text-align: center; gap: 5px; }
    .main-header h1 a { font-size: 30px; letter-spacing: -1px; }
    .main-nav .container { justify-content: flex-start; overflow-x: auto; }
    nav ul { flex-wrap: nowrap; }
    nav a { padding: 12px 15px; font-size: 12px; white-space: nowrap; }
    nav ul .sub-menu { position: static; box-shadow: none; border: none; width: 100%; padding: 0; background: rgba(0,0,0,0.05); }
    nav ul li:hover .sub-menu { display: block; }
    .posts-grid { grid-template-columns: 1fr; }
    .main-story { grid-column: span 1; }
    .main-story .card-image img { height: 250px; }
    .single-post h1 { font-size: 28px; }
    .single-post .post-content { font-size: 16px; }
}

/* ===== FIGTREE LOCAL FONTS ===== */
@font-face {
    font-family: 'Figtree';
    src: url('fonts/Figtree-VariableFont_wght.woff2') format('woff2-variations'),
         url('fonts/Figtree-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Figtree';
    src: url('fonts/Figtree-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 300 900;
    font-style: italic;
    font-display: swap;
}