html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

:root {
  --topbar-h: 0px;
  --navbar-h: 0px;
}

body {
  font-family: Georgia, serif;

  padding-top: calc(var(--topbar-h) + var(--navbar-h)) !important;
}

/* =========================
   TOP BAR
   ========================= */
.top-bar {
  background-color: #1c2d59;
  color: white;
  padding: 1rem 0;
  font-family: Georgia, serif;
  font-size: 1.1rem;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1040;
}
.top-bar .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}
.agency-link {
  color: white;
  font-weight: 600;
  text-decoration: none;
}
.agency-link:hover {
  background-color: #f27b21;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  text-decoration: none;
}
.institute-info .institute-title {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1.1rem;
  color: #1c2d59;
  font-family: Georgia, serif;
}
.institute-info .institute-subtitle {
  font-size: 1.05rem;
  font-family: Georgia, serif;
}
.institute-info .highlight-orange {
  color: #f27b21;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.contact-links a {
  color: white;
  text-decoration: none;
}

/* =========================
   NAVBAR
   ========================= */
.logo-img {
  width: 249px;
  height: auto;
}
.navbar {
  position: fixed !important;

  top: var(--topbar-h) !important;
  left: 0;
  width: 100%;
  z-index: 1030;
  background-color: #f8f9fa;
}
.navbar-nav {
  flex-wrap: nowrap;
  font-family: Georgia, serif;
  font-size: 0.9rem;
}
.search-wrapper {
  max-width: 250px;
  width: 100%;
}

/* =========================
   Tablet (577px–992px)
   ========================= */
@media (min-width: 577px) and (max-width: 992px) {
  .top-bar {
    font-size: 0.9rem !important;
    padding: 0.1rem 0 !important;
    margin-bottom: 0 !important;
  }
  .top-bar .container {
    gap: 0.25rem !important;
  }
  .top-bar a {
    font-size: 0.94rem !important;
  }
}

/* =========================
   Mobile (≤576px)
   ========================= */

@media (max-width: 576px) {
  .top-bar {
    display: none !important;
  }

  :root {
    --topbar-h: 0px;
  }

  .navbar {
    position: sticky !important;
    top: 0 !important;
    left: 0;
    width: 100%;
    z-index: 1030;
  }

  body {
    padding-top: 0 !important;
  }

  html {
    scroll-padding-top: var(--navbar-h);
  }

  .navbar .navbar-toggler {
    margin-left: auto;
  }

  .logo-img {
    width: 180px;
    height: auto;
  }
  .search-wrapper {
    max-width: 100%;
  }

  #navbarNav .nav-link.agency-link,
  #navbarNav .nav-link[href*="newagency.html"] {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #f27b21;
    color: #ffffff !important;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    margin: 0.25rem 0 0.5rem;
    font-weight: 700;
  }
  #navbarNav .nav-link.agency-link:hover,
  #navbarNav .nav-link[href*="newagency.html"]:hover,
  #navbarNav .nav-link.agency-link:focus,
  #navbarNav .nav-link[href*="newagency.html"]:focus {
    background-color: #d86d1d;
    color: #ffffff !important;
  }

  #navbarNav .nav-link {
    padding: 0.6rem 0.25rem;
  }
}

/* =========================
   HERO / BANNER
   ========================= */
.hero-carousel {
  font-family: Georgia, serif;
}
.hero-slide {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  min-height: 80vh;
  position: relative;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.hero-carousel img.banner-img {
  display: block;
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 auto;
  vertical-align: middle;
}
.hero-carousel,
.hero-slide {
  overflow: hidden !important;
}

@media (max-width: 992px) {
  .hero-slide {
    background-size: contain !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;

    aspect-ratio: 16 / 9;
    min-height: clamp(220px, 56.25vw, 520px);
    height: auto !important;

    background-color: #ffffff !important;
    position: relative;
    margin-bottom: 0 !important;
  }
  .overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
  }
  .hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 0 1rem;
    width: 100%;
    max-width: 720px;
    text-align: center;
  }
}

/* =========================
   Enroll in Training Now
   ========================= */
.enroll-section {
  background-color: #fdfaf6;
  padding: 3rem 0;
  margin-top: 0 !important;
  font-family: Georgia, serif;
}
.enroll-left {
  font-size: 1.1rem;
}
.enroll-section h2 {
  font-size: 2.5rem;
}
.enroll-section .form-select,
.enroll-section .form-check-label {
  font-family: Georgia, serif;
  font-size: 1rem;
}
.enroll-section .card {
  background-color: #fff;
}
.enroll-btn {
  background-color: #f27b21;
  font-weight: bold;
  font-family: Georgia, serif;
  border: none;
}
.enroll-btn:hover {
  background-color: #d66612;
}
@media (max-width: 768px) {
  .enroll-section h2 {
    font-size: 1.75rem;
  }
  .enroll-section img {
    margin-top: 2rem;
  }
}

/* =========================
   Video Section
   ========================= */
.video-section {
  background-color: #1c2d59;
  font-family: Georgia, serif;
}
.video-section video {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* =========================
   Trending Carousel
   ========================= */
.trending-carousel-wrapper {
  position: relative;
}
.trending-carousel {
  display: flex;
  overflow: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}
.trending-carousel .card {
  flex: 0 0 calc(100% / 3);
  margin-right: 1rem;
  transition: transform 0.3s;
  border: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  scroll-snap-align: start;
}
.trending-carousel .card:hover {
  transform: translateY(-5px);
}
.trending-carousel .card-img-top {
  border-radius: 0.5rem 0.5rem 0 0;
}
.trending-carousel .card-body {
  font-family: Georgia, serif;
}
.trending-carousel .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: none;
  padding: 1rem;
  font-weight: 600;
}
.enroll-btn {
  background-color: #1c2d59;
  color: white;
  font-weight: bold;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 0.4rem;
}
.enroll-btn:hover {
  background-color: #f27b21;
  color: white;
}
.wishlist-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: white;
  border-radius: 50%;
  padding: 0.3rem;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  z-index: 1;
}
.carousel-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background-color: #203663;
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  z-index: 2;
}
.carousel-btn:hover {
  background-color: #d66612;
}
.carousel-btn.prev {
  left: -10px;
}
.carousel-btn.next {
  right: -10px;
}
@media (max-width: 992px) {
  .trending-carousel .card {
    flex: 0 0 calc(100% / 2);
  }
  .carousel-btn.prev {
    left: 0;
  }
  .carousel-btn.next {
    right: 0;
  }
}
@media (max-width: 576px) {
  .trending-carousel .card {
    flex: 0 0 100%;
  }
}

/* =========================
   Why Choose Dignity Medical Training?
   ========================= */
.why-dignity-section {
  padding: 3rem 0;
  background: linear-gradient(to right, #f27b21, #1c2d59);
  font-family: Georgia, serif;
}
.why-dignity-text {
  font-size: 1.1rem;
  font-family: Georgia, serif;
}
.why-dignity-text h2 {
  color: #f27b21;
}
.why-dignity-text p {
  color: #000;
  font-size: 1.1rem;
}

/* =========================
   Our Instructors
   ========================= */
.instructor-section {
  background-color: #f8f9fa;
  padding: 3rem 0;
  font-family: Georgia, serif;
}
.instructor-section h3 {
  font-size: 2rem;
  font-family: Georgia, serif;
}
.instructor-section p,
.instructor-section li {
  font-size: 1.1rem;
  font-family: Georgia, serif;
}
.instructor-card {
  height: 100%;
}
.instructor-card img {
  object-fit: cover;
  width: 100%;
  height: auto;
  border-radius: 1rem 1rem 0 0;
}
.instructor-card h5 {
  font-size: 1.25rem;
  font-family: Georgia, serif;
}
.instructor-card p {
  font-size: 1.05rem;
  font-family: Georgia, serif;
}
.view-instructors-btn {
  background-color: #f27b21;
  color: white;
  font-weight: bold;
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-family: Georgia, serif;
}
.view-instructors-btn:hover {
  background-color: #d66612;
}
@media (max-width: 768px) {
  .instructor-card {
    margin-bottom: 2rem;
  }
  .instructor-section .col-lg-4 {
    text-align: center;
  }
}

/* =========================
   Available Dates
   ========================= */
.calendar-container {
  font-family: Georgia, serif;
  padding: 3rem 0;
}
.calendar-sidebar h4 {
  font-size: 1.5rem;
  color: #1c2d59;
}
.calendar-sidebar p {
  font-size: 1.1rem;
  margin-top: 0.5rem;
}
.buttonnew {
  background-color: #1c2d59;
  color: #fff;
}
.buttonnew:hover {
  background-color: #f27b21;
  color: #fff;
}
@media (max-width: 768px) {
  .calendar-container .col-md-8,
  .calendar-container .col-md-4 {
    width: 100%;
    text-align: center;
  }
  .calendar-sidebar {
    margin-top: 2rem;
  }
}

/* =========================
   What makes us different?
   ========================= */
.difference-section {
  background-color: #fdfaf6;
  font-family: Georgia, serif;
  padding: 3rem 0;
}
.difference-heading {
  color: #1c2d59;
}
.difference-img {
  max-width: 100%;
  height: auto;
}
.view-courses-btn {
  background-color: #f27b21;
  border: none;
  color: white;
  font-weight: bold;
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
}
.zoom-courses-btn {
  color: #f27b21;
  border: 1px solid #f27b21;
  font-weight: bold;
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
}
.view-courses-btn:hover,
.zoom-courses-btn:hover {
  opacity: 0.9;
}
@media (max-width: 768px) {
  .difference-section .d-flex {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  .difference-section .text-center {
    text-align: center !important;
  }
}

/* =========================
   Our Mission
   ========================= */
.mission-section {
  font-family: Georgia, serif;
  padding: 3rem 0;
}
.mission-box {
  background-color: #1c2d59 !important;
  color: white;
}
.mission-img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  border-radius: 0;
}
@media (max-width: 992px) {
  .mission-section .mission-box {
    flex-direction: column-reverse;
  }
  .mission-section .col-lg-8,
  .mission-section .col-lg-4 {
    width: 100%;
  }
  .mission-section .col-lg-4 img {
    height: auto;
  }
}

/* =========================
   Testimonial
   ========================= */
.testimonial-section {
  background-color: #1c2d59;
  font-family: Georgia, serif;
}
.testimonial-box {
  background-color: white;
  color: black;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  margin: 0 auto;
}
.carousel-control-btn {
  background-color: #f27b21;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: white;
  border: none;
  margin: 0 5px;
}

/* =========================
   CTA
   ========================= */
.cta-section {
  background-color: #1c2d59;
  font-family: Georgia, serif;
  padding: 3rem 0;
}
.cta-section h2,
.cta-section h3,
.cta-section p {
  color: white;
}
.cta-input {
  max-width: 250px;
  font-family: Georgia, serif;
}
.cta-input[type="email"] {
  max-width: 300px;
}
.cta-btn {
  background-color: #f27b21;
  font-weight: bold;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
}
.cta-btn:hover {
  background-color: #d66612;
}
.cta-section .fs-3 a {
  transition: color 0.3s;
}
.cta-section .fs-3 a:hover {
  color: #f27b21;
}

/* =========================
   Footer
   ========================= */
.footer {
  background-color: #ffffff;
  color: #000000;
  font-family: Georgia, serif;
  font-size: 1.1rem;
}
.footer-logo {
  max-width: 120px;
}
.footer-heading {
  font-weight: bold;
  margin-bottom: 1.5rem;
}
.footer-link {
  color: #000000;
  text-decoration: none;
}
.footer-link:hover {
  text-decoration: underline;
}
.footer-copy {
  font-size: 1.1rem;
}
.footer .row.gy-5 {
  --bs-gutter-x: 1rem;
}
.footer .col-md-3.contact-column {
  flex: 0 0 auto;
  width: 30%;
}
.footer .col-md-3:not(.contact-column) {
  flex: 0 0 auto;
  width: 23.33%;
}
@media (max-width: 768px) {
  .footer .col-md-3 {
    width: 100% !important;
    text-align: center !important;
  }
  .footer .contact-column {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .footer .contact-column ul li.d-flex {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center;
    text-align: center !important;
  }
  .footer .contact-column ul li.d-flex i {
    margin-bottom: 0.5rem;
    margin-right: 0 !important;
    text-align: center;
  }
  .footer .contact-column ul li.d-flex span {
    display: block;
    text-align: center;
  }
  .footer .contact-column * {
    text-align: center !important;
  }
}

/* =========================
   Mobile overflow fix
   ========================= */
@media (max-width: 767.98px) {
  .container,
  .row,
  .col,
  .col-md-3,
  .col-md-9,
  .sidebar,
  section,
  .topbar,
  .card,
  .card-body,
  .input-group,
  .navbar {
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .topbar,
  nav,
  .sidebar {
    flex-wrap: wrap;
    justify-content: center !important;
    text-align: center;
  }
  .navbar img,
  .logo img,
  .logo-img {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
  }
  .text-center,
  .text-end,
  .text-start {
    text-align: center !important;
  }
  .input-group {
    flex-direction: column;
    align-items: center;
  }
  .input-group .form-control {
    text-align: center;
  }
  button,
  .btn,
  .form-control {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .calendar-sidebar,
  .calendar-column {
    text-align: center !important;
    align-items: center !important;
  }
  .card {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .calendar-container {
    padding: 1rem;
  }
}
