/* ==========================================================
   Calling Pakistan — News Theme Styles
   ========================================================== */

:root {
	--cp-red: #ED1C24;
	--cp-red-dark: #A31217;
	--cp-green: #00A651;
	--cp-green-dark: #046A38;
	--ink: #1a1a1a;
	--ink-soft: #5a5a5a;
	--bg: #ffffff;
	--bg-alt: #f7f7f7;
	--border: #e5e5e5;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-family: 'Segoe UI', Arial, sans-serif; }

.cp-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.cp-topbar { background: var(--cp-green-dark); color: #fff; font-size: 12px; }
.cp-topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 6px 20px; }
.cp-social-icons { display: flex; gap: 12px; }
.cp-social-icons a { color: #fff; font-weight: 600; opacity: .9; }
.cp-social-icons a:hover { opacity: 1; color: var(--cp-red); }

/* ---------- Header ---------- */
.cp-header { border-bottom: 3px solid var(--cp-red); background: #fff; }
.cp-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 20px; }
.cp-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cp-logo-img { height: 48px; width: auto; }
.cp-logo-text { font-size: 20px; font-weight: 800; color: var(--cp-green-dark); letter-spacing: .5px; }
.cp-logo-text span { color: var(--cp-red); }

.cp-menu { display: flex; list-style: none; gap: 24px; margin: 0; padding: 0; }
.cp-menu a { font-weight: 600; font-size: 14px; color: var(--ink); }
.cp-menu a:hover { color: var(--cp-red); }

.cp-search-form { display: flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.cp-search-form input { border: none; padding: 8px 10px; font-size: 13px; outline: none; width: 160px; }
.cp-search-form button { border: none; background: var(--cp-red); color: #fff; padding: 0 12px; cursor: pointer; }

/* ---------- Breaking News Ticker ---------- */
.cp-ticker { display: flex; align-items: center; background: var(--ink); overflow: hidden; }
.cp-ticker-label { background: var(--cp-red); color: #fff; font-weight: 700; font-size: 13px; padding: 8px 16px; flex-shrink: 0; text-transform: uppercase; }
.cp-ticker-track { flex: 1; overflow: hidden; position: relative; }
.cp-ticker-items { display: flex; gap: 50px; white-space: nowrap; animation: cp-ticker-scroll 30s linear infinite; padding: 8px 0; }
.cp-ticker-items a { color: #fff; font-size: 13px; }
@keyframes cp-ticker-scroll { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* ---------- Hero ---------- */
.cp-hero { width: 100%; line-height: 0; }
.cp-hero img { width: 100%; height: auto; }

/* ---------- Layout ---------- */
.cp-main-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding: 32px 20px; align-items: start; }
.cp-section { margin-top: 40px; }
.cp-section-title { font-size: 22px; font-weight: 800; color: var(--cp-green-dark); border-left: 5px solid var(--cp-red); padding-left: 12px; margin-bottom: 20px; }

/* ---------- Featured story ---------- */
.cp-featured-story { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; background: var(--bg-alt); border-radius: 8px; overflow: hidden; }
.cp-featured-image { position: relative; }
.cp-featured-body { padding: 20px 24px 20px 0; }
.cp-featured-body h2 { font-size: 26px; margin: 8px 0 12px; }
.cp-featured-body h2 a:hover { color: var(--cp-red); }
.cp-featured-body p { color: var(--ink-soft); font-size: 15px; }

.cp-cat-badge { position: absolute; top: 10px; left: 10px; background: var(--cp-red); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 3px; text-transform: uppercase; }
.cp-single-article .cp-cat-badge { position: static; display: inline-block; margin-bottom: 12px; }
.cp-post-date { font-size: 12px; color: var(--cp-green-dark); font-weight: 700; text-transform: uppercase; }

/* ---------- News grid / cards ---------- */
.cp-news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.cp-news-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; transition: box-shadow .2s; }
.cp-news-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.cp-card-image { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.cp-card-image img { width: 100%; height: 100%; object-fit: cover; }
.cp-card-body { padding: 14px 16px; }
.cp-card-body h3 { font-size: 16px; margin: 6px 0 0; line-height: 1.4; }
.cp-card-body h3 a:hover { color: var(--cp-red); }

/* ---------- Video grid ---------- */
.cp-video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.cp-video-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.cp-play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(237,28,36,.9); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.cp-video-embed { position: relative; width: 100%; aspect-ratio: 16/9; margin: 16px 0; }
.cp-video-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Single article ---------- */
.cp-single-article h1 { font-size: 30px; margin-bottom: 12px; line-height: 1.3; }
.cp-article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.cp-single-thumb { margin-bottom: 20px; border-radius: 8px; overflow: hidden; }
.cp-article-content { font-size: 16px; color: var(--ink); }
.cp-article-content p { margin-bottom: 16px; }
.cp-share-row { display: flex; align-items: center; gap: 12px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; }
.cp-share-row a { font-weight: 700; color: var(--cp-green-dark); }
.cp-share-row a:hover { color: var(--cp-red); }

.cp-archive-title { font-size: 24px; font-weight: 800; color: var(--cp-green-dark); margin-bottom: 24px; border-left: 5px solid var(--cp-red); padding-left: 12px; }
.cp-pagination { margin-top: 30px; display: flex; gap: 8px; }
.cp-pagination a, .cp-pagination span { padding: 8px 14px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; }
.cp-pagination .current { background: var(--cp-red); color: #fff; border-color: var(--cp-red); }

/* ---------- Sidebar ---------- */
.cp-sidebar { display: flex; flex-direction: column; gap: 24px; }
.cp-widget { background: var(--bg-alt); border-radius: 8px; padding: 18px; }
.cp-widget-title { font-size: 16px; font-weight: 800; color: var(--cp-green-dark); margin-bottom: 14px; border-bottom: 2px solid var(--cp-red); padding-bottom: 8px; }

/* WordPress built-in calendar table styling */
.cp-calendar-widget table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cp-calendar-widget caption { font-weight: 700; color: var(--cp-green-dark); padding-bottom: 10px; text-align: center; }
.cp-calendar-widget th { background: var(--cp-green-dark); color: #fff; padding: 6px 4px; font-size: 11px; }
.cp-calendar-widget td { text-align: center; padding: 6px 4px; border: 1px solid var(--border); }
.cp-calendar-widget td#today { background: var(--cp-red); color: #fff; font-weight: 700; border-radius: 3px; }
.cp-calendar-widget td a { color: var(--cp-green-dark); font-weight: 700; }
.cp-calendar-widget td a:hover { color: var(--cp-red); }
.cp-calendar-widget nav { display: flex; justify-content: space-between; font-size: 12px; margin-top: 8px; }
.cp-calendar-widget nav a { color: var(--cp-green-dark); font-weight: 600; }

.cp-cat-list { list-style: none; margin: 0; padding: 0; }
.cp-cat-list li { border-bottom: 1px solid var(--border); padding: 8px 0; font-size: 14px; }
.cp-cat-list li a { display: flex; justify-content: space-between; }
.cp-cat-list li a:hover { color: var(--cp-red); }

.cp-recent-list { list-style: none; margin: 0; padding: 0; }
.cp-recent-list li { border-bottom: 1px solid var(--border); padding: 10px 0; }
.cp-recent-list li a { font-size: 14px; font-weight: 600; display: block; }
.cp-recent-list li a:hover { color: var(--cp-red); }
.cp-recent-date { font-size: 12px; color: var(--ink-soft); }

.cp-admin-hint { text-align: center; font-size: 12px; color: #999; padding: 20px 0; }

/* ---------- Footer ---------- */
.cp-footer { background: var(--ink); color: rgba(255,255,255,.8); margin-top: 40px; }
.cp-footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; padding: 40px 20px; }
.cp-footer .cp-logo-text { color: #fff; }
.cp-footer h4 { color: #fff; margin-bottom: 12px; }
.cp-footer-menu { list-style: none; padding: 0; margin: 0; }
.cp-footer-menu li { margin-bottom: 8px; }
.cp-footer-menu a:hover { color: var(--cp-red); }
.cp-footer-bottom { background: var(--cp-green-dark); }
.cp-footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; font-size: 13px; color: #fff; flex-wrap: wrap; gap: 10px; }
.cp-footer-bottom .cp-social-icons a { color: #fff; margin-right: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.cp-main-layout { grid-template-columns: 1fr; }
	.cp-header-inner { flex-wrap: wrap; }
	.cp-menu { flex-wrap: wrap; gap: 14px; }
	.cp-featured-story { grid-template-columns: 1fr; }
	.cp-search-form { display: none; }
}
