/* ============================================
   PHP News CMS - Modern Theme Stylesheet
   ============================================ */

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --secondary: #1e293b;
    --secondary-light: #334155;
    --bg: #f8fafc;
    --white: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --radius: 10px;
    --transition: all 0.3s ease;
    --font-bn: var(--site-font, 'Hind Siliguri', sans-serif);
    --font-en: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-bn);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---- Top Bar ---- */
.top-bar {
    background: var(--secondary);
    color: #94a3b8;
    font-size: 13px;
    padding: 8px 0;
    font-family: var(--font-en);
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar .social-links a {
    color: #94a3b8;
    margin-left: 14px;
    font-size: 14px;
    transition: var(--transition);
}
.top-bar .social-links a:hover { color: var(--white); }

/* ---- Header ---- */
.main-header {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 3px solid var(--primary);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo a { display: flex; flex-direction: column; }
.site-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--secondary);
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.site-title span, .site-title::first-letter { color: var(--primary); }
.site-tagline { font-size: 13px; color: var(--text-light); font-weight: 400; }
.logo img { max-height: 60px; }

/* ---- Navigation ---- */
.main-nav {
    background: var(--secondary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}
.main-nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
}
.nav-menu li a {
    display: block;
    padding: 14px 18px;
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}
.nav-menu li a:hover, .nav-menu li a.active {
    background: var(--primary);
    color: var(--white);
}
.nav-menu li a i { margin-right: 4px; }

.mobile-toggle {
    display: none;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    border-radius: 6px;
    font-family: var(--font-bn);
}

.nav-search form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
}
.nav-search input {
    background: transparent;
    border: none;
    color: var(--white);
    padding: 8px 14px;
    font-size: 14px;
    width: 180px;
    font-family: var(--font-bn);
}
.nav-search input::placeholder { color: #94a3b8; }
.nav-search button {
    background: var(--primary);
    border: none;
    color: var(--white);
    padding: 8px 14px;
    cursor: pointer;
}

/* ---- Breaking News ---- */
.breaking-news {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    overflow: hidden;
}
.breaking-news .container { display: flex; align-items: center; gap: 16px; }
.breaking-label {
    background: var(--primary);
    color: var(--white);
    padding: 5px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.breaking-ticker { overflow: hidden; flex: 1; }
.ticker-wrap {
    display: flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}
.ticker-item {
    padding: 0 40px;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
}
.ticker-item:hover { color: var(--primary); }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ---- Content Layout ---- */
.site-content { padding: 30px 0; }
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
}
.main-content { min-width: 0; }

/* ---- Section Headers ---- */
.section { margin-bottom: 40px; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 10px;
}
.section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
}
.section-title span {
    background: var(--primary);
    color: var(--white);
    padding: 4px 16px;
    display: inline-block;
}
.view-all {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}
.view-all:hover { text-decoration: underline; }

/* ---- Hero Grid ---- */
.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 6px;
    min-height: 460px;
}
.hero-main .hero-card {
    display: block;
    position: relative;
    height: 100%;
    border-radius: var(--radius);
    overflow: hidden;
}
.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}
.hero-card:hover .hero-image { transform: scale(1.05); }
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: var(--white);
}
.hero-overlay h2 { font-size: 26px; font-weight: 800; line-height: 1.3; margin-top: 10px; }
.hero-overlay .post-meta { font-size: 13px; margin-top: 8px; opacity: 0.8; }

.hero-side {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 6px;
}
.hero-side-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
}
.hero-side-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}
.hero-side-card:hover .hero-side-image { transform: scale(1.05); }
.hero-side-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
}
.hero-side-overlay h3 { font-size: 16px; font-weight: 700; margin-top: 6px; }

/* ---- Category Badge ---- */
.cat-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cat-badge.small { font-size: 11px; padding: 2px 8px; }

/* ---- Post Grid ---- */
.post-grid { display: grid; gap: 24px; }
.grid-2-col { grid-template-columns: repeat(2, 1fr); }
.grid-3-col { grid-template-columns: repeat(3, 1fr); }
.grid-4-col { grid-template-columns: repeat(4, 1fr); }
.grid-full { grid-template-columns: 1fr; }

.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.post-card-image {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}
.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.post-card:hover .post-card-image img { transform: scale(1.08); }
.post-card-image .cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
}
.post-card-body { padding: 16px; }
.post-card-body h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-body h3 a:hover { color: var(--primary); }
.post-card-body p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
}
.post-meta i { margin-right: 4px; }

/* ---- Single Post ---- */
.breadcrumb {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
    padding: 12px 0;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

.single-post { background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.post-header { margin-bottom: 24px; }
.post-header h1 { font-size: 30px; font-weight: 900; line-height: 1.4; margin: 12px 0; color: var(--secondary); }
.post-meta-full {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--text-light);
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.post-meta-full i { margin-right: 6px; color: var(--primary); }

.post-featured-image {
    margin-bottom: 24px;
    border-radius: var(--radius);
    overflow: hidden;
}
.post-featured-image img { width: 100%; display: block; }

.post-content {
    font-size: 17px;
    line-height: 2;
    color: #334155;
}
.post-content p { margin-bottom: 18px; }
.post-content h2, .post-content h3 { margin: 24px 0 12px; color: var(--secondary); }
.post-content img { border-radius: var(--radius); margin: 16px 0; }
.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    margin: 20px 0;
    background: #fef2f2;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

/* ---- Share Buttons ---- */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-weight: 600;
}
.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 16px;
    transition: var(--transition);
}
.share-btn:hover { transform: translateY(-3px); }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.linkedin { background: #0077b5; }

/* ---- Sidebar ---- */
.sidebar {}
.widget {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}
.widget-title {
    font-size: 18px;
    font-weight: 800;
    padding: 14px 20px;
    border-bottom: 3px solid var(--primary);
    color: var(--secondary);
}
.widget-title span {
    background: var(--primary);
    color: var(--white);
    padding: 2px 12px;
    display: inline-block;
}

.widget-posts { list-style: none; }
.widget-posts li {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}
.widget-posts li:last-child { border-bottom: none; }
.widget-posts li a {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.widget-posts li a:hover { color: var(--primary); }
.widget-posts li small { display: block; color: var(--text-light); font-size: 12px; margin-top: 4px; }
.widget-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.post-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    font-family: var(--font-en);
}

.widget-categories { list-style: none; }
.widget-categories li a {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 500;
}
.widget-categories li:last-child a { border-bottom: none; }
.widget-categories li a:hover { background: #f1f5f9; color: var(--primary); }
.widget-categories .count {
    background: var(--border);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-family: var(--font-en);
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}
.pagination a {
    padding: 10px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-en);
    transition: var(--transition);
}
.pagination a:hover, .pagination a.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ---- Footer ---- */
.site-footer { margin-top: 40px; }
.footer-top {
    background: var(--secondary);
    color: #cbd5e1;
    padding: 50px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}
.footer-title {
    color: var(--white);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
}
.footer-about { font-size: 14px; line-height: 1.8; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); }

.footer-links { list-style: none; }
.footer-links li a {
    display: block;
    padding: 6px 0;
    color: #94a3b8;
    font-size: 14px;
    transition: var(--transition);
}
.footer-links li a:hover { color: var(--white); padding-left: 8px; }

.footer-recent { list-style: none; }
.footer-recent li { margin-bottom: 14px; }
.footer-recent li a { color: #94a3b8; font-size: 14px; line-height: 1.5; }
.footer-recent li a:hover { color: var(--white); }
.footer-recent li small { color: #64748b; font-size: 12px; display: block; margin-top: 2px; }

.footer-contact { list-style: none; }
.footer-contact li { padding: 8px 0; font-size: 14px; color: #94a3b8; }
.footer-contact li i { color: var(--primary); margin-right: 10px; width: 16px; }

.footer-bottom {
    background: #0f172a;
    padding: 16px 0;
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

/* ---- Related Posts ---- */
.related-posts { margin-top: 40px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .content-wrapper { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; min-height: auto; }
    .hero-side { grid-template-rows: auto; grid-template-columns: repeat(2, 1fr); }
    .grid-3-col, .grid-4-col { grid-template-columns: repeat(2, 1fr); }
    .nav-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--secondary); z-index: 999; }
    .nav-menu.active { display: flex; }
    .mobile-toggle { display: block; }
    .nav-search { display: none; }
    .top-bar { display: none; }
    .post-header h1 { font-size: 22px; }
    .single-post { padding: 20px; }
    .footer-grid { grid-template-columns: 1fr; }
    .post-meta-full { flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 480px) {
    .grid-2-col, .grid-3-col, .grid-4-col { grid-template-columns: 1fr; }
    .hero-side { grid-template-columns: 1fr; }
    .site-title { font-size: 24px; }
}

/* ---- Empty State ---- */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state i { font-size: 64px; color: var(--text-light); opacity: 0.3; margin-bottom: 20px; display: block; }
.empty-state h2 { color: var(--secondary); margin-bottom: 8px; }
.empty-state p { color: var(--text-light); margin-bottom: 24px; }
.btn-primary-link { display: inline-block; background: var(--primary); color: #fff; padding: 12px 28px; border-radius: 8px; font-weight: 700; transition: all 0.3s; }
.btn-primary-link:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ---- Pagination ---- */
.pagination { display: flex; justify-content: center; gap: 4px; padding: 30px 0; }
.pagination a { padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--text); font-weight: 600; transition: all 0.3s; }
.pagination a.active, .pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
