/*
Theme Name: UKuG Microwave Group
Theme URI: https://www.microwavers.org
Author: UK Microwave Group
Author URI: https://www.microwavers.org
Description: Official theme for the UK Microwave Group website, migrated from the original frames-based site.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ukug
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --ukug-navy:       #1a2a4a;
  --ukug-blue:       #2255aa;
  --ukug-light-blue: #4488cc;
  --ukug-accent:     #ff8c00;
  --ukug-white:      #ffffff;
  --ukug-off-white:  #f4f6f9;
  --ukug-text:       #222222;
  --ukug-muted:      #555555;
  --ukug-border:     #ccddee;
  --ukug-link:       #1a5ea8;
  --ukug-link-hover: #ff8c00;
  --ukug-nav-width:  220px;
  --ukug-font-body:  'Georgia', 'Times New Roman', serif;
  --ukug-font-ui:    'Verdana', 'Arial', sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--ukug-font-body);
  color: var(--ukug-text);
  background: var(--ukug-off-white);
  line-height: 1.65;
}

a { color: var(--ukug-link); text-decoration: underline; }
a:hover { color: var(--ukug-link-hover); }

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

p { margin-bottom: 1em; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ukug-font-ui);
  font-weight: bold;
  color: var(--ukug-navy);
  margin-bottom: 0.5em;
  margin-top: 1.2em;
  line-height: 1.25;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.35rem; border-bottom: 2px solid var(--ukug-border); padding-bottom: 4px; }
h3 { font-size: 1.15rem; }

hr { border: none; border-top: 1px solid var(--ukug-border); margin: 1.5em 0; }

ul, ol { margin: 0.5em 0 1em 1.5em; }
li { margin-bottom: 0.25em; }

table { border-collapse: collapse; width: 100%; margin-bottom: 1em; font-size: 0.9rem; }
th { background: var(--ukug-navy); color: var(--ukug-white); padding: 8px 10px; text-align: left; font-family: var(--ukug-font-ui); font-size: 0.85rem; }
td { padding: 7px 10px; border: 1px solid var(--ukug-border); vertical-align: top; }
tr:nth-child(even) td { background: #eef3fa; }

/* ============================================================
   SITE HEADER
   ============================================================ */
#site-header {
  background: var(--ukug-navy);
  color: var(--ukug-white);
  padding: 0;
  border-bottom: 4px solid var(--ukug-accent);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.site-logo img {
  height: 70px;
  width: auto;
  display: block;
}

.site-branding h1,
.site-branding .site-title {
  font-family: var(--ukug-font-ui);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--ukug-white);
  margin: 0;
  border: none;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.site-branding h1 a,
.site-title a {
  color: var(--ukug-white);
  text-decoration: none;
}

.site-branding .site-description {
  font-family: var(--ukug-font-ui);
  font-size: 0.8rem;
  color: #aabbd4;
  margin-top: 2px;
}

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
#page-wrapper {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  min-height: calc(100vh - 160px);
}

/* ============================================================
   LEFT NAVIGATION SIDEBAR
   ============================================================ */
#nav-sidebar {
  width: var(--ukug-nav-width);
  flex-shrink: 0;
  background: var(--ukug-navy);
  color: var(--ukug-white);
  padding: 18px 0 24px;
}

#nav-sidebar .widget-title {
  font-family: var(--ukug-font-ui);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #aabbd4;
  padding: 0 16px 10px;
}

/* Primary nav menu */
#nav-sidebar .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

#nav-sidebar .menu li {
  margin: 0;
}

#nav-sidebar .menu li a {
  display: block;
  padding: 9px 16px;
  color: #cce0f5;
  text-decoration: none;
  font-family: var(--ukug-font-ui);
  font-size: 0.85rem;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

#nav-sidebar .menu li a:hover,
#nav-sidebar .menu li.current-menu-item > a,
#nav-sidebar .menu li.current_page_item > a {
  background: rgba(255,255,255,0.08);
  color: var(--ukug-white);
  border-left-color: var(--ukug-accent);
}

#nav-sidebar .menu li + li {
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Sub-menus */
#nav-sidebar .menu .sub-menu {
  margin: 0;
  padding: 0;
  list-style: none;
  background: rgba(0,0,0,0.2);
}

#nav-sidebar .menu .sub-menu li a {
  padding-left: 28px;
  font-size: 0.8rem;
  color: #aabbd4;
}

#nav-sidebar .menu .sub-menu li a:hover {
  color: var(--ukug-white);
}

/* Sidebar widget: callsign badge */
.sidebar-callsign {
  margin: 20px 14px 0;
  background: rgba(255,140,0,0.15);
  border: 1px solid var(--ukug-accent);
  border-radius: 4px;
  padding: 10px 12px;
  text-align: center;
  font-family: var(--ukug-font-ui);
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--ukug-accent);
  letter-spacing: 2px;
}

.sidebar-callsign small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  color: #8899bb;
  font-weight: normal;
  margin-top: 3px;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
#main-content {
  flex: 1;
  min-width: 0;
  background: var(--ukug-white);
  border-left: 1px solid var(--ukug-border);
}

.content-inner {
  padding: 28px 32px 40px;
}

/* Page title */
.page-title-bar {
  background: linear-gradient(135deg, var(--ukug-navy) 0%, var(--ukug-blue) 100%);
  color: var(--ukug-white);
  padding: 12px 32px;
  font-family: var(--ukug-font-ui);
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Entry content styles */
.entry-content h2:first-child,
.entry-content h3:first-child { margin-top: 0; }

.entry-content .wp-block-image,
.entry-content figure { margin: 1.2em 0; }

/* Info boxes */
.ukug-notice {
  background: #eef5ff;
  border-left: 4px solid var(--ukug-light-blue);
  padding: 12px 16px;
  margin: 1.2em 0;
  font-size: 0.9rem;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
#site-footer {
  background: var(--ukug-navy);
  color: #8899bb;
  font-family: var(--ukug-font-ui);
  font-size: 0.75rem;
  border-top: 3px solid var(--ukug-accent);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-inner a { color: #aabbd4; text-decoration: none; }
.footer-inner a:hover { color: var(--ukug-white); }

/* ============================================================
   HOME PAGE WELCOME BLOCK
   ============================================================ */
.ukug-welcome {
  background: linear-gradient(135deg, #eef4fb 0%, #f8fbff 100%);
  border: 1px solid var(--ukug-border);
  border-radius: 6px;
  padding: 24px 28px;
  margin-bottom: 2em;
}

.ukug-welcome h2 {
  border: none;
  font-size: 1.2rem;
  color: var(--ukug-blue);
}

/* Quick links grid on home */
.ukug-quicklinks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 1.5em 0;
}

.ukug-quicklinks a {
  display: block;
  background: var(--ukug-navy);
  color: var(--ukug-white);
  padding: 14px 12px;
  text-align: center;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--ukug-font-ui);
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.15s ease;
  border-bottom: 3px solid var(--ukug-accent);
}

.ukug-quicklinks a:hover {
  background: var(--ukug-blue);
  color: var(--ukug-white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  #page-wrapper { flex-direction: column; }

  #nav-sidebar {
    width: 100%;
    padding: 8px 0;
  }

  #nav-sidebar .menu { display: flex; flex-wrap: wrap; }
  #nav-sidebar .menu li { flex: 1; min-width: 120px; }
  #nav-sidebar .menu li a { text-align: center; border-left: none; border-bottom: 3px solid transparent; }
  #nav-sidebar .menu li a:hover,
  #nav-sidebar .menu li.current-menu-item > a { border-left-color: transparent; border-bottom-color: var(--ukug-accent); }

  .content-inner { padding: 18px 16px 28px; }

  .header-inner { padding: 10px 14px; }
  .site-branding h1, .site-branding .site-title { font-size: 1.1rem; }

  .footer-inner { flex-direction: column; text-align: center; }

  .ukug-quicklinks { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .site-logo img { height: 48px; }
  .ukug-quicklinks { grid-template-columns: 1fr 1fr; }
}
