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

/* ---- Pentapostagma replica design tokens ---- */
:root {
  --brand: #342BA5;      /* indigo nav / accents */
  --brand-dark: #241d78;
  --navy: #091C55;       /* text + headings */
  --bg: #F9FAFF;         /* page background */
  --white: #ffffff;
  --line: #e6e8f2;
  --muted: #6a739b;
  --maxw: 1200px;
  --font: 'Roboto', -apple-system, Segoe UI, sans-serif;
  --font-head: 'Roboto Slab', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--navy);
  background: var(--bg);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---- Top notice strip ---- */
.top-strip {
  background: var(--navy); color: #cdd3ee; font-size: 12px;
  text-align: center; padding: 6px 12px; letter-spacing: .2px;
}

/* ---- Header ---- */
.site-header {
  background: var(--white); border-bottom: 3px solid var(--brand);
  position: sticky; top: 0; z-index: 40;
}
.site-header__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 16px;
  display: grid; grid-template-columns: 140px 1fr 220px; align-items: center; gap: 12px;
}
.drawer-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: #fff; border: 0; cursor: pointer;
  font: 600 13px/1 var(--font); letter-spacing: 1px; padding: 12px 14px; border-radius: 4px;
}
.drawer-toggle:hover { background: var(--brand-dark); }
.drawer-toggle .burger, .drawer-toggle .burger::before, .drawer-toggle .burger::after {
  display: block; width: 18px; height: 2px; background: #fff; position: relative;
}
.drawer-toggle .burger::before, .drawer-toggle .burger::after { content: ''; position: absolute; left: 0; }
.drawer-toggle .burger::before { top: -6px; } .drawer-toggle .burger::after { top: 6px; }

.branding { text-align: center; }
.branding a { display: inline-flex; flex-direction: column; align-items: center; color: var(--navy); text-decoration: none; }
.branding .logo-word { font-family: var(--font-head); font-weight: 800; font-size: 30px; letter-spacing: 3px; line-height: 1; }
.branding .logo-sub { font-size: 11px; letter-spacing: 6px; color: var(--brand); margin-top: 3px; }
.branding img { max-height: 46px; width: auto; }

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.roi-btn {
  background: var(--brand); color: #fff !important; font-weight: 700; font-size: 13px;
  padding: 8px 16px; border-radius: 4px; letter-spacing: 1px;
}
.roi-btn:hover { background: var(--brand-dark); text-decoration: none; }
.lang { font-size: 12px; color: var(--muted); font-weight: 500; }
.lang b { color: var(--navy); }
.social { display: inline-flex; gap: 8px; }
.social a { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.social a:hover { background: var(--brand); text-decoration: none; }

/* ---- Off-canvas drawer ---- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(9,28,85,.5); opacity: 0; visibility: hidden;
  transition: opacity .25s; z-index: 50;
}
.drawer-overlay.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; left: 0; height: 100%; width: 330px; max-width: 85vw;
  background: var(--white); z-index: 60; transform: translateX(-100%);
  transition: transform .28s ease; overflow-y: auto; box-shadow: 2px 0 24px rgba(9,28,85,.25);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head { background: var(--brand); color: #fff; padding: 16px; display: flex; align-items: center; justify-content: space-between; }
.drawer__head .t { font-family: var(--font-head); font-weight: 700; letter-spacing: 2px; }
.drawer-close { background: transparent; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.drawer nav ul { list-style: none; margin: 0; padding: 0; }
.drawer nav > ul > li > a { display: block; padding: 12px 16px; color: var(--navy); font-weight: 600; border-bottom: 1px solid var(--line); }
.drawer nav > ul > li > a:hover { background: var(--bg); text-decoration: none; color: var(--brand); }
.drawer nav ul ul { background: var(--bg); }
.drawer nav ul ul a { display: block; padding: 8px 16px 8px 28px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.drawer nav ul ul a:hover { color: var(--brand); text-decoration: none; }

/* ---- Layout ---- */
.page { min-height: 60vh; }
.page__content { max-width: var(--maxw); margin: 24px auto; padding: 0 16px; }

/* ---- Article ---- */
.node--type-article { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 24px; max-width: 820px; margin: 0 auto; }
.node--type-article .cat-label {
  display: inline-block; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: .5px; padding: 4px 10px; border-radius: 3px; text-transform: uppercase; margin-bottom: 12px;
}
.node--type-article h1 { font-size: 34px; font-weight: 800; margin-bottom: 12px; }
.node--type-article .meta { color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; display: flex; gap: 14px; flex-wrap: wrap; }
.node--type-article .meta .author { color: var(--brand); font-weight: 600; }
.node--type-article .hero-img { margin: 0 0 20px; border-radius: 6px; overflow: hidden; }
.node--type-article .body { font-size: 17px; line-height: 1.7; }
.node--type-article .body p { margin: 0 0 1.1em; }
.node--type-article .body h2 { font-size: 24px; margin-top: 1.2em; }

/* ---- Footer ---- */
.site-footer { background: var(--navy); color: #cdd3ee; margin-top: 48px; }
.site-footer a { color: #cdd3ee; }
.site-footer a:hover { color: #fff; }
.site-footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 32px 16px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer .brand { font-family: var(--font-head); font-weight: 800; letter-spacing: 3px; color: #fff; font-size: 22px; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; font-size: 12px; padding: 14px; color: #9aa3cf; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .site-header__inner { grid-template-columns: auto 1fr auto; }
  .branding .logo-word { font-size: 22px; letter-spacing: 2px; }
  .header-actions .lang, .header-actions .social { display: none; }
  .node--type-article h1 { font-size: 26px; }
}

/* Hide the standalone page-title block on article full pages (node template renders it). */
.page-node-type-article .block-page-title-block { display: none; }

/* ============ Homepage (Phase 4) ============ */
.home-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.home-main { min-width: 0; }

/* Main article list: CSS grid; first item = hero (full width) */
.home-main .view-content,
.home-main .views-view-unformatted { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.home-main .views-row:first-child { grid-column: 1 / -1; }

/* Card */
.card { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 6px 20px rgba(9,28,85,.12); }
.card__media { display: block; background: #e9ecf7; aspect-ratio: 16 / 9; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__media--empty { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#e9ecf7,#dfe3f5); }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.card .cat-label { align-self: flex-start; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .4px; padding: 3px 9px; border-radius: 3px; text-transform: uppercase; }
.card .cat-label:hover { text-decoration: none; background: var(--brand-dark); }
.card__title { font-family: var(--font-head); font-size: 18px; font-weight: 700; line-height: 1.25; margin: 0; }
.card__title a { color: var(--navy); }
.card__title a:hover { color: var(--brand); text-decoration: none; }
.card__date { color: var(--muted); font-size: 12px; }

/* Hero (first row) */
.home-main .views-row:first-child .card { flex-direction: row; }
.home-main .views-row:first-child .card__media { flex: 0 0 58%; aspect-ratio: 16 / 9; }
.home-main .views-row:first-child .card__body { justify-content: center; padding: 22px 26px; }
.home-main .views-row:first-child .card__title { font-size: 30px; font-weight: 800; }
.home-main .views-row:first-child .card__date { font-size: 13px; }

/* ---- Sidebar widgets ---- */
.home-sidebar > * + * { margin-top: 26px; }
.home-sidebar .block > h2, .widget__title {
  background: var(--brand); color: #fff; font-family: var(--font-head); font-weight: 700;
  font-size: 15px; letter-spacing: 1px; text-transform: uppercase; padding: 10px 14px; margin: 0; border-radius: 4px 4px 0 0;
}
.home-sidebar .block { background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.widget { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }

/* ΚΟΡΥΦΑΙΑ top stories: compact rows */
.top-widget .card { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; }
.top-widget .card:hover { box-shadow: none; background: var(--bg); }
.top-widget .views-row:last-child .card { border-bottom: 0; }
.top-widget .card__media { flex: 0 0 84px; aspect-ratio: 1 / 1; }
.top-widget .card__body { padding: 8px 12px; gap: 4px; }
.top-widget .card__title { font-size: 14px; font-weight: 700; }
.top-widget .card .cat-label { display: none; }

/* POPULAR TAGS chips */
.tags-widget .view-content { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.tags-widget .views-row { display: inline-block; }
.tags-widget .views-row a { display: inline-block; background: var(--bg); border: 1px solid var(--line); color: var(--navy); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 20px; }
.tags-widget .views-row a:hover { background: var(--brand); color: #fff; text-decoration: none; border-color: var(--brand); }

/* BEST OF INTERNET placeholder */
.widget--boi .boi-placeholder { padding: 22px 14px; color: var(--muted); font-size: 13px; text-align: center; background: repeating-linear-gradient(45deg,#f2f4fc,#f2f4fc 10px,#eef1fb 10px,#eef1fb 20px); }

/* Responsive */
@media (max-width: 980px) {
  .home-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .home-main .view-content, .home-main .views-view-unformatted { grid-template-columns: 1fr; }
  .home-main .views-row:first-child .card { flex-direction: column; }
  .home-main .views-row:first-child .card__media { flex: none; }
  .home-main .views-row:first-child .card__title { font-size: 22px; }
}

/* ============ WebTV (Phase 5) ============ */
.cat-label--tv { background: #c0392b !important; }  /* WebTV red accent */

/* Play badge on video thumbnails */
.card--video .card__media { position: relative; }
.card--video .play-badge {
  position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%;
  background: rgba(9,28,85,.72); display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.card--video .play-badge::after { content: ''; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; margin-left: 4px; }
.card--video:hover .play-badge { background: var(--brand); }

/* /videos grid page */
.videos-grid { max-width: var(--maxw); margin: 0 auto; }
.videos-grid .view-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .videos-grid .view-content { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .videos-grid .view-content { grid-template-columns: 1fr; } }

/* Sidebar "Best of Internet" video list */
.boi-widget .card--video { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; }
.boi-widget .views-row:last-child .card--video { border-bottom: 0; }
.boi-widget .card__media { flex: 0 0 108px; aspect-ratio: 16/9; }
.boi-widget .play-badge { width: 34px; height: 34px; }
.boi-widget .play-badge::after { border-width: 6px 0 6px 10px; }
.boi-widget .card__body { padding: 8px 12px; gap: 4px; }
.boi-widget .card__title { font-size: 13px; }
.boi-widget .card .cat-label { display: none; }

/* Video full page */
.node--type-video { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 24px; max-width: 900px; margin: 0 auto; }
.node--type-video h1 { font-size: 30px; font-weight: 800; margin: 12px 0; }
.node--type-video .meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.video-embed { position: relative; padding-top: 56.25%; border-radius: 6px; overflow: hidden; background: #000; margin-bottom: 18px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.node--type-video .body { font-size: 16px; line-height: 1.7; }
.page-node-type-video .block-page-title-block { display: none; }

/* WebTV grid — target the auto Views class (page-display css_class doesn't render) */
.view-id-pentaposta_videos.view-display-id-page_1 .view-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .view-id-pentaposta_videos.view-display-id-page_1 .view-content { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .view-id-pentaposta_videos.view-display-id-page_1 .view-content { grid-template-columns: 1fr; } }
