/* =============================================
   7 KINGS — GLOBAL RESPONSIVE STYLES
   Centralized file for all media queries.
   ============================================= */

/* ---------- Tablet & Mobile (Standard) ---------- */
@media (max-width: 991px) {
  
  /* --- Main Menu / Header --- */
  header.header > nav {
    flex-wrap: wrap;
    height: 57px;
  }
  #header{
    max-width: 97.7%;
  }
  .region-header {
    min-width: 261px;
    padding: 0 16px;
    background-size: 260px;
    height: 80px;
  }

  button.navbar-toggler {
    display: block;
    border: none;
    padding: 8px;
    margin-left: auto;
    margin-right: 15px;
    background: transparent;
  }

  .navbar-toggler-icon {
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2845, 55, 72, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    transition: transform 0.2s ease;
  }

  .navbar-toggler:not(.collapsed) .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2845, 55, 72, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M6 6L24 24M24 6L6 24'/%3e%3c/svg%3e") !important;
    transform: rotate(90deg);
  }

  /* Enforce flex-wrap on parent container to ensure menu goes to next line */
  header.header nav.navbar .container {
    flex-wrap: wrap !important;
  }

  #CollapsingNavbar {
    display: none;
    flex-direction: column;
    width: 100% !important;
    flex: 0 0 100%;
    padding: 0;
    margin-top: 0;
    background: #F0F2F4;
    order: 3;
    z-index: 100;
  }

  #CollapsingNavbar.show,
  #CollapsingNavbar.collapsing {
    display: flex;
  }

  #CollapsingNavbar::before {
    display: none; /* Hide slated background on mobile */
  }

  .region-primary-menu {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    padding: 15px 0;
  }
  .region-primary-menu #block-seven-kings-bs-main-menu{
    width: 100%;
  }

  ul.navbar-nav.nav-level-0 {
    flex-direction: column;
    width: 100%;
    height: auto;
  }

  ul.navbar-nav.nav-level-0>li.nav-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: auto;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

  ul.navbar-nav.nav-level-0>li.nav-item>a.nav-link {
    padding: 15px 25px;
    width: 100%;
    justify-content: space-between;
    height: auto;
  }

  /* Reset dropdown menu to be static on mobile and act as an accordion */
  ul.navbar-nav .dropdown-menu {
    position: relative !important;
    width: 98%;
    border: 0;
    box-shadow: none;
    transform: unset !important;
    margin: auto !important;
    margin-bottom: 20px !important;
    position: relative;
  }

  #block-seven-kings-bs-headerphonenumber {
    margin: 20px 25px;
    width: calc(100% - 50px);
  }

  #block-seven-kings-bs-headerphonenumber .sk-phone-btn {
    width: 100%;
    text-align: center;
    margin-right: 0;
    padding: 15px;
  }
  /* --- Blogs Page --- */
  .blogs-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar-wrapper {
    order: 2;
  }
  
  .blog-teaser-title {
    font-size: 24px;
  }

  #comment-form .form-item-name,
  #comment-form .form-item-mail {
    flex: 1 1 100%;
  }

  /* --- Blogs Section (Homepage) --- */
  .blogs-grid {
    grid-template-columns: 1fr;
  }

  .blog-featured .blog-item-image {
    aspect-ratio: 16/9;
  }

  .blogs-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  } 

  .blogs-heading {
    font-size: 36px;
  }

  .blog-featured .blog-item-title {
    font-size: 24px;
  }

  .blog-featured .blog-item-content {
    padding: 20px;
  }

  /* --- About Us Section --- */
  .about-us-section {
    width: 100% !important;
    padding: 40px 20px;
  }
  .about-us-heading .field--name-field-animated-headline p {
    font-size: 32px;
  }
  .about-us-image {
    padding-left: 0;
    margin-top: 50px;
  }
  .about-us-image img {
    height: 400px;
  }
  .about-us-bottom {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 30px !important;
  }

  /* --- Footer --- */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    padding-top: 60px;
  }

  .footer-tagline {
    grid-column: span 2;
    padding-left: 0;
    font-size: 32px;
    margin-bottom: 100px;
  }

  .footer-copyright-box {
    width: 300px;
    height: 80px;
    font-size: 12px;
  }
  .dropdown-item{
    position: relative;
    padding: 10px 30px;
  }
  .dropdown-item::before {
    content: '●';
    position: absolute;
    left: 12px;
    color: #60A5FA;
  }
  .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 30px;
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border-top: 1px solid #eef2ff;
    border-left: 1px solid #eef2ff;
    transform: rotate(45deg);
    z-index: 10;
  }
  .hero-title-wrapper .d-block.text-dark{
    font-size: inherit;
  }
  .ticker-word{
    font-size: inherit;
  }
}

/* ---------- Mobile Only (Small Devices) ---------- */
@media (max-width: 575px) {
  .region-header {
    min-width: 257px;
  }
  
  #block-seven-kings-bs-site-branding .site-logo img {
    height: 40px;
  }

  /* --- Footer --- */
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-tagline {
    grid-column: span 1;
  }

  .footer-logo-box {
    width: 200px;
    height: 80px;
  }

  .footer-container {
    padding: 100px 30px 100px;
  }
  #header {
    max-width: 96%;
  }
  .hero-slider-container {
    max-width: 200%;
  }
  
}
