.footer-sm {
  margin: 0;
  padding: 0;
  overflow-x: hidden; 
  background-color: #9E363A; 
  color: #fff;
  box-sizing: border-box;
}
.footer-wrapper-sm
{
  padding: 30px 120px 0 120px; 
}
.row1-quicklinks-sm {
  margin: 0 ;
  padding-bottom: 15px;         
  padding-left: 3px;
  display: flex;
  justify-content: flex-start;
  gap: 30px;
  font-size: 14px;
  border-bottom:1px solid rgba(255, 255, 255, 0.2); 
}

.row1-quicklinks-sm a {
  color: #fff;
  text-decoration: none;
}
.row1-quicklinks-sm a:hover {
color: #fdc800;
}

/* Row 2: Dropdown Navigation */
.footer-mid-nav-sm {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  font-size: 14px;
  margin-bottom: 20px;
  position: relative;
  padding: 15px 0 0 0; /* removed individual padding */
}
.footer-mid-nav-sm > li {
  list-style: none;
  position: relative;
}
.footer-mid-nav-sm > li > a {
  color: #fff;
  text-decoration: none;
  padding: 5px;
  margin: 0;
}
.footer-mid-nav-sm > li > a::after {
  /* content: " ▼"; */
  font-size: 10px;
}
.footer-mid-nav-sm > li:hover > a {
  text-decoration: none;
  color: #fdc800;
}

.footer-mid-nav-sm li ul {
  display: none;
  position: absolute;
  top: 20px;
  left: 0;
  background: #992d2d;
  padding: 10px;
  min-width: 200px;
  border-radius: 4px;
}
.footer-mid-nav-sm li:hover ul {
  display: block;
  color: #fdc800;
}
.footer-mid-nav-sm li ul li {
  list-style: none;
  margin: 5px 0;
}
.footer-mid-nav-sm li ul li a {
  color: #ccc;
  text-decoration: none;
  font-size: 13px;
}
.footer-mid-nav-sm li ul li a:hover {
  color: #fdc800;
  text-decoration: none;
}
.row3-dept-sm-wrapper {
  margin-bottom: 20px;
  padding: 0; 
}

.dept-heading-sm {
  color: #fff;
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: bold;
  padding: 10px 0; 
  /* border-top: 1px solid rgba(255, 255, 255, 0.2);  */
}
.dept-heading-sm::after {
    content: "";
    display: block;
    width: 2.25rem; 
    height: 0.125rem; 
    background-color: #fdc800;
    margin-top: 0; 
}
.row3-dept-sm {
  display: grid; 
  grid-template-columns: repeat(5, 1fr); 
  gap: 10px; 
  margin: 0 0 20px 0; 
}
.row3-dept-sm a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  margin: 0;
  padding: 0;
}
.row3-dept-sm a:hover {
color: #fdc800;
text-decoration: none;
}
.row4-explore-sm {
  display: flex;
  justify-content: flex-start;
  gap: 30px;
  font-size: 14px;
  margin: 15px 0;
  padding: 10px 0 0 0; 
  /* border-top: 1px solid rgba(255, 255, 255, 0.2); */
}
.row4-explore-sm a {
  color: #fff;
  text-decoration: none;
  margin: 0;
  padding: 0;
}
.row4-explore-sm a:hover {
  text-decoration: none;
  color: #fdc800;

}
.row5-logo-sm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  /* border-top: 1px solid rgba(255, 255, 255, 0.2); */
}
.footer-row5-left-sm {
  padding-top: 15px;
  padding-bottom: 15px;
  display: flex;
  align-items: center;  /* vertically align logo + text block */
  gap: 15px;            /* spacing between logo and text */
}

/* Logo */
.footer-row5-left-sm img {
  height: 80px;
}

/* Title + Rotating Text Block */
.MSITheading-sm,
.slidertext-sm {
  display: block;
}

/* Title Styling */
.MSITheading-sm h3 {
  font-size: 28px;     /* reduced from 40px to balance with logo */
  font-weight: 600;
  margin: 0;
  color: #fff;
}

/* Rotating Text */
.slidertext-sm { 
  width: 100%; 
  height: 20px;
   overflow: hidden;
    position: relative; 
    text-align: left; 
    color: #ffffff; 
  } 
  .wrap-slider-text-sm{ 
    position: absolute; 
    top: 0; 
    left: 0;
     width: 100%;
      transition: top 0.6s ease-in-out; }

     .slide-sm { 
      height: 20px;
      line-height: 20px;
      font-size: 16px;
      font-weight: 300;
      white-space: nowrap;
     }


.footer-row5-right-sm {
  text-align: right;
  font-size: 12px;
}
.social-icons-sm {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-icons-sm a i{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #b48d2b; 
    color: #ffcc00;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons-sm a:hover i {
    background-color: #ffcc00;
    color: #9e363a; 
    border-color: #ffcc00;
}
/* Row 6: Copyright */
.row6-copyrgt-sm {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* aligns copyright with top of links row */
  gap: 20px;
  padding-top: 15px;
  padding-bottom: 15px;
  font-size: 14px;
  box-sizing: border-box;
}

.footer-row6-left-sm {
  display: flex;
  flex-direction: column; 
  gap: 8px;
}

.footer-links-sm {
  font-size: 14px;
}

.footer-links-sm a {
  color: #fff;
  text-decoration: none;
  margin-right: 8px;
}
.footer-links-sm a:hover {
  color: #fdc800;
}

.footer-address-sm a {
  color: #ccc;
  font-size: 13px;
  text-decoration: none;
}
.footer-address-sm a:hover {
  color: #fdc800;
}

.footer-row6-right-sm {
  text-align: right;
  font-size: 13px;
  color: #ddd;
}

.footer-mid-nav-sm ul {
    display: none;
    position: absolute;
    min-width: 200px;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #8b2d2d; /* your red background */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
}
.footer-mid-nav-sm ul {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.footer-mid-nav-sm li:hover > ul {
    display: block;   /* still needed for layout */
    opacity: 1;
    visibility: visible;
}


/* Show ONLY the direct child submenu */
.footer-mid-nav-sm li:hover > ul {
    display: block;
}

/* First-level submenu (dropdown below) */
.footer-mid-nav-sm > li > ul {
    top: 100%;
    left: 0;
}

/* Second-level submenu (flyout to the right) */
.footer-mid-nav-sm li > ul > li > ul {
    top: 0;
    left: 100%;
}

/* Third-level submenu (if needed) */
.footer-mid-nav-sm li > ul > li > ul > li > ul {
    top: 0;
    left: 100%;
}

/* Make sure parent <li> is relative */
.footer-mid-nav-sm li {
    position: relative;
}

@media (max-width: 990px) {
  .row5-logo-sm {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }

  /* Left section (logo + text) centered */
  .footer-row5-left-sm {
    justify-content: center;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* Adjust logo size */
  .footer-row5-left-sm img {
    height: 60px; /* smaller on smaller screens */
  }

  /* Heading smaller */
  .MSITheading-sm h3 {
    font-size: 28px;
    text-align: center;
  }

  /* Slider text full width and centered */
  .slidertext-sm {
   display:none;
  }

  .wrap-slider-text-sm {
    position: relative;
    left: 0;
    width: 100%;
  }

  /* Right section centered */
  .footer-row5-right-sm {
    text-align: center;
    font-size: 12px;
    margin-top: 10px;
  }

  /* Social icons centered and smaller */
  .social-icons-sm {
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
  }

  .social-icons-sm a i {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

}

/* Mobile Responsiveness */
@media (max-width: 768px) {

  .footer-wrapper-sm {
    padding: 20px 20px 0 20px; 
  }

  /* Row 1: Quick Links */
  /* .row1-quicklinks-sm {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding-left: 0;
  } */
  .row1-quicklinks-sm {
  display: flex;
  flex-direction: column;   /* stack vertically */
  align-items: center;      /* center horizontally */
  text-align: center;
  gap: 10px;
  padding-left: 0;
}

.row1-quicklinks-sm a {
  display: block;           /* each link takes its own line */
  width: 100%;              /* optional: makes them uniform */
}

  /* Row 2: Dropdown Navigation */
  /* .footer-mid-nav-sm {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .footer-mid-nav-sm li ul {
    position: static; 
    padding: 5px 10px;
    min-width: auto;
  } */
   .row2-dropdown-sm{
    display: none; /* Hide the dropdown for mobile */
   }
  .dept-heading-sm{
    text-align: center;
  }
  .dept-heading-sm::after {
     margin: 0.1875rem auto 0; 
 
}
  .row3-dept-sm {
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
    gap: 8px;
  }
  /* Row 4: Reports / Policies */
  .row4-explore-sm {
    flex-direction: column;    /* stack menu groups vertically */
    align-items: center;       /* center all groups horizontally */
    gap: 15px;
  }

  .row4-explore-sm .menu-group {
    width: 100%;               /* take full width */
    display: flex;
    flex-direction: column;     /* stack title and links vertically */
    align-items: center;        /* center everything */
  }

  .row4-explore-sm .menu-links {
    display: flex;
    flex-direction: column;     /* stack links vertically */
    align-items: center;        /* center links */
    gap: 5px;                   /* spacing between links */
  }

  .row4-explore-sm .menu-links a {
    margin: 0;                  /* remove horizontal margin */
    text-align: center;         /* center text inside links */
  }
  /* Row 5: Logo + Bottom Info */
  .row5-logo-sm {
    flex-direction: column;
    align-items: flex-start;
    align-items: center;
    text-align: center;
  }
  .footer-row5-left-sm {
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }
  .footer-row5-left-sm img {
    height: 60px;
  }
  .footer-row5-left-sm span {
    display: block;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
  }
 .slidertext-sm{
    display: none;
 }

  /* Social icons centered and yellow */
  .social-icons-sm {
    justify-content: center;
    gap: 5px;
  }
  .social-icons-sm a i {
    border: none; 
    font-size: 18px;
    color: #ffcc00;
  
  }
  .social-icons-sm a:hover i {
    pointer-events: none;
  }

  /* Row 6: Copyright */
  .row6-copyrgt-sm {
    flex-direction: column;
    text-align: center;
  }

  .footer-row6-left-sm,
  .footer-row6-right-sm {
    width: 100%;
    margin-bottom: 8px;
  }


  .footer-links-sm {
    display: block;
    margin: 8px 0;
  }

  .footer-links-sm a {
    display: inline-block;
    font-size: 13px;
    margin: 0 8px;
  }
  .footer-row6-right-sm{
    text-align: center;
  }
}
