/* =========================================================================
   GENERATEPRESS OVERRIDES
   -------------------------------------------------------------------------
   Baseline customizations of GeneratePress's native classes. These make a
   freshly activated child theme look finished before any demo content or
   GenerateBlocks elements exist.

   Enqueued AFTER style.css (which holds the design tokens) and BEFORE
   custom.css (per-site overrides).

   SCOPE RULE: this file contains GeneratePress-native class overrides only.
   Project components (.cws-*, .ctc-*, .cotlas-*) live in style.css.

   1. GENERATEPRESS PARENT OVERRIDES
      1.1 Global container
      1.2 Site header
      1.3 Main + secondary navigation
      1.4 Content area, sidebars, entry header, entry meta
      1.5 Buttons / inputs
      1.6 Widget headings
   2. SEARCH FORM
   3. SINGLE POST + POST NAVIGATION
   4. STICKY / MOBILE LOGO SIZING
   ========================================================================= */

/* =========================================================================
   1. GENERATEPRESS PARENT OVERRIDES
   -------------------------------------------------------------------------
   GeneratePress ships its own layout classes (.grid-container, .site-header,
   .inside-header, .site-content, .main-navigation, etc.). We DO NOT remove
   them â€” we remap them onto our tokens and primitives so that:
     - GP's native header / content / sidebar inherit our design system.
     - Sites that use GP's default markup look consistent with our patterns.

   Rules of engagement:
     - Never wp_dequeue_style('generate-style').
     - Override only what is needed; leave GP's behaviour untouched.
     - Use tokens (var(--cws-*)) so a re-brand in custom.css reaches GP's
       own classes too.
   ========================================================================= */

/* ---------- 1.1 GLOBAL CONTAINER (GP .grid-container) ---------- */
/* GP hardcodes max-width:1200px. We push it to our token and match the
   same horizontal padding as .cws-container so ALL containers align. */
.grid-container {
  max-width: var(--cws-container-width);
  padding-left: var(--cws-container-padding);
  padding-right: var(--cws-container-padding);
  box-sizing: border-box;
}
.nav-below-header .main-navigation .inside-navigation.grid-container, .nav-above-header .main-navigation .inside-navigation.grid-container {
    padding-left: var(--cws-container-padding);
    padding-right: var(--cws-container-padding);
}
.secondary-nav-below-header .secondary-navigation .inside-navigation.grid-container, .secondary-nav-above-header .secondary-navigation .inside-navigation.grid-container {
    padding-left: var(--cws-container-padding);
    padding-right: var(--cws-container-padding);
}
/* GP's content-layout switch: "separate containers" uses an off-white page
   background so white content cards stand out. */
body.separate-containers {
  background-color: var(--cws-color-alt-bg);
}

/* GP wraps the footer copyright shortcode in this div. */
.copyright-bar {
  font-size: var(--cws-font-size-sm);
}

.footer-widgets {
    background-color: var(--cws-color-bg);
    border-top: 1px solid var(--cws-color-border);
    margin-top: var(--cws-space-md);
    padding-top: var(--cws-space-md);
    padding-bottom: var(--cws-space-md);
}
.footer-widgets .footer-widgets-container {
    padding: var(--cws-container-padding);
}

.site-info {
  background-color: var(--cws-color-bg);
  color: var(--cws-color-text);
  border-top: 1px solid var(--cws-color-border);
}  
.site-info .grid-container {
  padding-top: var(--cws-space-sm);
  padding-bottom: var(--cws-space-sm);
}
/* GP's .container.grid-container width:auto override â€” keep but normalise */
.container.grid-container {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
/* =========================================================================
   FOOTER MENU (Two Columns)
   ========================================================================= */

/* 1. Target the wrapper you added */

/* 2. Target the actual list inside the widget */

/* 3. Style the individual list items */

/* 4. Style the links to fit the footer */

/* 5. Mobile Responsive: Drop back to 1 column on small screens */

/* ---------- 1.2 SITE HEADER (.site-header / .inside-header) ---------- */
/* Make GP's native header use the same flex row layout as .cws-row. */
.site-header {
  background-color: var(--cws-color-bg);
  position: relative;
  width: 100%;
}

.inside-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--cws-space-md);
  padding-top: var(--cws-space-xs);
  padding-bottom: var(--cws-space-xs);
}
/* 1. Keep the logo at its natural size */
.inside-header .site-logo {
  flex: 0 1 auto; /* Don't grow, allow shrink, natural width */
  max-width: 50%; /* Prevent the logo from getting too huge */
}

/* 2. Make the ad block take up the rest of the space */
.inside-header .header-right {
  flex: 1 1 auto; /* Grow to fill the remaining space */
  display: flex;
  justify-content: flex-end; /* Push the ad to the right side */
  min-width: 0; /* Crucial: prevents Flexbox from breaking when contents are wide */
}
/* ---------- 1.3 MAIN NAVIGATION (.main-navigation) ---------- */
/* Align GP's native menu bar with our .cws-menu look. */
.main-navigation,
.main-navigation ul ul {
  background-color: var(--cws-color-bg);
}

.main-navigation {
  z-index: 100;
  padding: 0;
  clear: both;
  display: block;
  border-top: 0px solid var(--cws-color-border);
  border-bottom: 1px solid var(--cws-color-border);
}

.main-navigation a {
  color: var(--cws-color-text);
  font-weight: 600;
  font-size: var(--cws-font-size-base);
}
.main-navigation .main-nav ul li a, .main-navigation .menu-toggle, .main-navigation .menu-bar-items {
   color: var(--cws-color-text);
   font-weight: 700;
   font-size: var(--cws-font-size-base);
}
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
    color: var(--cws-color-text);
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--cws-color-accent);
}
.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a, .main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a, .main-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a, .main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a {
    color: var(--cws-color-accent);
}
.main-navigation .menu-bar-items {
    display: flex;
    align-items: center;
    font-size: 15px;
    align-content: center;
    justify-content: flex-end;
}
.main-navigation .menu-bar-item>a {
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 8px;
    line-height: 45px;
}
.main-navigation .menu-bar-item svg {
    height: 1.4em;
    width: 1.4em;
}
@media (max-width: 1024px), (min-width: 1025px) {
    .main-navigation.sticky-navigation-transition .main-nav > ul > li > a, .sticky-navigation-transition .menu-toggle, .main-navigation.sticky-navigation-transition .menu-bar-item > a, .sticky-navigation-transition .navigation-branding .main-title {
        line-height: 45px;
    }
}
/* GP's mobile menu trigger inherits row spacing */
.mobile-menu-control-wrapper {
  display: none;
  margin-left: auto;
  align-items: center;
}
.secondary-navigation {
    background-color: var(--cws-color-bg);
    border-bottom: 1px solid var(--cws-color-border);
}
.secondary-navigation .main-nav ul li a, .secondary-navigation .menu-toggle, .secondary-menu-bar-items .menu-bar-item > a {
    color: var(--cws-color-text);
    font-weight: 700;
    font-size: var(--cws-font-size-sm);
}
.secondary-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a, .secondary-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a, .secondary-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a, .secondary-menu-bar-items .menu-bar-item:hover > a {
    color: var(--cws-color-link-hover);
    background-color: var(--cws-color-alt-bg);
}
.secondary-navigation .inside-navigation {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* Remove row-reverse so things sit naturally from left to right */
    flex-direction: row; 
    gap: var(--cws-space-sm);
}
/* 1. Date/Time (First Item) */
.secondary-navigation .cws-date-time {
    order: 1;
    flex: 0 0 auto;
}

/* 2. Menu (Middle Item) */
.secondary-navigation .main-nav {
    order: 2;
    flex: 1 1 auto; /* This makes the menu stretch to fill the empty space */
}

/* 3. Social Icons (Last Item) */
.secondary-navigation .cws-top-social {
    order: 3;
    flex: 0 0 auto;
}

/* Reset the menu toggle button (hamburger) so it sits nicely on mobile */
.secondary-navigation .menu-toggle {
    order: 4;
    margin-left: auto;
}
/* Current date time styling */

/* ---------- 1.4 CONTENT AREA (.site-content) ---------- */
/* GP uses .site-content as a flex row: .content-area (70%) + .sidebar (30%).
   We keep that but wire in our spacing tokens and make sure it collapses
   on mobile (GP does not always do that by default). */
.separate-containers .site-content {
  display: flex;
  gap: var(--cws-space-md);
  word-wrap: break-word;
}

/* Prevent flex items from overflowing their containers */
.separate-containers .site-content .content-area,
.separate-containers .site-content .is-left-sidebar,
.separate-containers .site-content .is-right-sidebar {
  min-width: 0; 
}
.one-container .site-content {
  display: flex;
  gap: var(--cws-space-md);
  word-wrap: break-word;
}

/* Prevent flex items from overflowing their containers */
.one-container .site-content .content-area,
.one-container .site-content .is-left-sidebar,
.one-container .site-content .is-right-sidebar {
  min-width: 0; 
}
/* --- DESKTOP ONLY (769px and up) --- */
@media (min-width: 769px) {
  
  /* 1. SINGLE SIDEBAR LAYOUTS (Content/Sidebar OR Sidebar/Content) */
  /* Uses the default --cws-space-md gap */
  .right-sidebar .site-content .content-area,
  .left-sidebar .site-content .content-area {
    flex: 1 1 calc(var(--cws-content-width-single) - var(--cws-space-md));
  }

  .right-sidebar .site-content .is-right-sidebar,
  .left-sidebar .site-content .is-left-sidebar {
    flex: 0 0 calc(var(--cws-sidebar-width-single) - (var(--cws-space-md) / 2));
  }

  /* 2. BOTH SIDEBARS LAYOUTS (Sidebar/Content/Sidebar) */
  /* NEW: Override the gap for the wrapper */
  .both-sidebars .site-content {
    gap: var(--cws-gap-both-sidebars); 
  }

  .both-sidebars .site-content .content-area {
    /* Math now uses the smaller gap variable */
    flex: 1 1 calc(var(--cws-content-width-both) - var(--cws-gap-both-sidebars));
  }

  .both-sidebars .site-content .is-left-sidebar {
    flex: 0 0 calc(var(--cws-sidebar-left-both) - (var(--cws-gap-both-sidebars) / 3));
  }

  .both-sidebars .site-content .is-right-sidebar {
    flex: 0 0 calc(var(--cws-sidebar-right-both) - (var(--cws-gap-both-sidebars) / 3));
  }

  /* 3. NO SIDEBAR LAYOUT */
  .no-sidebar .site-content .content-area {
    width: 100%;
    flex: 1 1 100%;
  }
}

/* --- MOBILE / TABLET DEFAULTS (768px and below) --- */
@media (max-width: 768px) {
  .site-content {
    flex-direction: column;
  }
  
  .site-content .content-area,
  .site-content .is-left-sidebar,
  .site-content .is-right-sidebar {
    width: 100% !important;
    flex: 1 1 auto !important;
  }
}
.one-container.right-sidebar .site-main, .one-container.both-right .site-main {
    margin-right: 0;
}
.separate-containers .site-main {
    margin: 0px;
    margin-top: var(--cws-space-lg);
    margin-bottom: var(--cws-space-md);
}
.one-container .site-main {
    margin: 0px;
    margin-top: var(--cws-space-lg);
    margin-bottom: var(--cws-space-md);
}
.container .site-main {
    margin: 0px;
    margin-top: 0;
    margin-bottom: 0;
}
.separate-containers .inside-right-sidebar, .separate-containers .inside-left-sidebar {
    margin-top: var(--cws-space-lg);
    margin-bottom: var(--cws-space-md);
}
.one-container .inside-right-sidebar, .one-container .inside-left-sidebar, .one-container .site-content .content-area {
    margin-top: var(--cws-space-xs);
    margin-bottom: var(--cws-space-xs);
}
.page .site-content .content-area {
    margin-top: 0;
    margin-bottom: 0;
}
/* ---------- GENERATEPRESS CONTENT CARDS ---------- */
.separate-containers .inside-article, 
.separate-containers .comments-area, 
.separate-containers .page-header, 
.separate-containers .paging-navigation,
.separate-containers .cws-related-posts,
.inside-page-header {
  padding: var(--cws-padding-card);
  border-radius: var(--cws-radius-md);
}

.one-container .site-content {
    padding: var(--cws-container-padding);
    
}
.separate-containers .inside-article {
  background-color: var(--cws-color-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.one-container .inside-article {
    background-color: var(--cws-color-bg);
    border: 1px solid var(--cws-color-border);
    border-radius: var(--cws-radius-md);
}
.blog.separate-containers .inside-article {
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin: 0;
}
.blog.separate-containers .inside-article:hover {
    background-color: var(--cws-color-bg);
    border-color: var(--cws-color-border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
.blog.one-container .inside-article {
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin: 0;
}
.blog.one-container .inside-article:hover {
    background-color: var(--cws-color-bg);
    border-color: var(--cws-color-border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
.one-container .inside-article {
    background-color: var(--cws-color-bg);
    border: 0px solid var(--cws-color-border);
    border-radius: var(--cws-radius-md);
}
.page .inside-article {
    background-color: var(--cws-color-bg);
    border: 0px solid var(--cws-color-border);
    border-radius: var(--cws-radius-md);
}
/* ---------- SIDEBAR WIDGETS ---------- */
.widget-area .widget {
  padding-top: var(--cws-space-md);
  padding-bottom: var(--cws-space-md);
  border-radius: var(--cws-radius-md);
}
/* ---------- COMPACT PADDING FOR 2-SIDEBAR LAYOUTS ---------- */
/* Only applies on Desktop. Mobile defaults to the normal padding above. */
@media (min-width: 769px) {
  
  .both-sidebars .widget-area .widget {
    padding: var(--cws-padding-widget-compact);
  }

  /* 1. Standard Pages & Single Posts (No columns) */
  .both-sidebars .inside-article, 
  .both-sidebars .comments-area, 
  .both-sidebars .page-header, 
  .both-sidebars .paging-navigation, 
  .both-sidebars .one-container .site-content, 
  .both-sidebars .inside-page-header {
    padding: var(--cws-padding-card-compact);
  }

  /* 2. Archive & Blog Pages (Using GeneratePress Columns) */
  /* !important is required to override GP's inline column CSS */
  .both-sidebars .generate-columns .inside-article {
    padding: var(--cws-padding-card-compact) !important;
  }
  
}

.sidebar .widget, .page-header, .widget-area .main-navigation, .site-main > * {
    margin-bottom: var(--cws-space-md);
}
.site-main > * {
    margin-bottom: var(--cws-space-md);
}
.sidebar .widget {
    background-color: var(--cws-color-bg);
}
/* ---------- 1.5 ENTRY HEADER (.entry-header) ---------- */
.entry-header {
  word-wrap: break-word;
  margin-top: var(--cws-space-md);
  margin-bottom: var(--cws-space-xs); 
}
.page .entry-content {
  margin-top: var(--cws-space-lg);
  margin-bottom: var(--cws-space-md);
}
.one-container .page-header {
    word-wrap: break-word;
    margin-top: 0;
    margin-bottom: var(--cws-space-md);
}
.entry-header .entry-title {
    font-size: var(--cws-font-size-h4);
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: var(--cws-space-xs);
}
.page .entry-header .entry-title {
    font-size: var(--cws-font-size-h1);
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: var(--cws-space-xs);
}
.page .entry-content:not(:first-child), .page .entry-summary:not(:first-child), .page .page-content:not(:first-child) {
    font-family: var(--cws-font-body);
    font-size: var(--cws-font-size-base);
    color: var(--cws-color-text);
    background-color: var(--cws-color-bg);
    line-height: var(--cws-line-height-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin-bottom: var(--cws-space-md);
}
.entry-summary {
    display:none;
}
.generate-columns .entry-content {
    display:none;
}
.entry-title a:hover {
    color: var(--cws-color-link-hover);
}
.generate-columns .inside-article .post-image img { /* ---------- POST IMAGES (4:3 Landscape Ratio) ---------- */
  /* Maintain your custom rounded corners */
  border-radius: var(--cws-radius-sm);
  
  /* Force 4:3 Aspect Ratio */
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  
  /* Crop the image neatly to fill the 4:3 box */
  object-fit: cover;
  object-position: center;
  
  /* Ensure it behaves nicely in the layout */
  display: block;
}

/* ---------- 1.6 BUTTONS / INPUTS (GP defaults â†’ our tokens) ---------- */
/* Optional but useful: make GP's default buttons/inputs match our tokens. */
button,
input[type="submit"],
input[type="button"],
.button {
  background-color: var(--cws-color-accent); /* Bright Yellow */
  color: var(--cws-color-primary);            /* Dark Navy text for contrast */
  border: 0;
  border-radius: var(--cws-radius-sm);
  padding: 0.6em 1.2em;
  font-family: var(--cws-font-body);
  font-weight: 700; /* Bolder font looks better on yellow */
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.button:hover {
  background-color: var(--cws-color-primary); /* Invert to dark navy */
  color: #ffffff;                             /* White text */
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
  border: 1px solid var(--cws-color-border);
  border-radius: var(--cws-radius-sm);
  padding: 0.5em 0.75em;
  font-family: var(--cws-font-body);
  font-size: var(--cws-font-size-base);
  background: var(--cws-color-bg);
  color: var(--cws-color-text);
}
/* ---------- 1.7 Widget headings ---------- */

/* ---------- SIDEBAR WIDGET HEADINGS ---------- */
.sidebar .widget .wp-block-heading, 
.widget-area .widget .wp-block-heading {
  font-size: var(--cws-widget-heading-font-size);
  font-weight: var(--cws-widget-heading-font-weight);
  margin-bottom: var(--cws-widget-heading-margin-bottom);
  color: var(--cws-widget-heading-color);
  background-color: var(--cws-widget-heading-background-color);
  
  /* Padding - using your tokens */
  padding-top: var(--cws-widget-heading-padding-y);
  padding-bottom: var(--cws-widget-heading-padding-y);
  padding-left: var(--cws-widget-heading-padding-x);
  padding-right: var(--cws-widget-heading-padding-x);
  
  /* The 25px Pill Radius */
  border-radius: var(--cws-radius-rounded);
  
  /* Layout refinements for the pill shape */
  display: inline-block; /* Keeps it full-width in the sidebar */
  line-height: 1.2;
  text-transform: capitalize;
    letter-spacing: 0.05em;
    text-align: start;
}
/* ---------- WIDGET HEADING CHEVRON ---------- */
.sidebar .widget .wp-block-heading::after, 
.widget-area .widget .wp-block-heading::after {
  content: "";
  display: inline-block;
  width: 1em;  /* Size matches the font size */
  height: 1em; /* Size matches the font size */
  margin-left: 8px;
  vertical-align: middle;
  background-color: currentColor;
  
  /* The cleaned-up SVG encoded as a mask so it takes on the text color */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 411.6 411.6'%3E%3Cpath d='M409.2,200.2l-156-156c-3.2-3.2-8-3.2-11.2,0c-3.2,3.2-3.2,8,0,11.2l142.4,142.4H55.6c-4.4,0-8,3.6-8,8c0,4.4,3.6,8,8,8 h328.8L242,356.2c-3.2,3.2-3.2,8,0,11.2c1.6,1.6,3.6,2.4,5.6,2.4s4-0.8,5.6-2.4l156-156C412.4,208.2,412.4,203.4,409.2,200.2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 411.6 411.6'%3E%3Cpath d='M409.2,200.2l-156-156c-3.2-3.2-8-3.2-11.2,0c-3.2,3.2-3.2,8,0,11.2l142.4,142.4H55.6c-4.4,0-8,3.6-8,8c0,4.4,3.6,8,8,8 h328.8L242,356.2c-3.2,3.2-3.2,8,0,11.2c1.6,1.6,3.6,2.4,5.6,2.4s4-0.8,5.6-2.4l156-156C412.4,208.2,412.4,203.4,409.2,200.2z'/%3E%3C/svg%3E");
  
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* =========================================================================
   2. SEARCH FORM (Matching Widget Heading Style)
   ========================================================================= */

/* Hide the visible search label in the sidebar (widget heading supplies it). */
.widget-area .wp-block-search__label {
  font-size: var(--cws-widget-heading-font-size);
  font-weight: var(--cws-widget-heading-font-weight);
  margin-bottom: var(--cws-widget-heading-margin-bottom);
  color: var(--cws-widget-heading-color);
  background-color: var(--cws-widget-heading-background-color);
  
  padding-top: var(--cws-widget-heading-padding-y);
  padding-bottom: var(--cws-widget-heading-padding-y);
  padding-left: var(--cws-widget-heading-padding-x);
  padding-right: var(--cws-widget-heading-padding-x);
  
  border-radius: var(--cws-radius-rounded);
  
  display: block;
  line-height: 1.2;
  text-transform: capitalize;
  letter-spacing: 0.05em;
  text-align: start;
  
  /* Add the chevron arrow to match other widgets */
  position: relative; 
}

/* 2. The Search Bar Wrapper */
.widget-area .wp-block-search__inside-wrapper {
  display: flex;
  flex-wrap: nowrap;
  background-color: var(--cws-color-bg);
  border: 1px solid var(--cws-color-border);
  border-radius: var(--cws-radius-rounded); /* Pill shape */
  overflow: hidden; /* Keeps the button inside the rounded corners */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Focus state for the whole wrapper */
.widget-area .wp-block-search__inside-wrapper:focus-within {
  border-color: var(--cws-color-primary);
  box-shadow: 0 0 0 1px var(--cws-color-primary);
}

/* 3. The Input Field */
.widget-area .wp-block-search__input {
  flex: 1 1 auto;
  border: none !important; /* Remove default WP border */
  background: transparent !important;
  padding: 10px 15px;
  font-size: var(--cws-font-size-base);
  color: var(--cws-color-text);
  outline: none !important;
  box-shadow: none !important; /* Remove default WP focus ring */
}

/* 4. The Submit Button */
.widget-area .wp-block-search__button {
  flex: 0 0 auto;
  background-color: var(--cws-color-accent) !important; /* Yellow */
  color: var(--cws-color-primary) !important; /* Dark Navy text */
  border: none !important;
  border-radius: 0 !important; /* Let the wrapper handle the rounding */
  padding: 0 var(--cws-space-md) !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  margin: 0 !important; /* Remove WP's default margin */
}

/* Button Hover */
.widget-area .wp-block-search__button:hover {
  background-color: var(--cws-color-primary) !important;
  color: var(--cws-color-bg) !important;
}

/* 5. Add the chevron arrow to the Search Label */
.widget-area .wp-block-search__label::after {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 8px;
  vertical-align: middle;
  background-color: currentColor;
  
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 411.6 411.6'%3E%3Cpath d='M409.2,200.2l-156-156c-3.2-3.2-8-3.2-11.2,0c-3.2,3.2-3.2,8,0,11.2l142.4,142.4H55.6c-4.4,0-8,3.6-8,8c0,4.4,3.6,8,8,8 h328.8L242,356.2c-3.2,3.2-3.2,8,0,11.2c1.6,1.6,3.6,2.4,5.6,2.4s4-0.8,5.6-2.4l156-156C412.4,208.2,412.4,203.4,409.2,200.2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 411.6 411.6'%3E%3Cpath d='M409.2,200.2l-156-156c-3.2-3.2-8-3.2-11.2,0c-3.2,3.2-3.2,8,0,11.2l142.4,142.4H55.6c-4.4,0-8,3.6-8,8c0,4.4,3.6,8,8,8 h328.8L242,356.2c-3.2,3.2-3.2,8,0,11.2c1.6,1.6,3.6,2.4,5.6,2.4s4-0.8,5.6-2.4l156-156C412.4,208.2,412.4,203.4,409.2,200.2z'/%3E%3C/svg%3E");
  
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
/* Add spacing since the label is hidden */
.widget-area .wp-block-search {
  margin-bottom: 0; /* Remove default bottom margin */
}

.widget-area .wp-block-search__inside-wrapper {
  margin-top: var(--cws-space-xs); /* Adds a little breathing room at the top */
}
.post-image-above-header .inside-article .featured-image, .post-image-above-header .inside-article .post-image {
    margin-top: 0;
    margin-bottom: var(--cws-space-xs);
}
.post-image img {
    border-radius: var(--cws-space-xs);
}
.entry-title {
    margin-bottom: 0;
}
.entry-meta.post-views {
  display: flex;
  flex-direction: row;
  justify-content: start;
}
.entry-meta {
    color: var(--cws-color-muted);
}
.entry-meta {
    display: flex;
    flex-direction: row;
    margin-top: auto;
    align-content: center;
    justify-content: space-between;
    align-items: center;
}
.generate-columns .entry-meta {
    display: flex;
    margin-top: auto;
    flex-direction: column;
    align-items: flex-start;
}
.entry-meta a{
    color: var(--cws-color-red);
}
footer.entry-meta {
    margin-top: var(--cws-space-xs);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
@media (max-width: 768px) {
    .entry-meta {
        display: flex;
        flex-direction: column;
    }
}
/* ---------- 1.6 BUTTONS & INPUTS ---------- */

/* Apply only to the front-end site, avoiding the Customizer completely */
.site button,
.site input[type="button"],
.site input[type="reset"],
.site input[type="submit"],
.site a.button,
.site a.wp-block-button__link:not(.has-background) {
  background-color: var(--cws-color-accent);
  color: var(--cws-color-primary);
  border: none;
  border-radius: var(--cws-radius-rounded); /* Pill shape */
  padding: 0.6em 1.5em; /* Extra horizontal padding for the pill look */
  font-family: var(--cws-font-body);
  font-weight: 700 ;
  font-size: var(--cws-font-size-base);
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

/* Hover & Focus States */
.site button:hover,
.site input[type="button"]:hover,
.site input[type="reset"]:hover,
.site input[type="submit"]:hover,
.site a.button:hover,
.site button:focus,
.site input[type="button"]:focus,
.site input[type="reset"]:focus,
.site input[type="submit"]:focus,
.site a.button:focus,
.site a.wp-block-button__link:not(.has-background):active,
.site a.wp-block-button__link:not(.has-background):focus,
.site a.wp-block-button__link:not(.has-background):hover {
  background-color: var(--cws-color-link-hover); /* Green hover */
  color: #ffffff ;
  border-radius: var(--cws-radius-rounded); 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); 
  outline: none;
}
/* Single post modifications */
.single .entry-header .entry-title {
    font-size: var(--cws-font-size-h2);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: var(--cws-space-xs);
}
.single.one-container .inside-article .featured-image {
    margin-bottom: var(--cws-space-md);
    margin-top: var(--cws-space-md);
}
.single.one-container .inside-article .featured-image img{
    border-radius: var(--cws-radius-md);
    width: 100%;
    aspect-ratio: 3 / 2;
    height: auto;
    object-fit: cover;
    object-position: center center;
    display: block;
    border-radius: var(--cws-radius-sm);
}
.single.separate-containers .inside-article .featured-image {
    margin-bottom: var(--cws-space-md);
    margin-top: var(--cws-space-md);
}
.single.separate-containers .inside-article .featured-image img{
    border-radius: var(--cws-radius-md);
    width: 100%;
    aspect-ratio: 3 / 2;
    height: auto;
    object-fit: cover;
    object-position: center center;
    display: block;
    border-radius: var(--cws-radius-sm);
}
.single .entry-content p {
  font-size: var(--cws-font-size-md);
}
/* =========================================================================
   POST NAVIGATION (Previous / Next)
   ========================================================================= */

/* 1. The Container: Flexbox for 2 columns */
.post-navigation {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
  gap: var(--cws-space-md);
  margin-top: var(--cws-space-lg);
  padding-top: var(--cws-space-md);
  border-top: 1px solid var(--cws-color-border);
}

/* 2. The Individual Columns (Previous and Next) */
.post-navigation .nav-previous,
.post-navigation .nav-next {
  display: flex;
  flex-direction: column;
  flex: 1 1 calc(50% - var(--cws-space-md)); /* 50% width minus half the gap */
  
  /* Make them look like clickable cards */
  background-color: var(--cws-color-bg);
  border: 1px solid var(--cws-color-border);
  border-radius: var(--cws-radius-md);
  padding: var(--cws-space-md);
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

/* Hover effect for the whole card */
.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
  border-color: var(--cws-color-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* 3. Align Text: Left for Previous, Right for Next */
.post-navigation .nav-previous { text-align: left; }
.post-navigation .nav-next { text-align: right; }

/* 4. Hide the default SVG arrows (we'll add our own text labels) */
.post-navigation .gp-icon {
  display: none;
}

/* 5. Add "Previous Post" and "Next Post" Labels using CSS */
.post-navigation .nav-previous::before {
  content: "â† Previous Post";
  display: block;
  font-size: var(--cws-font-size-sm);
  font-weight: 700;
  color: var(--cws-color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--cws-space-xs);
}

.post-navigation .nav-next::before {
  content: "Next Post â†’";
  display: block;
  font-size: var(--cws-font-size-sm);
  font-weight: 700;
  color: var(--cws-color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--cws-space-xs);
}

/* 6. Style the Post Titles (The Links) */
.post-navigation .nav-previous a, .post-navigation .nav-next a {
    font-family: var(--cws-font-heading);
    font-size: var(--cws-font-size-h6);
    font-weight: 600;
    color: var(--cws-color-text);
    text-decoration: none;
    line-height: 1.6;
    transition: color 0.2s ease;
}

.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover {
  color: var(--cws-color-primary);
}

/* 7. Mobile & Tablet Responsive (Stack them on smaller screens) */
@media (max-width: 768px) {
  .post-navigation {
    flex-direction: column;
    gap: var(--cws-space-sm);
  }
  
  .post-navigation .nav-previous,
  .post-navigation .nav-next {
    flex: 1 1 100%;
    width: 100%;
    /* Reset the text alignment so it reads naturally on mobile */
     
  }
}
.navigation-branding img, .site-logo.mobile-header-logo img {
    max-width: 100%;
    height: 70px;
}
@media (max-width: 1024px), (min-width: 1025px) {
    .main-navigation.sticky-navigation-transition .site-logo img, .main-navigation.sticky-navigation-transition .navigation-search input[type="search"], .main-navigation.sticky-navigation-transition .navigation-branding img {
        height: 70px;
    }
}

/* 1. Style the Label to look like the Widget Heading Pill */
.widget-area .wp-block-search__label {
  display: none; 
}
.site-footer .footer-widgets-container .inside-footer-widgets {
    margin-left: 0px;
}
.site-footer .footer-widgets-container .inner-padding {
    padding: 0px 20px 0 0;
}
@media (min-width: 1025px) {
    .inside-right-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 10px; /* Adjust this value to leave space below your header */
    }
}

.generate-columns .entry-header .entry-title {
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;                /* Hides the text beyond line 2 */
    text-overflow: ellipsis;         /* Adds the ... at the end */
    /* Optional: Ensure the font size doesn't cause weird breaks */
    font-size: var(--cws-font-size-h5); 
    font-weight: 600;
    line-height: 1.6; 
}
/* ---------- GENERATEPRESS CONTENT CARDS (one-container / archive) ---------- */
/* Uses the normal card padding; the compact variant is applied only inside
   .both-sidebars (see the 2-sidebar block above). */
.one-container .generate-columns .inside-article,
.one-container .comments-area,
.one-container .paging-navigation,
.inside-page-header {
  padding: var(--cws-padding-card);
  border-radius: var(--cws-radius-md);
  border: 1px solid var(--cws-color-border);
}
.main-navigation, .main-navigation ul ul {
    background-color: var(--cws-color-primary);
}
@media (max-width: 768px) {
    .main-navigation, .main-navigation ul ul {
        background-color: var(--cws-color-bg);
    }
}
.main-navigation.slideout-navigation {
  background-color: var(--cws-color-bg);
}
.main-navigation .main-nav ul li a, .main-navigation .menu-toggle, .main-navigation .menu-bar-items {
   color: var(--cws-color-bg);
   font-weight: 700;
   font-size: var(--cws-font-size-base);
}
@media (max-width: 768px) {
    .main-navigation .main-nav ul li a, .main-navigation .menu-toggle, .main-navigation .menu-bar-items {
        color: var(--cws-color-primary);
    }
}
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
    color: var(--cws-color-bg);
}
a.generate-back-to-top {
    background-color: var(--cws-color-primary);
    color: var(--cws-color-accent);
    bottom: 75px;
}
a.generate-back-to-top:hover, a.generate-back-to-top:focus {
    background-color: var(--cws-color-accent);
    color: var(--cws-color-primary);
}
.cws-search {
    width: 100%;
}