/*
Theme Name: Urge Communications
Theme URI: https://urgecommunications.com
Author: Urge Communications
Description: Custom theme for Urge Communications — UrgeDevWire, UrgeDev Intell, Urge Skill-Up. Built for fast daily/weekly news publishing with full responsive support (desktop, tablet, mobile).
Version: 1.0
Text Domain: urge-theme
*/

/* =========================================================
   BRAND FONTS
   Self-hosted, pulled from the live site's actual font-face
   rules (Montserrat for nav/headings, Georgia for body copy).
   ========================================================= */
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Georgia';
  src: url('fonts/georgia-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Georgia';
  src: url('fonts/georgia-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Georgia Bold';
  src: url('fonts/georgia-bold.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   BRAND COLOR VARIABLES
   PLACEHOLDER VALUES — replace with exact hex codes pulled
   from the live site (header, accent, text, footer, links).
   Everything in the theme references these variables, so
   updating colors is a one-time edit right here.
   ========================================================= */
:root {
  --urge-primary: #E3DFCD;      /* header / nav background — pulled from live site (sticky nav bar) */
  --urge-accent: #F26E23;       /* buttons / links / highlights — pulled from live site */
  --urge-text: #1D1E20;         /* body text — pulled from live site */
  --urge-text-light: #1D1E20;   /* text on header/footer chrome (now light cream, so this is dark) */
  --urge-bg: #ffffff;           /* page background — confirmed white on live site */
  --urge-footer-bg: #E3DFCD;    /* footer background — pulled from live site */
  --urge-border: #e2e2e2;       /* dividers / card borders */
  --urge-card-shadow: rgba(0,0,0,0.08);
  --urge-font-body: Georgia, "Times New Roman", serif;         /* body copy — pulled from live site */
  --urge-font-heading: Montserrat, -apple-system, sans-serif;  /* headings — pulled from live site */
  --urge-font-nav: Montserrat, -apple-system, sans-serif;      /* nav links — pulled from live site */
  --urge-font-button: "Georgia Bold", Georgia, serif;           /* buttons — pulled from live site */
  --urge-nav-text: #E3DFCD;     /* header nav text at rest — sits over the video+scrim backdrop, not a solid panel */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--urge-font-body);
  color: var(--urge-text);
  background: var(--urge-bg);
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--urge-font-heading);
  font-weight: 600;
}

a { color: var(--urge-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

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

.logo-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.site-logo { display: inline-block; }
.site-logo img { max-height: 48px; }

.menu-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--urge-font-button);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  opacity: 0.9;
}
.menu-trigger:hover { opacity: 1; }
.menu-trigger-icon { font-size: 0.95rem; line-height: 1; }

/* ---------- Logo Mega Menu ---------- */
.logo-mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--urge-bg);
  color: var(--urge-text);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  z-index: 200;
}
.logo-mega-menu.is-open {
  max-height: 600px;
  opacity: 1;
}
.logo-mega-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 32px 20px;
}
.mega-platform h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--urge-text);
}
.mega-platform h4 a {
  color: inherit;
}
.mega-platform h4 a:hover {
  color: var(--urge-accent);
  text-decoration: underline;
}
.mega-platform h4 span {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: #888;
  margin-top: 2px;
}
.mega-platform ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.mega-platform li { margin-bottom: 10px; }
.mega-platform a { color: var(--urge-text); font-weight: 500; }
.mega-platform a:hover { color: var(--urge-accent); }

.logo-mega-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 150;
}
.logo-mega-backdrop.is-open { display: block; }

/* ---------- Utility Bar ----------
   Sticky on the live site — pins to the top of the viewport once you scroll
   past the (non-sticky) header, since it's the persistent element, not the nav. */
.utility-bar {
  background: var(--urge-primary);
  color: #4D4D4D;
  text-align: center;
  font-family: var(--urge-font-body);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 300;
}

/* ---------- Header / Nav ----------
   Solid by default on every page (archives, static pages) — there's no hero
   media behind the header there. The homepage gets an additional
   `.site-header--video` modifier: transparent at rest over a looping video +
   dark scrim, then solidifies (via `.is-scrolled`, toggled by nav.js) once the
   visitor scrolls past it. Child elements use `color: inherit` so they follow
   whichever state `.site-header` itself is in without needing repeated rules. */
.site-header {
  position: relative;
  background: var(--urge-primary);
  color: var(--urge-text);
  min-height: 116px;
  z-index: 100;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.site-header--video {
  background: transparent;
  color: var(--urge-nav-text);
}
.site-header--video.is-scrolled {
  background: var(--urge-primary);
  color: var(--urge-text);
}
.site-header-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  transition: opacity 0.3s ease;
}
.site-header--video.is-scrolled .site-header-bg {
  opacity: 0;
  pointer-events: none;
}
.site-header-bg-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.site-header-bg-overlay {
  position: absolute;
  inset: 0;
  background: #1D1E20;
}
.site-header > .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 16px;
  max-width: 1240px;
}
.site-header .main-nav { flex: 1; }
.site-logo img { max-height: 48px; }

.menu-trigger,
.header-social,
.nav-toggle,
.main-nav a {
  color: inherit;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}
.main-nav a { font-family: var(--urge-font-nav); font-weight: 300; font-size: 1.125rem; }
.main-nav a:hover { color: var(--urge-accent); text-decoration: none; }
.main-nav li { position: relative; }

/* Dropdown submenus (e.g. UrgeDevWire > Dev-News, Health, Events, Jobs) — solid
   cream panel, so (unlike the top-level nav bar) these need dark text. */
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu {
  display: block;
}
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--urge-primary);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  flex-direction: column;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 50;
}
.main-nav .sub-menu li { width: 100%; }
.main-nav .sub-menu a {
  display: block;
  padding: 8px 16px;
  font-family: var(--urge-font-nav);
  font-weight: 300;
  color: var(--urge-text);
  white-space: nowrap;
}
.main-nav .sub-menu a:hover { background: rgba(0,0,0,0.06); color: var(--urge-accent); text-decoration: none; }
.main-nav .menu-item-has-children > a::after {
  content: ' \25BE';
  font-size: 0.7em;
}

.header-social {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
}

/* ---------- Page Hero Band (per-section title + tagline) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--urge-primary), #C8C4B4);
  color: var(--urge-text-light);
  padding: 36px 0 28px;
}
.page-hero-eyebrow {
  display: block;
  color: var(--urge-accent);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.page-hero-title {
  margin: 0;
  font-size: 1.8rem;
}
.page-hero-tagline {
  margin: 6px 0 0;
  opacity: 0.85;
  font-size: 0.95rem;
}

.country-strip {
  padding: 14px 0;
  font-size: 0.85rem;
  color: #555;
  border-bottom: 1px solid var(--urge-border);
}

/* ---------- UrgeDevWire Hub Page ---------- */
.devwire-intro { padding: 32px 0 8px; max-width: 760px; }
.devwire-intro h2 { margin: 0 0 12px; font-size: 1.5rem; }
.devwire-intro p { margin: 0 0 12px; }

.devwire-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 32px 0 40px;
}
.devwire-card {
  border: 1px solid var(--urge-border);
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 2px 8px var(--urge-card-shadow);
}
.devwire-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.devwire-card p { margin: 0 0 12px; font-size: 0.9rem; color: #555; }
.devwire-card a { font-weight: 600; }

.devwire-footer-line {
  padding: 0 0 40px;
  font-size: 0.9rem;
  color: #555;
}

/* ---------- News Grid (homepage) ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px 0;
}
.news-card {
  border: 1px solid var(--urge-border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--urge-card-shadow);
  transition: transform 0.15s ease;
}
.news-card:hover { transform: translateY(-3px); }
.news-card img { width: 100%; height: 200px; object-fit: cover; }
.news-card-body { padding: 16px; }
.news-card-meta { font-size: 0.8rem; color: #666; margin-bottom: 6px; }
.news-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.news-card .tag-country {
  display: inline-block;
  background: var(--urge-accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 6px;
}

/* ---------- Single Post ---------- */
.single-article { max-width: 800px; margin: 0 auto; padding: 40px 20px; }
.single-article .dateline { font-weight: 700; margin-bottom: 16px; }
.single-article img { border-radius: 6px; margin: 20px 0; }
.single-article figcaption { font-size: 0.85rem; color: #666; margin-top: 6px; }

/* ---------- Footer (mega-menu style) ---------- */
.site-footer {
  background: var(--urge-footer-bg);
  color: var(--urge-text-light);
  padding: 48px 0 24px;
  margin-top: 40px;
}
.footer-mega {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 24px;
}
.footer-col h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: var(--urge-text-light);
  opacity: 0.85;
  font-size: 0.9rem;
}
.footer-col a:hover { opacity: 1; text-decoration: underline; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid rgba(0,0,0,0.15);
  margin-top: 32px;
  padding-top: 20px;
}
.footer-tagline { font-size: 0.85rem; opacity: 0.8; }
.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.3);
  color: var(--urge-text-light);
  text-transform: uppercase;
  font-size: 0.7rem;
}

.site-footer .copyright {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.12);
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.7;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   Desktop: default above
   Tablet:  <= 1024px
   Mobile:  <= 640px
   ========================================================= */

/* Tablet */
@media (max-width: 1024px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-mega { grid-template-columns: repeat(3, 1fr); }
  .logo-mega-inner { grid-template-columns: repeat(2, 1fr); }
  .devwire-cards { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; padding: 24px 0; }
  .footer-mega { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .devwire-cards { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .logo-mega-inner { grid-template-columns: 1fr; padding: 24px 16px; gap: 24px; }
  .logo-mega-menu.is-open { max-height: 90vh; overflow-y: auto; }

  .site-header { min-height: 84px; }

  .main-nav {
    display: none;
    flex-direction: column;
    background: var(--urge-primary);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 16px 20px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 16px; }
  /* Mobile nav is a solid cream dropdown panel, not the transparent header bar — needs dark text */
  .main-nav a { color: var(--urge-text); }
  .nav-toggle { display: block; margin-left: auto; }

  .single-article { padding: 24px 16px; }
}
