/* Typography & Reset */
body {
    font-family: 'Hanken Grotesk', sans-serif;

}


.site-header {
    background-color: #FFFFFF;
}

#site-header .header-logo {
    height: 56px;
    width: auto;
}

/* Icons & Labels Styling (Search/Menu) */
#site-header .nav-icon-btn {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0;
}
/* .navbar-collapse{
    flex-grow: 0;
} */
#site-header .btn-label {
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
    color: #003057; 
    line-height: 1;
    display: none;

}


/* Custom Hamburger Icon */
#site-header .custom-burger {
    width: 28px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#site-header .custom-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #327458; 
    border-radius: 2px;
}

/* Navigation Links */
#site-header .menu-link {
    position: relative;
    font-size: 18px;
    font-weight: 400;
    color: #131312 !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}
/* The underline line */
#site-header .menu-link::after {
    content: '';                 
    position: absolute;
    bottom: -8px;                
    left: 50%;
    right: 50%;                  
    height: 2px;                
    background-color: #327458; 
    color: #131312;  
    border-radius: 1px;          
    width: 0;                    
    transition: all 0.3s ease;   
}
/* On hover: expand to full width + color change */
#site-header .menu-link:hover::after {
    left: 0;
    right: 0;
    width: 100%;                 
}

#site-header .nav-v-divider {
    width: 1px;
    height: 24px;
    background-color: #327458;
    margin: 0 10px;
}
@media (min-width: 992px) {
#site-header .navbar-expand-lg {
    flex-wrap: wrap;
    justify-content: flex-start;
}
}
/* ---------------------------------- */
  /* --- Mega Menu Base --- */
.sop-mega-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-top: 1px solid #eee;
}
.sop-mega-menu .container-fluid,
.sop-mega-menu .row {
    min-height: 400px;
}

/* Toggle Class */
.sop-mega-menu.active {
    display: block;
}

/* Left Section (White) */
.mega-inside-left {
    padding-block: 20px ;
    padding-right: 40px;
}

/* Right Section (Grey background) */
.mega-inside-right {
    background-color: #F5F4FA;
    padding: 20px 20px;
    display: flex;
    flex-direction: column;
    /* height: 100%;  */
}


/* Mega Menu Typography */
.mega-header {
    border-bottom: 1px solid #C1C1C1;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.mega-heading {
    font-size: 16px;
    text-transform: uppercase;
    color: #131312;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.mega-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-list li {
    margin-bottom: 12px;
}

.mega-list li a {
    text-decoration: none;
    color: #131312;
    font-size: 18px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.mega-list li a:hover {
    color: #327458; 
    border-bottom: 1px solid #131312;
}

/* Responsive adjustment */
@media (max-width: 991px) {
    .sop-mega-menu {
        position: static;
        box-shadow: none;
    }
    .mega-inside-left, .mega-inside-right {
        padding: 20px;
        width: 100%;
    }
}
/* -------------------------------------- */
   /* SEARCH SIDE BAR  */
   /* --- Search Sidebar Styles --- */
 .search-sidebar {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden by default */
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #f5f5f5;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050; /* Higher than sticky header */
    display: flex;
    flex-direction: column;
}

 .search-sidebar.active {
    right: 0;
}

#searchSidebar .sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    background: #f5f5f5;
}

#searchSidebar .close-search-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

#searchSidebar .sidebar-title {
    font-size: 18px;
    font-weight: 500;
    color: #333333;
}

#searchSidebar .sidebar-body {
    padding: 0 25px 25px 25px;
}

#sidebarSearchInput {
    width: 100%;
    font-size: 16px;
    padding: 12px 15px;
    border: 2px solid #333333;
    outline: none;
    background: #ffffff;
    font-family: 'Hanken Grotesk', sans-serif;
}

#sidebarSearchInput:focus {
    border-color: #327458; /* SOP Green on focus */
}

#searchSidebar .search-results {
    margin-top: 20px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-result-item {
    display: block;
    padding: 15px;
    border-bottom: 1px solid #eeeeee;
    text-decoration: none;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f9f9f9;
}

.result-category {
    font-size: 11px;
    text-transform: uppercase;
    color: #327458;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.result-title {
    font-size: 16px;
    color: #333333;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.result-summary {
    font-size: 13px;
    color: #666666;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-loading, .no-results, .search-error {
    padding: 20px;
    text-align: center;
    color: #666666;
    font-size: 14px;
}

.search-error {
    color: #dc3545;
}

/* Background Overlay */
#searchSidebar .search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 1040;
}

#searchSidebar .search-overlay.active {
    display: block;
}

/* Prevent scrolling when search is open */
#searchSidebar body.no-scroll {
    overflow: hidden;
}
/* -------------------------------- */
/* --- Mobile Menu Panel --- */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -320px; /* Hidden by default */
    width: 300px;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.mobile-menu-panel.active {
    right: 0;
}

/* Backdrop Overlay */
#mobileMenuPanel .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 9998;
}

#mobileMenuPanel .mobile-menu-overlay.active {
    display: block;
}

/* Header Close Area */
#mobileMenuPanel .mobile-menu-header {
    background: #EBEBEB; /* Light grey from screenshot */
    display: flex;
    justify-content: flex-end;
    padding: 0;
}

#mobileMenuPanel .close-menu-btn {
    background: transparent;
    border: none;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

/* Navigation List */
#mobileMenuPanel .mobile-main-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

#mobileMenuPanel .mobile-main-nav li {
    border-bottom: 1px solid #f0f0f0;
     /* -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);  */
}

#mobileMenuPanel .menu-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#mobileMenuPanel .menu-item-row a, .single-link {
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    flex-grow: 1;
}
 
#mobileMenuPanel .has-submenu.open .menu-item-row a {
    background-color: #f1f1f1;
}
#mobileMenuPanel .submenu-toggle {
    background: #fcfcfc;
    border: none;
    border-left: 1px solid #f0f0f0;
    padding: 15px 20px;
    color: #999;
    transition: transform 0.3s ease;
}

/* Accordion Logic */
#mobileMenuPanel .mobile-submenu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: #fafafa;
    transition: max-height 0.3s ease-out;
}

#mobileMenuPanel .mobile-submenu li a {
    padding: 12px 20px 12px 40px; /* Indented as per screenshot */
    display: block;
    text-decoration: none;
    color: #666;
    font-size: 15px;
    border-bottom: 1px solid #eee;
}

/* Active Accordion States */
#mobileMenuPanel .has-submenu.open .mobile-submenu {
    max-height: 500px; /* Large enough to show content */
}

 #mobileMenuPanel .has-submenu.open .submenu-toggle {
    background-color: #f1f1f1;
     transform: rotate(180deg);
}

/* --------------------------------- */

/* Breakpoint Adjustments  */
/* -------------------------- */

@media (max-width: 1036px) {
 #site-header .navbar-nav{
    padding-inline: 0 !important;
  }
  #site-header .menu-link {
    position: relative;
    font-size: 17px;
    padding: 0.5rem 1rem !important;
  }
  

}

@media (max-width: 991.98px) {
   #site-header .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 20px 5%;
        box-shadow: 0 15px 20px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    #site-header .menu-link {
        text-align: center;
        border-bottom: 1px solid #f8f9fa;
        padding: 12px 0 !important;
    }

   #site-header .nav-icon-btn {
        min-width: 50px;
    }

    #site-header .header-logo {
        height: 48px;
    }
    #site-header .btn-label { 
        display: flex;
    }

    /* hide the auto toggle content */
    #sopNavContent.collapse:not(.show), 
    #sopNavContent.collapse.show,
    #sopNavContent.collapsing {
        display: none !important;
        height: 0 !important;
        transition: none !important;
    }

    #mobileMenuPanel .mobile-submenu {
        background-color: #ffffff; 
    }
    
    #mobileMenuPanel .mobile-submenu li a {
        color: #666666;
        padding-left: 35px !important;
        font-size: 15px;
    }
    #mobileMenuPanel .mobile-submenu li a:hover{
     background-color: rgb(249, 249, 249);

    }

    /* Styling for the Arrow background box  */
    #mobileMenuPanel .submenu-toggle {
        /* background-color: #f9f9f9; */
         background-color: transparent;
        border-left: 1px solid #eeeeee;
        width: 60px;
       
    }
    #mobileMenuPanel .submenu-toggle svg{
        transform: rotate(0deg); 
        transition: transform 0.4s ease;
    }
    
    #mobileMenuPanel .has-submenu.open .submenu-toggle {
        background-color: #f1f1f1;
        transform: rotate(-180deg);
        
    }

}
@media (max-width: 768px) {
  #site-header .header-logo {
        height: 42px;
    }
    #site-header .custom-burger {
    width: 24px;
    height: 19px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    }
    #site-header .nav-icon-btn {
        margin-right: 0 !important;
    }
    #site-header .main-navigation .container-fluid{
        padding-inline: 1rem;
    }
        
}
@media (max-width: 576px) { 
   #site-header .nav-icon-btn {
        min-width: 43px;
   }
}
/* ---------------------------------------------------------------------- */
/* FROM HERE *MAIN* CONTENT STYLING WILL BE START */
/* --------------------------------------------------------------------- */

#main{
    background-color: #F5F1EE;
}



.contact-us-link {
    color: #327458; 
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.contact-us-link:hover {
    color: #327458;
    text-decoration: underline;
    opacity: 0.8;
}

/* Ensure alignment matches your header exactly */
@media (max-width: 991px) {
    .top-action-bar .container-fluid {
        padding-inline: 1.5rem !important; 
    }
}
/* -------------------------------------------------------- */
/* ---------  SOP INTRO SECTION  ------------------- */

/* Scoped Intro Section Styles */
.sop-intro-section {
    padding-bottom: 3rem;
}

/* Scoped Image Styles */
.sop-intro-section .intro-image-container {
    width: 100%;
    margin-bottom: 40px;
    max-height: 412px;
    overflow: hidden;
}

.sop-intro-section .intro-map-image {
    width: 100%;
    height: auto;
    min-height: 140px;
    object-fit: cover;
    display: block;
    /* Optional: subtle shadow to match professional government look */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Scoped Text Styles */
.sop-intro-section .intro-content-wrapper {
    max-width: 1250px; 
    padding-inline: 3rem;
}

.sop-intro-section .intro-description {
    font-size: 24px;
    line-height: 1.65;
    color: #2B2C28;
    font-weight: 400;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .sop-intro-section {
        padding-top: 0px;
        padding-bottom: 36px;
    }
    
    .sop-intro-section .intro-description {
        font-size: 20px;
        line-height: 1.6;
    }

    .sop-intro-section .intro-image-container {
        margin-bottom: 25px;
    }
}
@media (max-width: 768px) {
  .sop-intro-section .container-fluid{
    padding-inline: 1.125rem;
  }
  .sop-intro-section .intro-content-wrapper { 
    padding-inline: 1.5rem;
}

}
@media (max-width: 576px) {
  .sop-intro-section .intro-description {
        font-size: 18px;
    }
  .sop-intro-section .intro-content-wrapper { 
    padding-inline: 1.125rem;
}

}

/* -------------------------------------------------------- */
/* <!-- Survey of Pakistan Feature Banners section------- --> */
/* --- Scoped Banners Section --- */
.sop-banners-section {
    padding-bottom: 40px; 
}

/* The individual card container */
.sop-banners-section .feature-card {
    position: relative;
    height: 420px; 
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 0px; 
    overflow: hidden;
    display: flex;
    align-items: flex-end; 
}

/* Background Images for specific cards */
.sop-banners-section .banner-maps {
    background-image: url('/assets/images/maps-index.jpg'); 
}

.sop-banners-section .banner-products {
    background-image: url('/assets/images/products-index.jpg'); 
}
/* Dark Overlay for text readability */
.sop-banners-section .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.6) 100%); */
    background: linear-gradient(to bottom, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0.38) 100%);
    display: flex;
    align-items: flex-end;
    padding: 40px;
    transition: background 0.3s ease;
}

.sop-banners-section .feature-card:hover .card-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
}

/* Content Typography */
.sop-banners-section .card-content {
    color: #ffffff;
    width: 100%;
}

.sop-banners-section .card-title {
    font-size: 36px;
    font-weight: 400;
    margin-bottom: 10px;
    color: #FFFFFF;
}

.sop-banners-section .card-text {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 25px;
    color: #FFFFFF;
    opacity: 0.9;
}

/* Button Styling (SoP Green) */
/* .sop-banners-section .card-btn {
    display: inline-block;
    background-color: #327458; 
    color: #ffffff;
    text-decoration: none;
    padding: 10px 30px;
    font-size: 16px;
    font-weight: 400;
    border-radius: 0px;
    transition: background-color 0.3s ease, transform 0.2s ease;
} */
.sop-banners-section .card-btn {
    display: inline-block;
    background-color: #327458; 
    color: #ffffff;
    text-decoration: none;
    padding: 10px 0; 
    font-size: 16px;
    font-weight: 400;
    border-radius: 0px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 160px; 
    text-align: center; 
}

.sop-banners-section .card-btn:hover {
    background-color: #265943;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Responsive Handling */
@media (max-width: 768px) {
    .sop-banners-section .container-fluid{
        padding-inline: 1.125rem;
    }
    .sop-banners-section .feature-card {
        height: 330px;
    }
    
    .sop-banners-section .card-title {
        font-size: 28px;
    }
    
    .sop-banners-section .card-overlay {
        padding: 25px;
    }
}
@media (max-width: 576px) {
     
    .sop-banners-section .card-overlay {
        padding: 20px;
    }
}
/* -------------------------------------------------------- */
/* --- Scoped Services Grid section--- */
.sop-services-grid {
    padding-top: 20px;
    padding-bottom: 60px;
}

/* Header Text */
.sop-services-grid .grid-header {
    margin-bottom: 50px;
    max-width: 1200px;
}

.sop-services-grid .lead-text {
    font-size: 25px;
    line-height: 1.5;
    color: #2B2C28;
    font-weight: 400;
}

/* Card Styling */
.sop-services-grid .service-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    height: 100%;
    text-decoration: none; /* For link cards */
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sop-services-grid .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Image Handling */
.sop-services-grid .service-img-wrapper {
    width: 100%;
    height: 245px; 
    overflow: hidden;
}

.sop-services-grid .service-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

/* Content Area */
.sop-services-grid .service-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.sop-services-grid .service-title {
    font-size: 22px;
    font-weight: 500;
    color: #333333;
    margin: 0;
}

.sop-services-grid .service-desc {
    font-size: 18px;
    font-weight: 300;
    line-height: 23.4px;
    color: #131312;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 991px) {
   
    .sop-services-grid .service-img-wrapper {
        height: 210px;
    }
    .sop-services-grid .lead-text {
        font-size: 18px;
    }
}
@media (max-width: 768px) {
     .sop-services-grid .container-fluid {
        padding-inline: 1.125rem;
    }
   

}
@media (max-width: 576px) {
    .sop-services-grid {
        padding-top: 40px;
        padding-bottom: 40px;
    }
     .sop-services-grid .service-content {
    padding: 20px;
    }

}


/* ---------------------------------------------------------------------- */
/* FROM HERE *FOOTER* CONTENT STYLING WILL BE START */
/* --------------------------------------------------------------------- */


      .footer-sop {
        background-color: #ffffff;
        padding-top: 60px;
       
      }

      #footer-sop h5 {
        color: #363636;
        font-size: 20px;
        font-weight: 400;
        line-height: 1.1;
        margin-bottom: 1.5rem;
        -webkit-font-smoothing: antialiased;
      }

      #footer-sop .list-unstyled a {
        text-decoration: none;
        font-size: 16px;
        color: #333333;
        font-weight: 400;
        padding: 4px 0;
        display: inline-block;
      }

      #footer-sop .list-unstyled a:hover {
        text-decoration: underline;
      }

      #footer-sop .text-faded,
      #footer-sop .text-faded a {
        color: #bdbdbd !important;
      }
      #footer-sop .text-faded a:hover {
  text-decoration: none !important;
}


      /* --- WEBSITE STATS RESPONSIVE --- */
      #footer-sop .stats-container {
        width: 100%;
        max-width: 200px; /* Standardize desktop width */
      }
      #footer-sop .stats-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 16px;
        color: #333333;
        padding: 5px 0;
        border-bottom: 1px dotted #f0f0f0;
      }
      #footer-sop .stats-row:last-child {
        border-bottom: none;
      }
      /* .stats-label {
        font-weight: 400;
        color: #555;
      } */
      #footer-sop .stats-value {
        font-weight: 400;
        text-align: right;
      }

      /* --- BOTTOM SECTION --- */
      #footer-sop .footer-bottom {
       
        padding-top: 20px;
        /* border-top: 1px solid #f0f0f0; */
        font-size: 16px;
        color: #333333;
      }
      #footer-sop .copyright-text {
        margin-right: 40px;
      }

      #footer-sop .back-to-top {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #333333;
        margin-top: 30px;
      }
      #footer-sop .back-to-top i {
        color: #939393;
        font-size: 16px;
        margin-bottom: 4px;
      }
      #footer-sop .back-to-top span {
        font-size: 16px;
      }

      /* Responsive Padding Helper */
      #footer-sop .responsive-padding {
        padding-inline: 4rem;
      }

      /* --- ACCORDION LOGIC (Mobile & Tablet) --- */
      @media (max-width: 991.98px) {
        .footer-sop {
          padding-top: 20px;
          padding-left: 1rem;
          padding-right: 1rem;
        }

        /* Convert columns to 12-width rows */
        #footer-sop .col-lg-3,
        #footer-sop .col-lg-2,
        #footer-sop .col-md-4,
        #footer-sop .col-md-12 {
          width: 100% !important;
          margin-bottom: 0 !important;
          padding-left: 0 !important;
          padding-right: 0 !important;
        }

        /* The Clickable Trigger */
        #footer-sop  h5 {
          font-size: 17px !important;
          padding: 18px 20px !important;
          margin: 0 !important;
          border-bottom: 1px solid #eeeeee;
          background-color: #ffffff;
          cursor: pointer;
          display: flex;
          justify-content: space-between;
          align-items: center;
          user-select: none;
        }

        /* Plus icon */
        #footer-sop h5::after {
          content: "+";
          font-size: 22px;
          font-weight: bolder;
          color: #333;
        }

        /* Minus icon when active */
        #footer-sop h5.active::after {
          content: "−";
        }

        /* Hide data containers */
        #footer-sop ul.list-unstyled,
        #footer-sop .stats-container {
          max-height: 0;
          overflow: hidden;
          transition: all 0.4s cubic-bezier(0, 1, 0, 1);
          padding: 0 25px !important;
          margin: 0 !important;
          background-color: #ffffff;
          max-width: 100%;
        }

        /* Show data when active */
        #footer-sop h5.active + .list-unstyled,
        #footer-sop h5.active + .stats-container {
          max-height: 800px;
          padding-top: 15px !important;
          padding-bottom: 25px !important;
          border-bottom: 1px solid #eeeeee;
          transition: all 0.4s ease-in-out;
        }

        #footer-sop .responsive-padding {
          padding-left: 0;
          padding-right: 0;
        }
        #footer-sop .footer-bottom,
        #footer-sop .back-to-top {
          padding-left: 20px;
          padding-right: 20px;
        }
        #footer-sop .copyright-text {
          margin-bottom: 10px;
          width: 100%;
        }
      }

      @media (max-width: 768px) {
        #footer-sop .footer-sop h5 {
          font-size: 20px !important;
        }
      }
    