/*
Theme Name:    UPSTET Official Child
Theme URI:     https://example.com
Description:   Child theme of GeneratePress for UPSTET Official — an independent information portal covering UP Super TET (UPSTET), UPTET and CTET recruitment news, eligibility, exam pattern and results.
Author:        UPSTET Official
Template:      generatepress
Version:       1.2.0
Text Domain:   upstet-child
*/

/* =========================================================
   1. DESIGN TOKENS
   Beige = site-wide base. Cherry red = navigation, buttons, links.
========================================================= */
:root{
  --upstet-beige:        #F3EAD6;   /* page background */
  --upstet-beige-soft:   #FAF5E9;   /* card background, lighter */
  --upstet-beige-deep:   #E4D3AC;   /* section alt background */
  --upstet-beige-line:   #D8C39A;   /* borders / dividers */
  --upstet-cherry:       #AE1932;   /* primary cherry red */
  --upstet-cherry-dark:  #7C1023;   /* hover / active red */
  --upstet-cherry-soft:  #F6DCE0;   /* pale red tint for badges */
  --upstet-ink:          #2A2116;   /* primary text */
  --upstet-ink-soft:     #5B4E3C;   /* secondary text */
  --upstet-gold:         #8C6A2E;   /* small accent for labels */
  --upstet-white:        #FFFDF7;
  --upstet-radius:       10px;
  --upstet-shadow:       0 2px 14px rgba(42,33,22,0.08);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

/* =========================================================
   2. BASE
========================================================= */
* {
  box-sizing: border-box;
}

/* ---------------------------------------------------------
   MOBILE OVERFLOW SAFETY NET
   Flex/Grid children default to min-width:auto, which means
   they refuse to shrink below their content's natural width.
   A single long, unbreakable string anywhere in a flex/grid
   row is enough to push the whole page wider than the phone
   screen (this is what was cropping the hero on mobile).
   Resetting min-width to 0 here is safe: any class further
   down this file with an explicit min-width (e.g. 140px)
   still wins, because a class selector beats a universal one.
--------------------------------------------------------- */
*, *::before, *::after {
  min-width: 0;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body{
  background: var(--upstet-beige) !important;
  color: var(--upstet-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  padding: 0;
}

h1,h2,h3,h4, .site-title, .site-title a{
  font-family: var(--font-display);
  color: var(--upstet-ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a{ color: var(--upstet-cherry); text-decoration: none; }
a:hover{ color: var(--upstet-cherry-dark); text-decoration: underline; }

.upstet-eyebrow{
  display:inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--upstet-cherry);
  background: var(--upstet-cherry-soft);
  border: 1px solid var(--upstet-cherry);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
}

@media (max-width: 480px){
  .upstet-eyebrow{
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 5px 10px;
  }
}

/* Buttons (site-wide, cherry red) */
.upstet-btn, .wp-block-button__link, input[type="submit"], button.button, .comment-form input#submit{
  display:inline-block;
  background: var(--upstet-cherry) !important;
  color: var(--upstet-white) !important;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 12px 26px;
  border-radius: var(--upstet-radius);
  border: 2px solid var(--upstet-cherry) !important;
  text-decoration: none !important;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.upstet-btn:hover, .wp-block-button__link:hover, input[type="submit"]:hover, button.button:hover{
  background: var(--upstet-cherry-dark) !important;
  border-color: var(--upstet-cherry-dark) !important;
  transform: translateY(-1px);
}

/* Outline Button Fix (Transparent background so text is visible) */
.upstet-btn.upstet-btn-outline{
  background: transparent !important;
  color: var(--upstet-cherry) !important;
  border: 2px solid var(--upstet-cherry) !important;
}
.upstet-btn.upstet-btn-outline:hover{
  background: var(--upstet-cherry) !important;
  color: var(--upstet-white) !important;
}

/* =========================================================
   3. HEADER & SITE BRANDING (Complete Flexbox Reset)
========================================================= */

/* Header Container Reset */
header.site-header {
  background-color: var(--upstet-beige-soft) !important;
  border-bottom: 3px solid var(--upstet-cherry) !important;
  position: relative !important;
  overflow: visible !important;
  height: auto !important;
}

/* Remove GeneratePress Clearfix Pseudo-elements */
.inside-header::before,
.inside-header::after {
  content: none !important;
  display: none !important;
}

/* Main Header Layout Container */
.inside-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 18px 24px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  float: none !important;
  height: auto !important;
  flex-wrap: wrap;
  gap: 15px;
}

@media (max-width: 768px) {
  .inside-header {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    gap: 12px;
  }
}

/* Site Title & Tagline Box */
.site-branding {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  flex: 1 1 auto;
  min-width: 150px;
}

@media (max-width: 768px) {
  .site-branding {
    align-items: center !important;
    flex: 1 1 100%;
  }
}

.site-branding .main-title,
.site-branding .site-title {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

.site-title a,
.main-title a {
  font-family: var(--font-display) !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  color: var(--upstet-ink) !important;
  text-decoration: none !important;
  display: block !important;
  line-height: 1.2 !important;
  padding: 0 !important;
  margin: 0 !important;
  word-break: break-word;
}

@media (max-width: 768px) {
  .site-title a,
  .main-title a {
    font-size: 22px !important;
  }
}

@media (max-width: 480px) {
  .site-title a,
  .main-title a {
    font-size: 18px !important;
  }
}

.site-title a:hover,
.main-title a:hover {
  color: var(--upstet-cherry) !important;
}

/* Tagline Formatting */
.site-description {
  font-family: var(--font-mono) !important;
  font-size: 13px !important;
  color: var(--upstet-ink-soft) !important;
  margin: 4px 0 0 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  display: block !important;
}

/* Header Widgets (Search & Clock) Positioning */
.header-widget {
  display: flex !important;
  align-items: center !important;
  gap: 15px;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

@media (max-width: 768px) {
  .header-widget {
    flex: 1 1 100%;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
  }
}

.upstet-live-clock {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--upstet-cherry-dark);
  background: var(--upstet-cherry-soft);
  padding: 8px 14px;
  border-radius: var(--upstet-radius);
  border: 1px solid var(--upstet-cherry);
  white-space: nowrap;
}

.header-widget .widget_search {
  margin: 0;
}

.header-widget .widget_search form {
  display: flex;
  margin: 0;
}

.header-widget .widget_search input[type="search"] {
  padding: 10px 14px;
  border: 1px solid var(--upstet-beige-line);
  border-radius: 6px 0 0 6px;
  background: var(--upstet-white);
  color: var(--upstet-ink);
  font-family: var(--font-body);
  font-size: 15px;
  max-width: 220px;
  min-width: 120px;
  width: 100%;
}

@media (max-width: 768px) {
  .header-widget .widget_search input[type="search"] {
    max-width: 100%;
    min-width: 100px;
    padding: 8px 10px;
    font-size: 14px;
  }
}

.header-widget .widget_search input[type="search"]:focus {
  outline: none;
  border-color: var(--upstet-cherry);
}

.header-widget .widget_search button,
.header-widget .widget_search input[type="submit"] {
  background: var(--upstet-cherry) !important;
  color: var(--upstet-white) !important;
  border: 1px solid var(--upstet-cherry) !important;
  padding: 10px 18px;
  border-radius: 0 6px 6px 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  margin: 0;
  cursor: pointer;
  transition: background .15s ease;
}

.header-widget .widget_search button:hover,
.header-widget .widget_search input[type="submit"]:hover {
  background: var(--upstet-cherry-dark) !important;
  border-color: var(--upstet-cherry-dark) !important;
}

/* =========================================================
   4. PRIMARY NAVIGATION (cherry red, responsive)
========================================================= */

.main-navigation,
#site-navigation,
.main-navigation .inside-navigation {
  background: var(--upstet-cherry) !important;
  width: 100%;
}

/* Menu Toggle Button (Hamburger) */
.menu-toggle,
.site-navigation .menu-toggle {
  display: block !important;
  background: var(--upstet-cherry-dark) !important;
  color: var(--upstet-white) !important;
  border: none !important;
  padding: 10px 16px !important;
  margin: 0 !important;
  cursor: pointer;
  font-size: 16px !important;
  width: auto;
  height: auto;
}

.menu-toggle:hover,
.site-navigation .menu-toggle:hover {
  background: var(--upstet-cherry) !important;
}

.menu-toggle::before {
  content: "☰ ";
}

.main-navigation ul, 
.main-navigation li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.main-navigation .main-nav > ul > li > a,
.main-navigation .menu > li > a {
  color: var(--upstet-white) !important;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  display: block;
  overflow-wrap: break-word;
  word-break: break-word;
}

.main-navigation .main-nav > ul > li > a:hover,
.main-navigation .main-nav > ul > li.current-menu-item > a,
.main-navigation .main-nav > ul > li.current_page_item > a {
  background: var(--upstet-cherry-dark) !important;
  color: var(--upstet-white) !important;
}

/* Sub-menus */
.main-navigation .sub-menu,
.main-navigation ul ul {
  background: var(--upstet-white) !important;
  border: 1px solid var(--upstet-beige-line);
  box-shadow: var(--upstet-shadow);
}
.main-navigation .sub-menu a,
.main-navigation ul ul li a {
  color: var(--upstet-ink) !important;
  font-weight: 500;
  padding: 12px 20px;
}
.main-navigation .sub-menu a:hover {
  background: var(--upstet-cherry-soft) !important;
  color: var(--upstet-cherry-dark) !important;
}
.main-navigation .dropdown-menu-toggle { 
  color: var(--upstet-white); 
}

/* Desktop Navigation */
@media (min-width: 769px) {
  button.menu-toggle,
  .main-navigation .menu-toggle,
  .mobile-menu-control-wrapper {
    display: none !important;
  }

  .main-navigation .inside-navigation {
    display: flex !important;
    justify-content: center !important;
  }

  .main-navigation .main-nav {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    flex-grow: 1 !important;
  }

  .main-navigation .main-nav > ul {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center !important;
    width: 100%;
  }

  .main-navigation .main-nav > ul > li > a,
  .main-navigation .menu > li > a {
    padding: 18px 20px;
  }
}

/* Mobile Layout Header & Navigation */
@media (max-width: 768px) {
  .inside-header {
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center;
    gap: 16px;
    padding-top: 20px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  .header-widget {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column-reverse;
  }

  .header-widget .widget_search input[type="search"] {
    max-width: 100%;
    width: 240px;
  }

  .main-navigation .mobile-menu-control-wrapper {
    display: flex;
    justify-content: flex-end;
    width: 100%;
  }

  button.menu-toggle,
  .main-navigation .menu-toggle {
    display: inline-block !important;
    background: var(--upstet-cherry-dark) !important;
    color: var(--upstet-white) !important;
    border-radius: 6px;
    margin: 10px 15px;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
  }

  .main-navigation .main-nav > ul {
    display: block;
    width: 100%;
    background: var(--upstet-cherry);
  }

  .main-navigation .main-nav > ul > li {
    display: block;
    width: 100%;
    text-align: left;
  }

  .main-navigation .main-nav > ul > li > a {
    padding: 16px 24px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }
  
  .main-navigation .main-nav > ul > li:first-child > a {
    border-top: none;
  }

  .main-navigation .sub-menu,
  .main-navigation ul ul {
    background: var(--upstet-cherry-dark) !important;
  }
  .main-navigation .sub-menu a { 
    color: var(--upstet-white) !important; 
  }
}

/* =========================================================
   5. HOME PAGE — HERO
========================================================= */
.upstet-hero{
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 56px 24px 40px;
  text-align: center;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .upstet-hero {
    padding: 36px 16px 28px;
  }
}

@media (max-width: 480px) {
  .upstet-hero {
    padding: 24px 12px 20px;
  }
}

.upstet-hero h1{
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  margin: 0 0 14px;
  padding: 0 16px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.upstet-hero p.upstet-lede{
  max-width: 720px;
  margin: 0 auto 28px;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--upstet-ink-soft);
  padding: 0 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.upstet-hero .upstet-disclaimer-inline{
  font-size: 12px;
  color: var(--upstet-ink-soft);
  font-family: var(--font-mono);
  margin-top: 10px;
  padding: 0 12px;
}

.upstet-hero-ctas{ 
  display:flex; 
  gap:14px; 
  justify-content:center; 
  flex-wrap:wrap; 
  margin-bottom: 30px;
  padding: 0 12px;
}

@media (max-width: 768px) {
  .upstet-hero-ctas {
    flex-direction: column;
    gap: 12px;
  }

  .upstet-hero-ctas a {
    width: 100%;
    display: block;
  }
}

@media (max-width: 480px) {
  .upstet-hero-ctas {
    padding: 0 8px;
  }
}

.upstet-idstrip{
  display:flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  background: var(--upstet-white);
  border: 2px dashed var(--upstet-cherry);
  border-radius: var(--upstet-radius);
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  box-sizing: border-box;
}

.upstet-idstrip .upstet-idcell{
  flex: 1 1 150px;
  padding: 16px 14px;
  border-right: 1px dashed var(--upstet-beige-line);
  text-align:left;
  min-width: 140px;
}

.upstet-idstrip .upstet-idcell:last-child{ border-right:none; }

@media (max-width: 768px) {
  .upstet-idstrip .upstet-idcell {
    flex: 1 1 calc(50% - 1px);
    min-width: 0;
    border-right: 1px dashed var(--upstet-beige-line);
    border-bottom: 1px dashed var(--upstet-beige-line);
    padding: 12px 10px;
  }

  .upstet-idstrip .upstet-idcell:nth-child(even) {
    border-right: none;
  }

  .upstet-idstrip .upstet-idcell:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .upstet-idstrip {
    padding: 0 8px;
  }

  .upstet-idstrip .upstet-idcell {
    flex: 1 1 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px dashed var(--upstet-beige-line);
    padding: 10px 8px;
  }

  .upstet-idstrip .upstet-idcell:last-child {
    border-bottom: none;
  }
}

.upstet-idstrip .upstet-idlabel{
  display:block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform:uppercase;
  letter-spacing: .06em;
  color: var(--upstet-gold);
  margin-bottom: 4px;
}

.upstet-idstrip .upstet-idvalue{ 
  font-weight:600; 
  color:var(--upstet-ink);
  font-size: 14px;
  word-wrap: break-word;
}

@media (max-width: 700px){
  .upstet-hero {
    padding: 40px 16px 32px;
  }

  .upstet-hero h1 {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    padding: 0 8px;
  }

  .upstet-hero p.upstet-lede {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    padding: 0 8px;
  }

  .upstet-hero-ctas{ 
    padding: 0 8px;
    gap: 10px;
  }

  .upstet-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .upstet-idstrip {
    margin: 0 auto;
    border: 2px dashed var(--upstet-cherry);
  }

  .upstet-idstrip .upstet-idcell{ 
    border-right:none; 
    border-bottom:1px dashed var(--upstet-beige-line); 
    flex: 1 1 100%; 
    padding: 14px 12px;
  }

  .upstet-idstrip .upstet-idcell:last-child{ 
    border-bottom:none; 
  }

  .upstet-idstrip .upstet-idlabel {
    font-size: 9px;
  }

  .upstet-idstrip .upstet-idvalue {
    font-size: 13px;
  }
}

/* =========================================================
   6. CONTENT SECTIONS
========================================================= */
.upstet-section{
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 46px 24px;
  box-sizing: border-box;
}

.upstet-section.upstet-alt{
  max-width: 100%;
  background: var(--upstet-beige-deep);
}

.upstet-section.upstet-alt > .upstet-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.upstet-section h2{
  font-size: clamp(1.3rem, 2.5vw, 2.1rem);
  margin-bottom: 8px;
  padding: 0 8px;
  word-wrap: break-word;
}

.upstet-section .upstet-section-sub{
  color: var(--upstet-ink-soft);
  margin-bottom: 26px;
  max-width: 760px;
  padding: 0 8px;
}

.upstet-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .upstet-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .upstet-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.upstet-card{
  background: var(--upstet-white);
  border: 1px solid var(--upstet-beige-line);
  border-top: 4px solid var(--upstet-cherry);
  border-radius: var(--upstet-radius);
  padding: 22px 18px 20px;
  box-shadow: var(--upstet-shadow);
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .upstet-card {
    padding: 16px 14px;
  }
}

@media (max-width: 480px) {
  .upstet-card {
    padding: 12px 12px;
  }
}

.upstet-card h3{
  font-size: 1.05rem;
  margin: 0 0 10px;
  color: var(--upstet-cherry-dark);
}

.upstet-card p, .upstet-card ul{ 
  margin: 0 0 8px; 
  color: var(--upstet-ink); 
  font-size: 14.5px; 
}

.upstet-card ul{ padding-left: 20px; }

.upstet-table-wrap{ 
  overflow-x:auto; 
  margin-top: 10px; 
  border-radius: var(--upstet-radius); 
  box-shadow: var(--upstet-shadow);
  -webkit-overflow-scrolling: touch;
}

table.upstet-compare{
  width:100%;
  border-collapse: collapse;
  background: var(--upstet-white);
  min-width: 560px;
}

table.upstet-compare caption{ caption-side: top; text-align: left; padding-bottom: 8px; }

table.upstet-compare th, table.upstet-compare td{
  padding: 13px 12px;
  border-bottom: 1px solid var(--upstet-beige-line);
  text-align:left;
  font-size: 14px;
  vertical-align: top;
}

table.upstet-compare thead th{
  background: var(--upstet-cherry);
  color: var(--upstet-white);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .04em;
}

table.upstet-compare tbody tr:nth-child(odd){ background: var(--upstet-beige-soft); }
table.upstet-compare tbody th{ color: var(--upstet-cherry-dark); font-weight:700; width: 180px; }

.upstet-noticeboard{
  background: var(--upstet-beige-deep);
  border: 1px solid var(--upstet-beige-line);
  border-radius: 14px;
  padding: 28px 20px;
  margin-top: 10px;
  box-sizing: border-box;
}

.upstet-notice-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.upstet-notice-card{
  position: relative;
  background: var(--upstet-white);
  border: 1px solid var(--upstet-beige-line);
  border-radius: 8px;
  padding: 18px 16px;
  box-shadow: var(--upstet-shadow);
  box-sizing: border-box;
}

.upstet-notice-card::before{
  content:"";
  position:absolute;
  top:-7px; left:20px;
  width:14px; height:14px;
  background: var(--upstet-cherry);
  border-radius:50%;
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
}

.upstet-notice-date{
  display:block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--upstet-gold);
  margin-bottom: 6px;
}

.upstet-notice-card h3{ 
  font-size: 1rem; 
  margin: 0 0 8px; 
  line-height:1.3; 
  word-wrap: break-word;
}

.upstet-notice-card h3 a{ color: var(--upstet-ink); }
.upstet-notice-card h3 a:hover{ color: var(--upstet-cherry); }
.upstet-notice-card p{ font-size: 13.5px; color: var(--upstet-ink-soft); margin:0; }
.upstet-empty-notice{
  text-align:center;
  padding: 30px 16px;
  color: var(--upstet-ink-soft);
}

/* Category badge on each Updates card — matches post to its category. */
.upstet-notice-cat{
  display:inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--upstet-cherry);
  background: var(--upstet-cherry-soft);
  border: 1px solid var(--upstet-cherry);
  border-radius: 999px;
  padding: 2px 10px;
  margin: 0 0 8px;
  text-decoration: none !important;
}
.upstet-notice-cat:hover{ background: var(--upstet-cherry); color: var(--upstet-white) !important; }

/* "Browse by Category" pill row — homepage + reused wherever categories
   need to be listed. Same beige/cherry palette as the rest of the site. */
.upstet-cat-pill-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin: 4px 0 18px;
}
.upstet-cat-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family: var(--font-body);
  font-weight:600;
  font-size: 13.5px;
  color: var(--upstet-cherry-dark) !important;
  background: var(--upstet-beige-soft);
  border: 1px solid var(--upstet-cherry);
  border-radius: 999px;
  padding: 6px 14px;
  text-decoration: none !important;
  transition: background .15s ease, color .15s ease;
}
.upstet-cat-pill:hover{
  background: var(--upstet-cherry) !important;
  color: var(--upstet-white) !important;
}
.upstet-cat-pill-count{
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--upstet-cherry);
  color: var(--upstet-white);
  border-radius: 999px;
  padding: 1px 7px;
}
.upstet-cat-pill:hover .upstet-cat-pill-count{
  background: var(--upstet-white);
  color: var(--upstet-cherry-dark);
}

.upstet-section, section[id]{ scroll-margin-top: 90px; }

/* =========================================================
   7. FOOTER
========================================================= */
.site-footer, .footer-widgets, .inside-footer {
  background: var(--upstet-beige-soft) !important;
  color: var(--upstet-cherry-dark);
  width: 100%;
  box-sizing: border-box;
}

.upstet-footer-columns-wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 46px 24px 24px;
  box-sizing: border-box;
}

ul.upstet-footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 26px;
  list-style: none;
  margin: 0; 
  padding: 0;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

ul.upstet-footer-columns > li.menu-item-has-children > a {
  display: block;
  color: var(--upstet-cherry-dark) !important;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--upstet-beige-line);
  padding-bottom: 8px;
  text-decoration: none;
  word-wrap: break-word;
}

ul.upstet-footer-columns .sub-menu {
  list-style: none; 
  margin: 0; 
  padding: 0;
}

ul.upstet-footer-columns .sub-menu li { 
  margin-bottom: 8px; 
}

ul.upstet-footer-columns .sub-menu a {
  color: var(--upstet-cherry-dark) !important;
  font-size: 13px;
  text-decoration: none;
}

ul.upstet-footer-columns .sub-menu a:hover { 
  color: var(--upstet-cherry) !important; 
  text-decoration: underline; 
}

ul.upstet-footer-columns > li:not(.menu-item-has-children) > a {
  color: var(--upstet-cherry-dark) !important;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  word-wrap: break-word;
}

.upstet-footer-legal-wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 24px 8px;
  border-top: 1px solid var(--upstet-beige-line);
  box-sizing: border-box;
}

ul.upstet-footer-legal {
  list-style: none; 
  margin: 0; 
  padding: 14px 0 6px;
  display: flex; 
  flex-wrap: wrap; 
  gap: 6px 22px; 
  justify-content: center;
}

ul.upstet-footer-legal a {
  color: var(--upstet-cherry-dark) !important;
  font-size: 12.5px;
  text-decoration: none;
}

ul.upstet-footer-legal a:hover { 
  color: var(--upstet-cherry) !important; 
  text-decoration: underline; 
}

.upstet-social-row {
  display: flex; 
  gap: 12px; 
  justify-content: center; 
  margin: 22px 0 6px;
  flex-wrap: wrap;
}

.upstet-social-row a {
  display: flex; 
  align-items: center; 
  justify-content: center;
  width: 38px; 
  height: 38px;
  border-radius: 50%;
  background: var(--upstet-cherry-soft);
  border: 1px solid var(--upstet-cherry);
  color: var(--upstet-cherry-dark) !important;
  transition: background .15s ease, transform .15s ease;
}

.upstet-social-row a:hover { 
  background: var(--upstet-cherry-dark); 
  color: var(--upstet-white) !important; 
  transform: translateY(-2px); 
}

.upstet-social-row svg { 
  width: 18px; 
  height: 18px; 
  fill: currentColor; 
}

.upstet-footer-credit {
  text-align: center;
  font-size: 11.5px;
  color: var(--upstet-cherry-dark);
  padding: 14px 24px 26px;
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
}

.upstet-footer-credit a { 
  color: var(--upstet-cherry-dark) !important; 
  font-weight: 600; 
}

@media (max-width: 900px){
  ul.upstet-footer-columns { 
    grid-template-columns: repeat(2, 1fr); 
  }
}

@media (max-width: 520px){
  ul.upstet-footer-columns { 
    grid-template-columns: 1fr; 
  }

  .upstet-footer-columns-wrap {
    padding: 30px 16px 20px;
  }
}

/* =========================================================
   8. GENERIC PAGE CONTENT
========================================================= */
.upstet-page-content{ 
  max-width: 820px; 
  margin: 0 auto; 
  padding: 10px 24px 60px;
  box-sizing: border-box;
  width: 100%;
}

.upstet-page-content h1{ 
  font-size: clamp(1.5rem, 3vw, 2rem); 
  margin-bottom: 6px;
  padding: 0 8px;
}

.upstet-page-content .upstet-updated{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--upstet-ink-soft);
  margin-bottom: 28px;
  display:block;
  padding: 0 8px;
}

.upstet-page-content h2{ 
  margin-top: 34px; 
  font-size: clamp(1.2rem, 2.5vw, 1.4rem);
  padding: 0 8px;
}

.upstet-page-content ul, .upstet-page-content ol{ 
  padding-left: 22px;
}

.upstet-page-content .upstet-contact-card{
  background: var(--upstet-white);
  border: 1px solid var(--upstet-beige-line);
  border-left: 4px solid var(--upstet-cherry);
  border-radius: var(--upstet-radius);
  padding: 20px 18px;
  margin: 20px 8px;
  box-sizing: border-box;
}

.upstet-page-content .upstet-contact-card a{ 
  font-weight:600;
  word-wrap: break-word;
}

::selection{ background: var(--upstet-cherry-soft); color: var(--upstet-cherry-dark); }

/* =========================================================
   9. LIVE UPDATES TICKER
========================================================= */
.upstet-ticker-wrap{
  display:flex;
  align-items:center;
  gap:14px;
  background: var(--upstet-ink);
  border-bottom: 3px solid var(--upstet-cherry);
  padding: 9px 20px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.upstet-ticker-badge{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.07em;
  color: var(--upstet-white);
  background: var(--upstet-cherry);
  padding: 5px 10px;
  border-radius: 999px;
  white-space:nowrap;
}

.upstet-ticker-badge::before{
  content:"";
  width:7px; height:7px;
  border-radius:50%;
  background: var(--upstet-white);
  animation: upstet-ticker-pulse 1.6s ease-in-out infinite;
}

@keyframes upstet-ticker-pulse{
  0%, 100%{ opacity:1; }
  50%{ opacity:.35; }
}

.upstet-ticker-viewport{
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
}

.upstet-ticker-track{
  display:flex;
  width: max-content;
  animation: upstet-ticker-scroll 34s linear infinite;
}

.upstet-ticker-track.upstet-ticker-track-static{ animation:none; }

.upstet-ticker-list{
  display:flex;
  align-items:center;
  flex: 0 0 auto;
  list-style:none;
  margin:0;
  padding:0 40px 0 0;
  white-space:nowrap;
}

.upstet-ticker-list li{ margin-right:40px; }
.upstet-ticker-list li:last-child{ margin-right:0; }

.upstet-ticker-list a{
  color: var(--upstet-beige-soft) !important;
  font-size: 13px;
  font-weight:500;
  text-decoration:none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upstet-ticker-list a:hover{ 
  color: var(--upstet-white) !important; 
  text-decoration:underline; 
}

.upstet-ticker-empty{
  color: rgba(250,245,233,0.65);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 0 10px;
}

.upstet-ticker-wrap:hover .upstet-ticker-track,
.upstet-ticker-wrap:focus-within .upstet-ticker-track{
  animation-play-state: paused;
}

@keyframes upstet-ticker-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce){
  .upstet-ticker-track{ animation:none; }
  .upstet-ticker-viewport{ overflow-x:auto; }
}

@media (max-width: 700px){
  .upstet-ticker-wrap{ 
    padding: 8px 12px; 
    gap: 10px;
  }

  .upstet-ticker-badge{ 
    font-size: 9px; 
    padding: 3px 8px; 
  }

  .upstet-ticker-list a{ 
    font-size: 12px;
    margin-right: 20px;
  }

  .upstet-ticker-list li{ 
    margin-right: 20px; 
  }
}

/* =========================================================
   10. HOME — QUICK INFO HUB
========================================================= */
.upstet-hub-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 14px;
  align-items:start;
  padding: 0 8px;
}

.upstet-hub-col{
  display:flex;
  flex-direction:column;
  gap: 22px;
}

.upstet-hub-block h3{
  font-size: 1.1rem;
  margin: 0 0 10px;
  color: var(--upstet-cherry-dark);
}

.upstet-hub-block p{ 
  margin: 0 0 12px;
  font-size: 14px;
}

.upstet-hub-block p:last-child{ margin-bottom:0; }
.upstet-hub-block .upstet-btn{ margin-top: 4px; }

.upstet-mini-table{
  width:100%;
  border-collapse: collapse;
  margin: 6px 0 14px;
  font-size: 13px;
}

.upstet-mini-table th, .upstet-mini-table td{
  padding: 8px 10px;
  border-bottom: 1px solid var(--upstet-beige-line);
  text-align:left;
}

.upstet-mini-table thead th{
  background: var(--upstet-beige-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color: var(--upstet-ink-soft);
}

.upstet-division-wrap{
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--upstet-beige-line);
  border-radius: var(--upstet-radius);
  margin-top: 6px;
  -webkit-overflow-scrolling: touch;
}

.upstet-division-wrap table{
  width:100%;
  border-collapse: collapse;
  background: var(--upstet-white);
  font-size: 13px;
}

.upstet-division-wrap thead th{
  position: sticky;
  top:0;
  background: var(--upstet-cherry);
  color: var(--upstet-white);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing:.04em;
  padding: 10px 12px;
  text-align:left;
  z-index:1;
}

.upstet-division-wrap td{
  padding: 10px 12px;
  border-bottom: 1px solid var(--upstet-beige-line);
  vertical-align:top;
  word-wrap: break-word;
}

.upstet-division-wrap td:first-child{
  font-weight:700;
  color: var(--upstet-cherry-dark);
  white-space: normal;
  min-width: 100px;
}

.upstet-division-wrap tbody tr:nth-child(odd){ background: var(--upstet-beige-soft); }
.upstet-division-wrap tbody tr:hover{ background: var(--upstet-cherry-soft); }

@media (max-width: 800px){
  .upstet-hub-grid{ 
    grid-template-columns: 1fr;
    padding: 0 4px;
  }
}

/* =========================================================
   11. HOME — OFFICIAL NOTICES & TRUST CARDS
========================================================= */
.upstet-card .upstet-external-link{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-weight:600;
  word-wrap: break-word;
}

.upstet-trust-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px; height:38px;
  border-radius:50%;
  background: var(--upstet-cherry-soft);
  color: var(--upstet-cherry);
  font-family: var(--font-display);
  font-weight:700;
  margin-bottom:12px;
  flex-shrink: 0;
}

/* =========================================================
   12. HOME — FAQ ACCORDION
========================================================= */
.upstet-faq-list{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap: 12px;
  padding: 0 8px;
}

details.upstet-faq-item{
  background: var(--upstet-white);
  border: 1px solid var(--upstet-beige-line);
  border-left: 4px solid var(--upstet-cherry);
  border-radius: var(--upstet-radius);
  padding: 4px 16px;
  box-shadow: var(--upstet-shadow);
  box-sizing: border-box;
}

details.upstet-faq-item summary{
  cursor:pointer;
  list-style:none;
  padding: 14px 26px 14px 0;
  font-family: var(--font-display);
  font-weight:600;
  font-size: 0.95rem;
  color: var(--upstet-ink);
  position:relative;
  word-wrap: break-word;
}

details.upstet-faq-item summary::-webkit-details-marker{ display:none; }

details.upstet-faq-item summary::after{
  content:"+";
  position:absolute;
  right:0; top:50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight:600;
  color: var(--upstet-cherry);
  transition: transform .15s ease;
  flex-shrink: 0;
}

details.upstet-faq-item[open] summary::after{ content:"–"; }
details.upstet-faq-item summary:hover{ color: var(--upstet-cherry-dark); }

.upstet-faq-answer{ 
  padding: 0 0 18px; 
  color: var(--upstet-ink-soft); 
  font-size: 14px;
  word-wrap: break-word;
}

.upstet-faq-answer p{ margin:0 0 8px; }
.upstet-faq-answer p:last-child{ margin-bottom:0; }
.upstet-faq-answer a{ font-weight:600; }

/* =========================================================
   13. CENTER INNER PAGES & POST CARD CONTAINER (Editorial Style)
========================================================= */

/* Main Site Wrapper setup */
#page,
.grid-container {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

.site-content {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  margin: 40px auto !important; /* Creates smooth vertical space over beige background */
  padding: 0 20px !important;
  max-width: 1000px !important;
  width: 100%;
  box-sizing: border-box;
}

#primary,
.content-area {
  width: 100% !important;
  max-width: 880px !important; /* Clean reading width */
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  min-width: 0;
}

/* Turns the Post Article into a white container/card */
.inside-article,
article.post,
article.page {
  background: var(--upstet-white) !important;
  border-radius: var(--upstet-radius);
  border: 1px solid var(--upstet-beige-line);
  box-shadow: var(--upstet-shadow);
  padding: 48px 56px !important; /* Generous inside breathing room */
  box-sizing: border-box;
}

/* Mobile Adjustments for Card View */
@media (max-width: 768px) {
  .site-content {
    margin: 16px auto !important;
    padding: 0 10px !important;
  }
  
  .inside-article,
  article.post,
  article.page {
    padding: 24px 18px !important; /* Compact padding on phones */
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .site-content {
    margin: 12px auto !important;
    padding: 0 8px !important;
  }
  
  #primary,
  .content-area {
    max-width: 100% !important;
  }
  
  .inside-article,
  article.post,
  article.page {
    padding: 16px 12px !important;
    border-radius: 6px;
  }
}
/* =========================================================
   14. MOBILE IMAGE RESPONSIVENESS FIX
   Prevents images from cropping or overflowing on mobile screens
========================================================= */

/* General Responsive Image Safeguard */
img,
.wp-block-image img,
.entry-content img,
.post-image img {
  max-width: 100% !important;
  height: auto !important;
}

/* Fix cropped images inside post containers on Mobile */
@media (max-width: 768px) {
  
  /* Reset fixed container heights causing crops */
  .post-image,
  .entry-content .wp-block-image,
  .featured-image {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Prevent image object clipping */
  .post-image img,
  .entry-content img,
  .featured-image img,
  .wp-block-image img {
    object-fit: contain !important; /* Preserves entire image without cropping top/bottom */
    max-height: 80vh;               /* Keeps ultra-tall vertical banners reasonable on mobile screens */
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
  }
}
/* Footer logo styling */
.upstet-footer-logo {
	text-align: center;
	margin: 30px 0;
	padding: 20px 0;
	border-top: 1px solid #ddd;
	border-bottom: 1px solid #ddd;
}

.upstet-footer-logo img {
	max-width: 150px;
	height: auto;
	display: inline-block;
}