/* ============================================================
   TelephoneCardCollector.com — Main Stylesheet
   ============================================================ */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --green:       #54B822;
  --green-dark:  #3d8c18;
  --green-hover: #48a01d;
  --green-pale:  #edf7e5;
  --green-light: #6fd42e;
  --blue:        #003399;
  --blue-mid:    #0040bb;
  --blue-light:  #e8edf8;
  --white:       #ffffff;
  --off-white:   #f5f5f5;
  --text:        #1a1a1a;
  --text-muted:  #555555;
  --border:      #c8e8a8;
  --font:        'Nunito', Arial, Helvetica, sans-serif;
  --shadow:      0 2px 8px rgba(0,0,0,0.10);
  --radius:      6px;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background-image: url(../images/background-image.jpg);
  background-attachment: fixed;
  background-position: center top;
  background-repeat: repeat;
  background-color: #4a9e1a;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }
p { margin-bottom: 12px; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  line-height: 1.3;
  margin-top: 0;
}

/* ============================================================
   OUTER WRAPPER
   ============================================================ */
#page-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 24px rgba(0,0,0,0.25);
}

/* ============================================================
   TOP BAR
   ============================================================ */
#topbar {
  background: var(--blue);
  padding: 5px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#topbar-links { display: flex; gap: 0; }
#topbar-links a {
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 12px;
  border-right: 1px solid rgba(255,255,255,0.20);
  transition: color 0.2s;
}
#topbar-links a:first-child { padding-left: 0; }
#topbar-links a:hover { color: rgba(255,255,255,0.55); text-decoration: none; }
#topbar-social { display: flex; gap: 7px; align-items: center; }
.soc-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  cursor: pointer;
}
.soc-icon:hover { background: rgba(84,184,34,0.45); }
.soc-icon svg { width: 12px; height: 12px; fill: #aac0ee; }
.soc-icon:hover svg { fill: #fff; }

/* ============================================================
   HEADER — white background, detailed logo left, social icons right
   ============================================================ */
#site-header {
  background: var(--blue);
  border-bottom: 5px solid var(--green);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo anchor wraps SVG card + site name text */
#header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 1;
  min-width: 0;
}
#header-logo:hover { text-decoration: none; }

/* The phonecard SVG */
#header-logo-svg {
  flex-shrink: 0;
  width: 110px;
  height: 69px;
}
#header-logo-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Site name */
#header-logo-text {
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Social icons in header (desktop) */
#header-social {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.header-soc-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  text-decoration: none;
}
.header-soc-icon:hover { background: var(--green); text-decoration: none; }
.header-soc-icon svg { width: 16px; height: 16px; fill: #fff; }

/* ============================================================
   NAVIGATION
   ============================================================ */
#main-nav {
  background: var(--green);
  position: relative;
  z-index: 100;
}
#nav-inner {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
}
.nav-item { position: relative; }
.nav-item > a {
  display: block;
  padding: 11px 14px;
  color: #fff;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.18);
  line-height: 1.1;
  transition: background 0.18s;
}
.nav-item:first-child > a { border-left: 1px solid rgba(255,255,255,0.18); }
.nav-item > a:hover,
.nav-item.active > a {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--blue);
  min-width: 210px;
  z-index: 200;
  border-top: 3px solid var(--green);
  box-shadow: 0 6px 18px rgba(0,0,51,0.20);
}
.nav-item:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  padding: 9px 16px;
  color: #c8d8f8;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover {
  background: var(--green);
  color: #fff;
  text-decoration: none;
}

/* Hamburger */
#hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 13px 16px;
  cursor: pointer;
  margin-left: auto;
  background: none;
  border: none;
}
#hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--blue);
  border-radius: 2px;
  transition: 0.3s;
}

/* Mobile nav panel */
#mobile-nav {
  display: none;
  background: var(--blue);
  border-top: 1px solid rgba(255,255,255,0.1);
}
#mobile-nav a {
  display: block;
  padding: 10px 20px;
  color: #c8d8f8;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.15s;
}
#mobile-nav a.mob-head {
  color: #fff;
  background: rgba(84,184,34,0.18);
  font-weight: 800;
}
#mobile-nav a.mob-sub {
  padding-left: 36px;
  font-weight: 400;
  font-size: 13px;
}
#mobile-nav a:hover { background: var(--green); color: #fff; }
button.mob-head {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  color: #fff;
  background: rgba(84,184,34,0.18);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 800;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition: background 0.15s;
}
button.mob-head:hover { background: var(--green); }
.mob-sub-group { display: none; }
.mob-sub-group.open { display: block; }
.mob-sub-group a {
  padding-left: 36px;
  font-size: 13px;
  font-weight: 400;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
#breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 6px 16px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-muted);
}
#breadcrumb a { color: var(--blue); font-weight: 600; }
#breadcrumb a:hover { text-decoration: underline; }
#breadcrumb .sep { margin: 0 6px; color: #bbb; }

/* ============================================================
   PAGE BODY LAYOUT
   ============================================================ */
#page-body {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 22px;
  background: var(--off-white);
  padding: 20px 16px 40px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  min-width: 0;
}
#content h1 {
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-pale);
}
#content h2 {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
  margin: 26px 0 10px;
  padding-left: 10px;
  border-left: 4px solid var(--green);
}
#content h3 {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: var(--green-dark);
  margin: 20px 0 8px;
}
#content h4 {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  margin: 18px 0 8px;
}
#content h5, #content h6 {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  margin: 16px 0 6px;
}
#content p { font-family: var(--font); font-size: 15px; line-height: 1.78; }
#content a { color: var(--blue); font-weight: 600; }
#content a:hover { color: var(--green-dark); text-decoration: underline; }
#content hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }

/* Content images — natural proportions */
#content img {
  border: 2px solid var(--border);
  border-radius: 4px;
  width: auto;
  height: auto;
  max-width: 100%;
}

/* ============================================================
   PHONECARD GRID — #pcbox / #pc
   Replaces the old float-based layout with flexbox wrap.
   Each card slot is 200px wide and holds a 180px image + text.
   ============================================================ */
#pcbox {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 16px 0;
  overflow: hidden;
}
#pc {
  flex: 0 0 auto;
  width: 200px;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
#pc img {
  width: 180px !important;
  height: auto !important;
  max-width: 180px;
  display: block;
  border: 2px solid var(--border);
  border-radius: 4px;
  margin-bottom: 6px;
  float: none !important;
}
#pc p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
#pc b {
  color: var(--blue);
  font-weight: 700;
}

/* Centre-aligned images (p align="center") */
p[align="center"] {
  text-align: center;
}
p[align="center"] img {
  display: inline-block;
  margin: 0 auto;
  max-width: 100%;
  height: auto !important;
  width: auto !important;
}

/* Legacy caption class */
.style9 {
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-bottom: 14px;
  display: block;
}

/* ============================================================
   LIGHTBOX OVERRIDES
   ============================================================ */
#lightbox { z-index: 10000; }
#lightbox img {
  border: none !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  max-width: 90vw !important;
  max-height: 80vh !important;
  object-fit: contain !important;
  display: block !important;
}
#lightboxOverlay { z-index: 9999; }
.lb-image {
  width: auto !important;
  height: auto !important;
  max-width: 90vw !important;
  max-height: 80vh !important;
  object-fit: contain !important;
  border: none !important;
  border-radius: 0 !important;
}

.img-right {
  float: right;
  margin: 0 0 14px 18px;
  max-width: 200px;
  width: auto;
  height: auto;
}
.img-centre {
  text-align: center;
  margin: 18px auto 4px;
  display: block;
}
.caption {
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-bottom: 14px;
  font-weight: 600;
}

/* CTA buttons */
.cta-btn {
  display: inline-block;
  background: var(--blue) !important;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
  margin-top: 4px;
}
.cta-btn:hover {
  background: var(--green) !important;
  color: #fff !important;
  text-decoration: none !important;
}

.last-updated {
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 6px;
}
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.s-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.s-widget-head {
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.s-widget-body { padding: 8px 0; }
.s-widget-body ul { list-style: none; }
.s-widget-body ul li { border-bottom: 1px solid #f0f7e8; }
.s-widget-body ul li:last-child { border-bottom: none; }
.s-widget-body ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  color: var(--blue);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.s-widget-body ul li a::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}
.s-widget-body ul li a:hover {
  background: var(--green-pale);
  color: var(--green-dark);
  text-decoration: none;
}
.s-cta-widget {
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.s-cta-widget h4 {
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
  line-height: 1.4;
}
.s-cta-widget p {
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}
.s-cta-widget .cta-btn {
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  font-size: 13px;
  padding: 8px 16px;
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--blue);
  border-top: 3px solid var(--green);
}
#footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 30px 20px 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.f-col h5 {
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.f-col ul { list-style: none; }
.f-col ul li { margin-bottom: 7px; }
.f-col ul li a {
  color: #ffffff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.f-col ul li a:hover { color: rgba(255,255,255,0.50); text-decoration: none; }
#footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.20);
  padding: 12px 20px;
  text-align: center;
  font-family: var(--font);
  font-size: 12px;
  color: #ffffff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  /* Desktop nav hidden, hamburger shown */
  #nav-inner .nav-item { display: none; }
  #hamburger { display: flex; }

  /* Stack layout */
  #page-body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 14px 10px 30px;
  }

  /* Sidebar appears below content, above footer */
  #content  { order: 1; }
  #sidebar  { display: flex; order: 2; }

  /* Header */
  #site-header { padding: 10px 12px; }
  #header-logo-text {
    font-size: 22px;
    white-space: normal;
    word-break: break-word;
  }
  #header-logo-svg { width: 68px; height: 43px; }
  /* Header social hidden on mobile — already in topbar */
  #header-social { display: none; }

  /* Phonecard grid: 2 per row on mobile */
  #pc {
    width: calc(50% - 7px);
  }
  #pc img {
    width: 100% !important;
    max-width: 100%;
  }

  /* Footer */
  #footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 24px 16px 14px;
  }

  /* Content */
  #content { padding: 16px 14px; }

  .img-right {
    float: none;
    margin: 0 auto 14px;
    display: block;
  }
}

@media (max-width: 420px) {
  #footer-grid { grid-template-columns: 1fr; }
  #pc { width: 100%; }
}

/* ============================================================
   COOKIE CONSENT OVERRIDES
   Repositioned to bottom-left, white background, blue button
   ============================================================ */
.cc-window {
  /* Left-aligned bar */
  left: 0 !important;
  right: auto !important;
  max-width: 420px !important;
  width: auto !important;
  /* White background */
  background: #ffffff !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0 var(--radius) 0 0 !important;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.12) !important;
  padding: 14px 18px !important;
  font-family: var(--font) !important;
  font-size: 13px !important;
}

/* Message text */
.cc-message {
  color: var(--text) !important;
  font-family: var(--font) !important;
  font-size: 13px !important;
  margin-bottom: 10px !important;
}

/* "Learn more" link */
.cc-link {
  color: var(--blue) !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}
.cc-link:hover {
  color: var(--green-dark) !important;
}

/* Accept button — blue background, white text, matching CTA style */
.cc-btn.cc-dismiss {
  background: var(--blue) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--radius) !important;
  font-family: var(--font) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 8px 20px !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
}
.cc-btn.cc-dismiss:hover {
  background: var(--green) !important;
  color: #ffffff !important;
}
