/* --- 1. Basic Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, sans-serif; }
body { background-color: #f0f2f5; padding-top: 80px; }

/* --- 2. Sticky Header --- */
.main-header { position: fixed; top: 0; width: 100%; height: 70px; background: #ffffff; display: flex; justify-content: space-between; align-items: center; padding: 0 5%; box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 1000; }
.logo a { font-size: 26px; font-weight: bold; color: #ff0000; text-decoration: none; letter-spacing: 1px; }
.header-right { display: flex; align-items: center; gap: 20px; }
/* --- Sub-menu Fix --- */
.has-dropdown { position: relative; }
/* हमने यहाँ !important और visibility का इस्तेमाल किया है ताकि यह पक्का छुप जाए */
.sub-menu { position: absolute; top: 100%; left: 0; background: #ffffff; list-style: none; display: none !important; min-width: 180px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-radius: 5px; padding: 10px 0; z-index: 1000; border-top: 3px solid #ff0000; }

/* --- Hover Logic --- */
/* माउस ले जाने पर !important के साथ display: block करेंगे */
.has-dropdown:hover .sub-menu { display: block !important; }

.sub-menu li { width: 100%; margin: 0 !important; }
.sub-menu li a { padding: 10px 20px; display: block; font-size: 15px; color: #333; transition: 0.2s; }
.sub-menu li a:hover { background: #fff0f0; color: #ff0000; }

/* --- 3. Desktop Navigation --- */
.nav-links ul { display: flex; list-style: none; }
.nav-links ul li { margin: 0 15px; }
.nav-links ul li a { text-decoration: none; color: #333; font-size: 17px; font-weight: 500; transition: 0.3s; }
.nav-links ul li a:hover { color: #ff0000; }

/* --- 4. Subscribe Button --- */
.sub-btn { background: #ff0000; color: #fff; padding: 10px 22px; border-radius: 30px; text-decoration: none; font-weight: bold; transition: 0.3s; display: inline-block; }
.sub-btn:hover { background: #cc0000; transform: scale(1.05); }

/* --- 5. Animated Hamburger Menu --- */
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 6px; z-index: 1100; }
.hamburger span { display: block; width: 28px; height: 3px; background-color: #333; border-radius: 10px; transition: 0.4s; }

/* --- 6. Hamburger X Animation --- */
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* --- 7. Mobile Responsive --- */
@media (max-width: 850px) {
    .hamburger { display: flex; }
    .nav-links { position: fixed; top: 0; right: -100%; width: 70%; height: 100vh; background: #fff; flex-direction: column; padding: 100px 40px; transition: 0.5s; box-shadow: -10px 0 20px rgba(0,0,0,0.1); }
    .nav-links.active { right: 0; }
    .nav-links ul { flex-direction: column; }
    .nav-links ul li { margin: 20px 0; }
    .container { flex-direction: column; }
    .sidebar { position: static; width: 100%; }
}
/* --- 3. LAYOUT --- */
.container { display: flex; max-width: 1240px; margin: 0 auto; gap: 25px; padding: 0 15px; }
.main-content { flex: 3; background: #ffffff; padding: 30px; border-radius: 15px; box-shadow: 0 5px 25px rgba(0,0,0,0.05); }

/* --- 4. POST GRID (Index Page Only) --- */
.section-title { font-size: 22px; font-weight: 700; margin-bottom: 25px; border-left: 5px solid #d90429; padding-left: 15px; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 25px; }
.post-card { background: #fff; border: 1px solid #eee; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: 0.3s; text-decoration: none; color: inherit; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.post-image { height: 180px; width: 100%; position: relative; overflow: hidden; }
.post-image img { width: 100%; height: 100%; object-fit: cover; }
.category-tag { position: absolute; top: 10px; left: 10px; background: #d90429; color: #fff; padding: 4px 10px; font-size: 11px; font-weight: 700; border-radius: 4px; text-transform: uppercase; }
.post-info { padding: 18px; flex-grow: 1; display: flex; flex-direction: column; }
.post-info h2 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: #000; line-height: 1.4; }
.post-info p { font-size: 14px; color: #555; margin-bottom: 15px; line-height: 1.5; }
.read-more-btn { color: #d90429; font-weight: 700; font-size: 13px; border: 1.5px solid #d90429; padding: 6px 15px; border-radius: 5px; align-self: flex-start; transition: 0.3s; }
.post-card:hover .read-more-btn { background: #d90429; color: #fff; }

/* --- 5. POST PAGE STYLES (Post.php specific) --- */
.post-title { font-size: 30px; font-weight: 800; margin-bottom: 20px; line-height: 1.3; }
.post-img-full { width: 48%; float: right; margin-left: 20px; margin-bottom: 15px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.post-summary { font-size: 18px; font-weight: 700; color: #333; line-height: 1.6; margin-bottom: 15px; }
.post-body { clear: both; font-size: 18px; line-height: 1.8; color: #222; }
.breadcrumbs { font-size: 13px; color: #666; margin-bottom: 15px; font-weight: 600; }
.breadcrumbs a { text-decoration: none; color: #d90429; }

/* --- 6. SIDEBAR --- */
.sidebar { flex: 1; }
.sidebar-sticky { position: sticky; top: 100px; }
.sidebar-card { background: #fff; padding: 22px; border-radius: 12px; margin-bottom: 25px; border: 1px solid #eee; }
.sidebar-card h3 { font-size: 18px; font-weight: 700; color: #d90429; border-bottom: 2px solid #f0f0f0; padding-bottom: 8px; margin-bottom: 15px; }
.sidebar-link { display: block; text-decoration: none; color: #333; font-size: 14px; font-weight: 600; margin-bottom: 12px; padding: 10px; background: #f9f9f9; border-radius: 6px; transition: 0.2s; }
.sidebar-link:hover { color: #d90429; background: #fff1f1; }

/* --- 7. FOOTER --- */
.main-footer { background: #001d3d; color: #fff; padding: 50px 0 20px; margin-top: 60px; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 0 20px; }
.footer-col h4 { color: #00d2ff; margin-bottom: 20px; font-size: 18px; font-weight: 700; }
.footer-col p, .footer-col a { color: #adb5bd; text-decoration: none; font-size: 14px; margin-bottom: 10px; display: block; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 30px; font-size: 13px; color: #6c757d; }

/* AJAX Button */
#load-more-btn { display: block; width: 200px; margin: 40px auto; padding: 12px; background: #001d3d; color: #fff; border: none; border-radius: 30px; font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.3s; }
#load-more-btn:hover { background: #d90429; }
