/*
Theme Name: Palmedia News
Theme URI: https://palmedianews.com
Description: Custom news theme for Palmedia News
Version: 1.0
Author: N.O.V.A.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

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

:root {
  --red: #CC1122;
  --accent: #CC1122;
  --navy: #0D1B48;
  --dark: #0D1B48;
  --mid: #444444;
  --light: #888888;
  --border: #e5e5e5;
  --bg: #f5f5f5;
  --white: #ffffff;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

body { font-family: var(--font-sans); background: var(--white); color: #1a1a2e; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── TOP BAR ── */
.pm-topbar {
  background: #0a1030;
  color: #aaa;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #1c2e6a;
}
.pm-topbar .inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.pm-topbar .date { font-size: 11px; letter-spacing: .5px; }
.pm-topbar .breaking { display: flex; align-items: center; gap: 10px; font-size: 11px; overflow: hidden; max-width: 60%; }
.pm-topbar .breaking-label { background: var(--accent); color: #fff; padding: 2px 8px; font-weight: 700; font-size: 10px; letter-spacing: 1px; white-space: nowrap; }
.pm-topbar .breaking-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── HEADER ── */
.pm-header {
  background: var(--navy);
  border-bottom: 3px solid var(--accent);
  position: sticky; top: 0; z-index: 100;
}
.pm-header .inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 30px; height: 64px; }
.pm-logo { font-family: var(--font-serif); font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.5px; white-space: nowrap; }
.pm-logo .pm-letters { color: var(--accent); }
.pm-logo .pm-pipe { color: rgba(255,255,255,.4); margin: 0 6px; }
.pm-nav { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.pm-nav::-webkit-scrollbar { display: none; }
.pm-nav a { padding: 6px 12px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.75); white-space: nowrap; border-radius: 4px; transition: color .15s; }
.pm-nav a:hover, .pm-nav a.active { color: var(--accent); }
.pm-nav a.active { border-bottom: 2px solid var(--accent); border-radius: 0; }
.pm-header-actions { display: flex; align-items: center; gap: 10px; }
.btn-subscribe { background: var(--accent); color: #fff; padding: 8px 18px; font-size: 13px; font-weight: 700; border: none; cursor: pointer; border-radius: 3px; white-space: nowrap; }
.btn-subscribe:hover { background: #a50e1c; }

/* ── MAIN WRAPPER ── */
.pm-main { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ── HERO ── */
.pm-hero { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding: 24px 0 0; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
.hero-featured { position: relative; overflow: hidden; border-radius: 4px; min-height: 420px; background: var(--navy); }
.hero-featured-img { width: 100%; height: 100%; object-fit: cover; opacity: .85; position: absolute; inset: 0; }
.hero-featured-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(13,27,72,.9) 0%, rgba(13,27,72,.35) 50%, rgba(0,0,0,.1) 100%); }
.hero-featured-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px; color: #fff; }
.hero-cat-badge { display: inline-block; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; margin-bottom: 12px; border-radius: 2px; }
.hero-featured-content h1 { font-family: var(--font-serif); font-size: clamp(22px, 2.5vw, 32px); font-weight: 800; line-height: 1.2; margin-bottom: 10px; }
.hero-featured-content h1 a { color: #fff; }
.hero-featured-content h1 a:hover { text-decoration: underline; }
.hero-excerpt { font-size: 14px; color: rgba(255,255,255,.85); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { font-size: 12px; color: rgba(255,255,255,.7); }
.hero-meta .author { font-weight: 600; color: rgba(255,255,255,.9); }

/* Hero: no featured image fallback */
.hero-featured.no-img { background: var(--navy); }

/* ── TOP STORIES ── */
.top-stories { display: flex; flex-direction: column; gap: 0; }
.top-stories h3 { font-size: 13px; font-weight: 700; color: var(--light); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.top-story-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.top-story-item:last-child { border-bottom: none; }
.top-story-thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.top-story-thumb-placeholder { width: 80px; height: 60px; background: #e8ecf7; border-radius: 3px; flex-shrink: 0; }
.top-story-info { flex: 1; min-width: 0; }
.top-story-info .cat { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .8px; display: block; margin-bottom: 4px; }
.top-story-info h4 { font-size: 13px; font-weight: 700; line-height: 1.35; color: #1a1a2e; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-story-info h4 a:hover { color: var(--accent); }
.top-story-info .time { font-size: 11px; color: var(--light); margin-top: 4px; }

/* ── SECTION HEADER ── */
.section-header { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--accent); padding-bottom: 8px; margin: 28px 0 16px; }
.section-header h2 { font-size: 17px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--navy); }
.section-header .view-all { font-size: 12px; color: var(--accent); font-weight: 600; }
.section-header .view-all:hover { text-decoration: underline; }

/* ── SLIDER ── */
.slider-wrapper { position: relative; overflow: hidden; }
.slider-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-card { flex: 0 0 240px; scroll-snap-align: start; }
.slider-card-img { width: 100%; height: 150px; object-fit: cover; border-radius: 4px; margin-bottom: 10px; }
.slider-card-img-placeholder { width: 100%; height: 150px; background: #e8ecf7; border-radius: 4px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #aaa; }
.slider-card .cat { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .8px; display: block; margin-bottom: 4px; }
.slider-card h3 { font-size: 14px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #1a1a2e; }
.slider-card h3 a:hover { color: var(--accent); }
.slider-card .time { font-size: 11px; color: var(--light); margin-top: 4px; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: var(--navy); color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; z-index: 2; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(13,27,72,.3); }
.slider-btn.prev { left: -8px; }
.slider-btn.next { right: -8px; }
.slider-btn:hover { background: var(--accent); }

/* ── EXPLORE GRID ── */
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.explore-tile { position: relative; overflow: hidden; border-radius: 6px; height: 120px; background: var(--navy); display: block; }
.explore-tile img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.explore-tile-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #0D1B48, #1a3a8f); }
.explore-tile-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: #fff; font-weight: 700; font-size: 14px; }
.explore-tile-overlay .arrow { opacity: .7; transition: opacity .15s; }
.explore-tile:hover .explore-tile-overlay .arrow { opacity: 1; }
.explore-tile:hover img { opacity: .65; }

/* ── BOTTOM ROW ── */
.pm-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 32px 0 48px; border-top: 1px solid var(--border); margin-top: 32px; }

/* Newsletter */
.newsletter-box { background: linear-gradient(135deg, #0D1B48, #1a3a8f); color: #fff; padding: 32px; border-radius: 8px; }
.newsletter-box h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.newsletter-box p { font-size: 14px; opacity: .85; margin-bottom: 20px; line-height: 1.55; }
.newsletter-form { display: flex; gap: 0; }
.newsletter-form input { flex: 1; padding: 10px 14px; border: none; border-radius: 3px 0 0 3px; font-size: 14px; }
.newsletter-form input:focus { outline: none; }
.newsletter-form button { background: var(--accent); color: #fff; border: none; padding: 10px 18px; font-weight: 700; font-size: 13px; border-radius: 0 3px 3px 0; cursor: pointer; white-space: nowrap; }
.newsletter-form button:hover { background: #a50e1c; }
.newsletter-success { color: #7fffd4; font-size: 13px; margin-top: 10px; font-weight: 600; }

/* Opinion / Featured */
.opinion-box { padding: 4px 0; }
.opinion-box h3 { font-size: 17px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--navy); border-bottom: 2px solid var(--accent); padding-bottom: 8px; margin-bottom: 16px; }
.opinion-item { display: flex; gap: 14px; }
.opinion-thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.opinion-thumb-placeholder { width: 120px; height: 90px; background: #e8ecf7; border-radius: 4px; flex-shrink: 0; }
.opinion-info .author-name { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 6px; }
.opinion-info h4 { font-size: 15px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; color: #1a1a2e; }
.opinion-info h4 a:hover { color: var(--accent); }
.opinion-info .excerpt { font-size: 13px; color: var(--mid); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── FOOTER ── */
.pm-footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 40px 0 24px; }
.pm-footer .inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.footer-logo { font-family: var(--font-serif); font-size: 22px; font-weight: 800; color: #fff; }
.footer-logo .pm-letters { color: var(--accent); }
.footer-logo .pm-pipe { color: rgba(255,255,255,.3); margin: 0 6px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: flex-end; }
.footer-nav a { font-size: 13px; color: rgba(255,255,255,.65); transition: color .15s; }
.footer-nav a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.footer-bottom .links { display: flex; gap: 16px; }
.footer-bottom .links a { color: rgba(255,255,255,.55); }
.footer-bottom .links a:hover { color: var(--accent); }
.footer-tagline { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: .5px; margin-top: 2px; font-style: italic; }

/* ── EMPTY / SINGLE / ARCHIVE ── */
.pm-single { max-width: 780px; margin: 32px auto; padding: 0 20px; }
.pm-single .article-header { margin-bottom: 24px; }
.pm-single .article-cat { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px; }
.pm-single h1.article-title { font-family: var(--font-serif); font-size: clamp(24px, 3.5vw, 38px); font-weight: 800; line-height: 1.2; color: #1a1a2e; margin-bottom: 16px; }
.pm-single .article-meta { font-size: 13px; color: var(--light); margin-bottom: 20px; }
.pm-single .article-featured-img { width: 100%; height: auto; border-radius: 6px; margin-bottom: 28px; }
.pm-single .article-content { font-size: 17px; line-height: 1.75; color: #2c2c3a; }
.pm-single .article-content p { margin-bottom: 22px; }
.pm-single .article-content h2 { font-family: var(--font-serif); font-size: 24px; font-weight: 700; margin: 32px 0 16px; color: var(--navy); }
.pm-single .article-content h3 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; color: var(--navy); }
.pm-single .article-content blockquote { border-left: 4px solid var(--accent); padding: 12px 20px; margin: 24px 0; color: var(--mid); font-style: italic; }

.empty-state { text-align: center; padding: 80px 20px; color: var(--light); }
.empty-state strong { display: block; font-size: 18px; margin-bottom: 8px; color: var(--navy); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .pm-hero { grid-template-columns: 1fr; }
  .top-stories { display: none; }
  .pm-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pm-header .inner { height: 56px; gap: 16px; }
  .pm-logo { font-size: 20px; }
  .pm-nav a { padding: 6px 8px; font-size: 12px; }
  .explore-grid { grid-template-columns: 1fr 1fr; }
}
