/*
Theme Name: Twenty Twenty-One Child
Template: twentytwentyone
*/
/* ========= THEME (match look/feel) ========= */
:root{
  --mh-primary:#3498db;            /* Primary accent (buttons/links) */
  --mh-primary-600:#2d86c2;        /* Hover/darker shade */
  --mh-dark:#2c3e50;               /* Header/footer/nav background */
  --mh-dark-700:#243645;           /* Slightly darker on hover */
  --mh-body:#ffffff;               /* Page background */
  --mh-text:#2a2a2a;               /* Body text */
  --mh-muted:#6c757d;              /* Muted/secondary text */
  --mh-light:#f7f9fb;              /* Light section background */
  --mh-border:#e6eaf0;             /* Subtle borders */
  /* Override Twenty Twenty-One body variables */
  --global--color-background: #0b1f33;
  --global--color-primary: #000;
  --global--font-primary: "Inter", Arial, sans-serif;
  --heading--font-size-h1: 2.25rem;
  --heading--font-size-h2: 1.5rem;
  --heading--font-size-h3: 0.8rem;
  --entry-header--color: #000;
  --entry-header--color-link: #000;
  --entry-header--color-hover: #050505;
  --entry-header--font-size: 1rem;
  --global--spacing-horizontal: 25px;
  --responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), 800px);
  --responsive--alignwide-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), 800px);
  --responsive--alignfull-width:100%;
  --footer--color-link: #000;
  --footer--color-link-hover:#050505;
  --global--spacing-vertical: 10px;
  --global--spacing-horizontal: 5px;
  --global--font-size-page-title: 1.5rem;
  --global--font-size-xs: 1rem;
  --bs-link-color-rgb: #000;
  --bs-navbar-active-color: rgba(var(--bs-emphasis-color-rgb), 1) !important;
  --bs-emphasis-color-rgb: rgb(45, 134, 194) !important;
  --bs-btn-hover-color: #fff;
  --bs-link-hover-color-rgb: #2d86c2;
  --bs-btn-bg:#3498db !important;
  --bs-btn-border-color:#3498db !important;
  --bs-btn-hover-bg:#2d86c2;
  --bs-btn-hover-border-color:#2d86c2;
  --bs-btn-active-bg:#2d86c2;
  --bs-btn-active-border-color:#2d86c2;
    
  .btn:hover {
    color:#fff;
    background-color: #2d86c2;
    border-color: #2d86c2;
  }

  .row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0;
  }
  
  .ftw {
    font-weight:bold;
    color: #333;
  }

  @media (min-width:1280px){
    .ftw {
      padding-left:40px;
    }
  }
  
  .image-link-wrapper {
      position: relative;
  }

  .image-link-wrapper img {
      width: 100%;
      display: block;
  }

  .image-overlay-link {
      position: absolute;
      top: 76%;
      left: 13%;
      width: 75%;
      height: 16%;
      display: block;
  }
    
  .shadow-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22.2026px;
    gap: 22.2px;
    /*    
    position: absolute;
    width: 280px;
    height: 268.9px;
    left: 1605px;
    top: 298.31px;
    */
    background: #FFFFFF;
    box-shadow: -4.93392px -2.46696px 4.93392px rgba(0, 0, 0, 0.1), 2.46696px 2.46696px 4.93392px rgba(0, 0, 0, 0.1);
    border-radius: 14.8018px;
   }
  
  .widget a {
      text-decoration:none;
  }
  
  /* Related Articles Section */
  .related-articles {
      margin-top: 3rem;
      padding-top: 2rem;
      border-top: 1px solid #eee;
  }
  
  .widget a:hover, .widget a:active {
    color:#0380B0;
    font-weight:500;
  }

  .related-articles h3 {
      margin-bottom: 1.5rem;
  }

  .related-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 20px;
  }

  .related-item {
      background: #fff;
      padding: 15px;
      box-shadow: 0 4px 15px rgba(0,0,0,0.12);
      border-radius: 8px;
      height: fit-content;
  }

  .related-item img {
      height: auto;
      border-radius: 6px;
  }

  .related-item h4 {
      margin: 12px 0 8px;
  }

  .related-item h4 a {
      text-decoration: none;
  }

  .related-item p {
      font-size: 0.95rem;
  }

  .related-item .read-more {
      display: inline-block;
      margin-top: 8px;
      font-weight: 600;
      text-decoration: none;
      float: right;
      color: #000;
  }
  
  .read-more {
      display: inline-block;
      margin-top: 8px;
      font-weight: 600;
      text-decoration: none;
      float: right;
      color: #333;
  }
  
  .read-more:hover {
    color:#0380B0 !important;
    font-weight:600;
  }
  
  .read-more::after {
      content: "›";
      font-size: 28px;  /* arrow size */
      margin-left: 6px;
      vertical-align: sub;
  }
  
  @media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1280px}}

  /* ===== LATEST POST ===== */
  .latest-post {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 30px;
      margin-bottom: 1rem;
      border: 1px solid #D1D4DB;
      border-radius: 30px;
  }

  .latest-post img {
      width: 100%;
      border-radius: 10px;
  }

  /* ===== FILTERS ===== */
  .blog-filters {
      margin-bottom: 3rem;
  }

  .blog-categories {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 20px;
  }

  .filter-btn {
    flex: 1;
    padding: 8px 18px;
    background: #eee;
    border-radius: 30px;
    text-decoration: none;
    margin-right: 20px;
    border: 1px solid;
    white-space: nowrap;
    text-align: center;
  }

  .filter-btn:hover {
    color:#0380B0 !important;
    font-weight:500;
  }
  
  .blog-categories a.active {
    color:#fff;
    background-color:#2D86C2;
    opacity:.9;
  }
  
  .blog-categories a:hover {
    color:#2D86C2;
    background-color:#eee;
    opacity:.9;
  }
  
  /* ===== GRID ===== */
  .blog-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 25px;
  }

  .blog-card {
      background: #fff;
      padding: 15px;
      box-shadow: 0 4px 15px rgba(0,0,0,0.12);
      border-radius: 10px;
  }
  
  .pagination {
    border-top: 0px solid black;
  }

  @media (max-width: 600px) {
    .wp-block-media-text__media img {
      width: auto !important;
    }
    .wp-block-media-text.is-stacked-on-mobile {
      display: flex;
    }
  }

  /* ===== RESPONSIVE ===== */
  @media (max-width: 768px) {
      .latest-post {
          grid-template-columns: 1fr;
      }

      .blog-grid {
          grid-template-columns: 1fr;
      }
      
    .blog-categories {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        padding-top: 20px;
    }
  }
  
  .blog-card img {
      aspect-ratio: 3 / 2;
      height: auto !important;
  }
  
  .latest-image img {
      aspect-ratio: 3 / 2;
      height: auto !important;
      border-radius: 30px;
  }
  
  .entry-title a {
    color: #000 !important;
    text-underline-offset: 0.15em;
    text-decoration: none;
  }

  .blog-latest .latest-content {
    padding: 0 25px;
  }
  
  .blog-latest .latest-content h2 {
    font-size: 1.5rem;
    padding-top: 70px;
  }
  
  @media (max-width: 1199px) {
    .blog-latest .latest-content h2 {
      font-size: 1rem;
      padding-top: 10px;
    }
  }
  
  .blog-latest .latest-content a {
    color: #000;
    text-underline-offset: 0.15em;
    text-decoration: none;
  }
  
  .blog-latest .latest-content a::before {
    font-size: 20px;
  }

  /* Blog search input styling */
  .blog-search .form-control {
      background: #F8F9FA;
      border: 1px solid #000000;
      border-radius: 30px !important;
      padding: 10px 18px;
      width: 100%;
      outline: none;
      
      /* Zoom icon */
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-4.35-4.35M17 10a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 18px center;
      background-size: 18px;
  }

  .blog-search .form-control:focus {
      box-shadow: none;
      border-color: #000;
  }
  
.blog-search .btn-primary {
      display: none; /* hide button */
  }

  /* Pagination container */
  .blog-grid-section .pagination {
      display: flex;
      justify-content: center;
      margin-top: 40px;
  }

  /* Pagination links wrapper */
  .blog-grid-section .pagination .nav-links {
      display: flex;
      gap: 12px;
      align-items: center;
  }

  /* Page number buttons */
  .blog-grid-section .page-numbers {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      border: 2px solid #0333;
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      color: #000;
      font-size: 22px;
      font-weight: 500;
      transition: all 0.3s ease;
  }

  /* Hover state */
  .blog-grid-section .page-numbers:hover {
      background: #000;
      color: #fff;
  }

  /* Active page */
  .blog-grid-section .page-numbers.current {
      background: #2D86C2; /* Blue from image */
      border-color: #2D86C2;
      color: #fff;
      pointer-events: none;
  }

  /* Prev / Next arrows */
  .blog-grid-section .page-numbers.prev,
  .blog-grid-section .page-numbers.next {
      font-size: 40px;
      padding-bottom: 9px;;
  }

  /* First / Last arrows (double arrows if enabled by theme/plugin) */
  .blog-grid-section .page-numbers.first,
  .blog-grid-section .page-numbers.last {
      font-size: 30px;
  }

  /* Remove default underline */
  .blog-grid-section .page-numbers {
      text-decoration: none !important;
  }

  /* Override Twenty Twenty-One body styles */
  body {
      background-color: #ffffff !important;
      color: #333333 !important;
      line-height: 1.6 !important;
      margin: 0 !important;
      padding: 0 !important;
  }

  /* If parent uses specific body classes */
  body.custom-background {
      background-color: #f8f9fa !important;
  }

  /*body:not(.wp-admin){background:var(--mh-body); color:var(--mh-text);}*/
  .nav-link.active, .nav-link:hover {
     /*color:var(--bs-navbar-active-color) !important; does not work*/
      color: #2d86c2 !important; 
      font-weight: 600;
  }
  
  /* Navbar */
  .navbar{
    background:#fff;
    border-bottom:1px solid #eee;
  }
  .navbar .nav-link,
  .navbar .navbar-brand{
    color:#000;
  }
  .navbar .nav-link.active,
  .navbar .navbar-brand:hover{
    color:#0d66c2;
    opacity:.9;
  }
  .navbar-nav .nav-link:hover {
      color: #2d86c2 !important; 
      opacity:.9;
  }
  /* Remove Twenty Twenty-One list styling */
  .navbar-nav {
      list-style: none;
      padding-left: 0;
      margin-bottom: 0;
  }

  /* Force horizontal layout */
  .navbar-nav > li {
      display: flex;
      align-items: center;
  }

  /* Fix anchor display */
  .navbar-nav > li > a,
  .navbar-nav > li > span > a {
      display: inline-block;
      text-decoration: none;
  }

  /* Remove bullets everywhere */
  .navbar-nav li::marker {
      content: none;
  }

  /* Active menu item */
  .navbar-nav .current-menu-item .nav-link {
      color: #0d6efd;
  }
  /* Fix navbar bullets */
  .navbar-nav .nav-link {
      text-decoration: none;
  }

  .navbar-toggler {
      border: none;
  }

  .navbar-toggler:focus {
      box-shadow: none;
  }

  .btn-primary {
    --bs-btn-color:#fff !important;
    --bs-btn-bg:#3498db !important;
    --bs-btn-border-color:#3498db !important;
    --bs-btn-hover-bg:#2d86c2 !important;
    --bs-btn-hover-border-color:#2d86c2 !important;
    --bs-btn-active-bg:#2d86c2 !important;
    --bs-btn-active-border-color:#2d86c2 !important;
  }
  .dropdown-menu {
      margin-top: 0;
      border: none;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
      border-radius: 8px;
  }
  .dropdown-item {
      padding: 10px 20px;
      transition: all 0.2s ease;
  }
  .dropdown-item:hover {
      background-color: #f8f9fa;
      padding-left: 25px;
  }

  /* Footer */
  .footer{
    background:var(--mh-dark) !important;
    color:#cfd7df;
  }
  .footer a{ color:#e7edf3; text-decoration:none; }
  .footer a:hover{ color:#fff; text-decoration:underline; }
  /* Custom footer background */
  .footer-custom {
    background-color: #2c3e50;
  }
  /* Utilities */
  .rounded-2xl{ border-radius:1rem; }
  .bgc {
    background-color: #f5f8ff;
  }

  .footer ul li a {
      color: #ffffff !important;
      text-decoration: none !important;
  }

  .footer ul li a:hover {
      color: #d1d5db;
      text-decoration: none;
      }

  .navbar-toggler-icon {
      background-image: none;
      position: relative;
      width: 24px;
      height: 2px;
      background-color: currentColor;
      transition: all 0.3s ease;
  }

  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after {
      content: "";
      position: absolute;
      left: 0;
      width: 24px;
      height: 2px;
      background-color: currentColor;
      transition: all 0.3s ease;
  }

  .navbar-toggler-icon::before {
      top: -8px;
  }

  .navbar-toggler-icon::after {
      top: 8px;
  }

  /* When menu is open */
  .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
      background-color: transparent;
  }

  .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
      transform: rotate(45deg);
      top: 0;
  }

  .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
      transform: rotate(-45deg);
      top: 0;
  }

  /* Enable hover dropdown on desktop only */
  @media (min-width: 992px) {

      .navbar .dropdown:hover > .dropdown-menu {
          display: block;
          margin-top: 0;
      }

      /* Prevent Bootstrap click override */
      .navbar .dropdown-toggle::after {
          transition: transform 0.2s ease;
      }

      .navbar .dropdown:hover > .dropdown-toggle::after {
          transform: rotate(180deg);
      }
      
      /* Slightly delay closing the menu to avoid it disappearing
         as the cursor moves from the toggle to the menu items */
      .navbar .dropdown-menu {
          pointer-events: auto; /* Ensures the menu is interactive */
      }
      
      .site-main {
        display: grid;
      }
      .site-main .widget-area {
        order: 2; /* Right */
      }
  }

  /* Targets the main H1 title of blog posts and pages */
  /* Blog post title (single post) */
  .single-post .entry-title {
    font-size: 2.25rem; /* adjust as needed */
    line-height: 1.2;
  }
  /* Blog listing titles */
  .blog .entry-title,
  .archive .entry-title {
    font-size: 1.6rem;
  }
  
  .singular .entry-title {
    font-size: 36px; /* adjust as needed */
    line-height: 1.2;
  }

  /* Blog sidebar styling */
  .widget {
    margin-bottom: 2rem;
  }

  .widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #3498db; /* Colored underline for titles */
    padding-bottom: 0.5rem;
  }

  /* Mobile stacking */
  @media (max-width: 991px) {
    aside {
      margin-bottom: 2rem;
    }
  }

  /* ===== UNIVERSAL BLOG GRID ===== */
  .blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  /* Tablet */
  @media (max-width: 1199px) {
    .blog-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* Mobile */
  @media (max-width: 767px) {
    .blog-grid {
      grid-template-columns: 1fr;
    }
  }

  /* Grid cards */
  .blog-grid-item {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* Images */
  .blog-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  .blog-single {
    max-width: 100%;
  }

  /* Prevent content collapse */
  .entry-content {
    width: 100%;
  }

  .entry-content img {
    max-width: 100%;
    height: auto;
  }

  /* Allow Bootstrap grid to control width */
  /* Disable Twenty Twenty-One width restriction */
  .site-main > * {
    max-width: 100% !important;
  }

  /* Blog post meta section styling */
  .entry-footer {
      margin-top: 2rem;
      padding-top: 1rem;
      border-top: 1px solid #e2e8f0;
      font-size: 0.9rem;
      color: #6c757d;
  }

  /* Date */
  .entry-footer .posted-on {
      display: block;
      margin-bottom: 0.25rem;
      font-weight: 500;
  }

  /* Author */
  .entry-footer .byline {
      display: block;
      margin-bottom: 0.25rem;
  }

  .entry-footer .byline a {
      color: #0d6efd; /* Bootstrap primary */
      text-decoration: none;
  }

  .entry-footer .byline a:hover {
      text-decoration: underline;
  }

  /* Categories */
  .entry-footer .cat-links {
      display: block;
  }

  .entry-footer .cat-links a {
      background: #f1f5f9;
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 0.8rem;
      color: #0d6efd;
      text-decoration: none;
  }

  .entry-footer .cat-links a:hover {
      background: #e2e8f0;
  }

  /* Allow Bootstrap grid to work */
  .entry-content,
  .entry-header,
  .entry-footer {
    width: 100%;
  }

  .blog-excerpt {
    height: 100%;
  }

  .blog-excerpt .entry-summary {
    font-size: 0.95rem;
    color: #555;
  }
  /* Style for the new post sidebars */
  #primary .widget {
      background-color: #f8f9fa; /* Light grey background */
      border-radius: 0.25rem;
      margin-bottom: 1.5rem;
  }

  #secondary .widget {
      background: #ffffff;
      padding: 1.5rem;
      margin-bottom: 1.5rem;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
      border-radius: 8px;
  }

  .widget-title {
      color: #333;
      border-bottom: 2px solid #3498db; /* Colored underline for titles */
      padding-bottom: 0.5rem;
      margin-bottom: 1rem;
  }

  @media (max-width: 768px) {
      #secondary,
      #secondary .widget {
          box-shadow: none;
      }
  }

  /* Ensure proper spacing on mobile */
  @media (max-width: 991.98px) {
      .order-lg-1,
      .order-lg-3 {
          margin-top: 2rem;
      }
  }

  /* Mobile-specific spacing and visual separation */
  @media (max-width: 991.98px) { /* Targets screens smaller than the large (lg) breakpoint */

      /* 1. Add consistent vertical space between stacked sections */
      #primary .row > * {
          margin-bottom: 2.5rem !important;
      }

      /* 2. Add a subtle top border to sidebars (optional) */
      #primary .row > aside {
          padding-top: 1.5rem;
          border-top: 2px solid #dee2e6; /* A light gray line */
      }

      /* 3. Add a light background to sidebars (optional) */
      #primary .row > aside {
          background-color: #f8f9fa; /* A very light gray */
          border-radius: .375rem;
          padding: 1.5rem;
      }
  }

  .site .button:not(:hover):not(:active):not(.has-background),
  button:not(:hover):not(:active):not(.has-background),
  input[type=submit]:not(:hover):not(:active):not(.has-background),
  input[type=reset]:not(:hover):not(:active):not(.has-background),
  .wp-block-search .wp-block-search__button:not(:hover):not(:active):not(.has-background),
  .wp-block-button .wp-block-button__link:not(:hover):not(:active):not(.has-background),
  .wp-block-file a.wp-block-file__button:not(:hover):not(:active):not(.has-background) {
    background-color: #fff !important;
  }
  
  .my-5 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }
    
  .post-sidebar {
      position: sticky;
      top: 100px;
  }

  .toc-list li {
      margin-bottom: 6px;
  }

  .toc-list a {
      text-decoration: none;
      color: #333;
  }

  .toc-list a:hover {
      color: #0073aa;
  }

}
