/********** Template CSS **********/
:root {
  --primary: #b78d65;
  --light: #f8f8f8;
  --dark: #252525;
}

/* Base Typography */
h1, h2, .h1, .h2, .fw-bold {
  font-weight: 600 !important;
}

h3, h4, .h3, .h4, .fw-medium {
  font-weight: 500 !important;
}

h5, h6, .h5, .h6, .fw-normal {
  font-weight: 400 !important;
}

/* Mobile Typography */
@media (max-width: 576px) {
  h1, .h1 { font-size: 1.8rem !important; }
  h2, .h2 { font-size: 1.6rem !important; }
  h3, .h3 { font-size: 1.4rem !important; }
  h4, .h4 { font-size: 1.2rem !important; }
  h5, .h5 { font-size: 1.1rem !important; }
  h6, .h6 { font-size: 1rem !important; }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  display: none;
  right: 30px;
  bottom: 30px;
  z-index: 99;
}

@media (max-width: 768px) {
  .back-to-top {
    right: 20px;
    bottom: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 576px) {
  .back-to-top {
    right: 15px;
    bottom: 15px;
    width: 40px;
    height: 40px;
  }
}

/*** Spinner ***/
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity 0.5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/*** Button ***/
.btn {
  font-weight: 500;
  transition: 0.5s;
}

.btn.btn-primary,
.btn.btn-secondary {
  color: #ffffff;
}

.btn-square {
  width: 38px;
  height: 38px;
}

.btn-sm-square {
  width: 32px;
  height: 32px;
}

.btn-lg-square {
  width: 48px;
  height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
}

/* Mobile Button Adjustments */
@media (max-width: 768px) {
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .btn-lg {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
  
  .btn-square { width: 35px; height: 35px; }
  .btn-sm-square { width: 30px; height: 30px; }
  .btn-lg-square { width: 40px; height: 40px; }
}

.btn-outline-body {
  color: var(--primary);
  border-color: #777777;
}

.btn-outline-body:hover {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

/*** Navbar ***/
.navbar .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  vertical-align: middle;
  margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
  margin-right: 30px;
  padding: 30px 0;
  color: var(--dark);
  font-weight: 500;
  text-transform: uppercase;
  outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
  color: var(--primary);
}

.navbar.sticky-top {
  top: -100px;
  transition: 0.5s;
}

/* Enhanced Mobile Navbar */
@media (max-width: 991.98px) {
  .navbar {
    padding: 0.5rem 1rem;
  }
  
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  .navbar .navbar-nav .nav-link {
    margin-right: 0;
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .navbar .navbar-nav {
    border-top: 1px solid #eeeeee;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }
  
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .navbar {
    padding: 0.5rem 0.8rem;
  }
  
  .navbar-brand {
    font-size: 1rem;
  }
  
  .navbar .navbar-nav .nav-link {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

@media (min-width: 992px) {
  .navbar .nav-item .dropdown-menu {
    display: block;
    visibility: hidden;
    top: 100%;
    transform: rotateX(-75deg);
    transform-origin: 0% 0%;
    transition: 0.5s;
    opacity: 0;
  }

  .navbar .nav-item:hover .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    transition: 0.5s;
    opacity: 1;
  }
}

/*** Header ***/
.owl-carousel-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
}

/* Enhanced Header Mobile Responsiveness */
.header-carousel,
.owl-carousel-item {
  height: 100vh;
}

.owl-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.owl-carousel-inner {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.owl-carousel-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.owl-carousel-inner > .container {
  position: relative;
  z-index: 2;
}

@media (max-width: 992px) {
  .header-carousel,
  .owl-carousel-item {
    height: 70vh;
    min-height: 500px;
  }
  
  .owl-carousel-inner {
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  .header-carousel,
  .owl-carousel-item {
    height: 60vh;
    min-height: 400px;
  }
  
  .header-carousel .owl-carousel-item p {
    font-size: 16px !important;
    line-height: 1.6;
  }
  
  .owl-carousel-inner {
    padding: 0 10px;
  }
}

@media (max-width: 576px) {
  .header-carousel,
  .owl-carousel-item {
    height: 90vh;
    min-height: 350px;
  }
  
  .header-carousel .owl-carousel-item p {
    font-size: 14px !important;
    line-height: 1.5;
  }
  
  .owl-carousel-inner {
    padding: 0 8px;
  }
}

/* Carousel Dots Mobile Enhancement */
.header-carousel .owl-dots {
  position: absolute;
  width: 60px;
  height: 100%;
  top: 0;
  right: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header-carousel .owl-dots .owl-dot {
  position: relative;
  width: 45px;
  height: 45px;
  margin: 5px 0;
  background: var(--dark);
  transition: 0.5s;
}

.header-carousel .owl-dots .owl-dot.active {
  width: 60px;
  height: 60px;
}

@media (max-width: 768px) {
  .header-carousel .owl-dots {
    right: 15px;
    width: 40px;
  }
  
  .header-carousel .owl-dots .owl-dot {
    width: 35px;
    height: 35px;
    margin: 3px 0;
  }
  
  .header-carousel .owl-dots .owl-dot.active {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 576px) {
  .header-carousel .owl-dots {
    right: 10px;
    width: 30px;
  }
  
  .header-carousel .owl-dots .owl-dot {
    width: 25px;
    height: 25px;
    margin: 2px 0;
  }
  
  .header-carousel .owl-dots .owl-dot.active {
    width: 30px;
    height: 30px;
  }
}

.header-carousel .owl-dots .owl-dot img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 2px;
  transition: 0.5s;
  opacity: 0.3;
}

.header-carousel .owl-dots .owl-dot.active img {
  opacity: 1;
}

/* Page Header */
.page-header {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(https://oxford-dubai.com/images/dentistry-service.jpg) center center
      no-repeat;
  background-size: cover;
  min-height: 300px;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .page-header {
    min-height: 250px;
  }
}

@media (max-width: 576px) {
  .page-header {
    min-height: 200px;
  }
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--light);
}

/*** Section Title ***/
.section-title {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .section-title {
    letter-spacing: 3px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .section-title {
    letter-spacing: 2px;
    font-size: 0.8rem;
  }
}

/*** Facts ***/
.fact-item .fact-icon {
  width: 120px;
  height: 120px;
  margin-top: -60px;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 120px;
  transition: 0.5s;
}

@media (max-width: 768px) {
  .fact-item .fact-icon {
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .fact-item .fact-icon {
    width: 80px;
    height: 80px;
    margin-top: -40px;
    margin-bottom: 0.8rem;
  }
  
  .fact-item {
    margin-bottom: 2rem;
  }
}

.fact-item:hover .fact-icon {
  background: var(--dark);
}

.fact-item .fact-icon i {
  color: var(--primary);
  transition: 0.5;
}

.fact-item:hover .fact-icon i {
  color: #ffffff;
}

/*** About & Feature ***/
.about-img,
.feature-img {
  position: relative;
  height: 100%;
  min-height: 400px;
}

.about-img img,
.feature-img img {
  position: absolute;
  width: 60%;
  height: 80%;
  object-fit: cover;
}

.about-img img:last-child,
.feature-img img:last-child {
  margin: 20% 0 0 40%;
}

.about-img::before,
.feature-img::before {
  position: absolute;
  content: "";
  width: 60%;
  height: 80%;
  top: 10%;
  left: 20%;
  border: 5px solid var(--primary);
  z-index: -1;
}

@media (max-width: 768px) {
  .about-img,
  .feature-img {
    min-height: 300px;
    margin-bottom: 2rem;
  }
  
  .about-img::before,
  .feature-img::before {
    border-width: 3px;
  }
}

@media (max-width: 576px) {
  .about-img,
  .feature-img {
    min-height: 250px;
  }
  
  .about-img img,
  .feature-img img {
    width: 70%;
    height: 85%;
  }
  
  .about-img img:last-child,
  .feature-img img:last-child {
    margin: 15% 0 0 30%;
  }
}

/*** Service ***/
.service-item .bg-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.service-item .service-text {
  background: var(--light);
  transition: 0.5s;
  padding: 2rem;
}

.service-item:hover .service-text {
  background: rgba(0, 0, 0, 0.7);
}

.service-item * {
  transition: 0.5;
}

.service-item:hover * {
  color: #ffffff;
}

.service-item .btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--dark);
  background: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  transition: 0.5s;
}

.service-item:hover .btn {
  width: 140px;
}

@media (max-width: 768px) {
  .service-item .service-text {
    padding: 1.5rem;
  }
  
  .service-item {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 576px) {
  .service-item .service-text {
    padding: 1rem;
  }
  
  .service-item .btn {
    width: 35px;
    height: 35px;
  }
  
  .service-item:hover .btn {
    width: 120px;
  }
}

/*** Project ***/
.project .nav .nav-link {
  background: var(--light);
  transition: 0.5s;
  padding: 1rem;
}

.project .nav .nav-link.active {
  background: var(--primary);
}

.project .nav .nav-link.active h3 {
  color: #ffffff !important;
}

@media (max-width: 768px) {
  .project .nav .nav-link {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .project .nav .nav-link h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .project .nav .nav-link {
    padding: 0.6rem;
    text-align: center;
  }
  
  .project .nav .nav-link h3 {
    font-size: 1rem;
  }
}

/*** Team ***/
.team-items {
  margin: -0.75rem;
}

.team-item {
  padding: 0.75rem;
}

.team-item::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 0;
  top: 0;
  left: 0;
  background: #ffffff;
  transition: 0.5s;
  z-index: -1;
}

.team-item:hover::after {
  height: 100%;
  background: var(--primary);
}

.team-item .team-social {
  position: absolute;
  width: 100%;
  bottom: -20px;
  left: 0;
}

.team-item .team-social .btn {
  display: inline-flex;
  margin: 0 2px;
  color: var(--primary);
  background: var(--light);
}

.team-item .team-social .btn:hover {
  color: #ffffff;
  background: var(--primary);
}

@media (max-width: 768px) {
  .team-items {
    margin: -0.5rem;
  }
  
  .team-item {
    padding: 0.5rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .team-item .team-social .btn {
    margin: 0 1px;
    width: 35px;
    height: 35px;
  }
}

/*** Appointment ***/
.bootstrap-datetimepicker-widget.bottom {
  top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
  border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
  font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
  padding: 10px;
  border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
  background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
  border-bottom-color: var(--primary);
}

.appointment-btn {
  width: 100%;
  padding: 1rem;
  background-color: #8d6744;
  color: #fff;
  font-size: 1.1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.appointment-btn:hover {
  background-color: #7c5738;
}

@media (max-width: 768px) {
  .appointment-btn {
    padding: 0.8rem;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .appointment-btn {
    padding: 0.7rem;
    font-size: 0.9rem;
  }
}

/*** Testimonial ***/
.testimonial-carousel {
  display: flex !important;
  flex-direction: column-reverse;
  max-width: 700px;
  margin: 0 auto;
}

.testimonial-carousel .owl-dots {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.testimonial-carousel .owl-dots .owl-dot {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 5px;
  transition: 0.5s;
}

.testimonial-carousel .owl-dots .owl-dot.active {
  width: 100px;
  height: 100px;
}

@media (max-width: 768px) {
  .testimonial-carousel .owl-dots {
    height: 80px;
    margin-bottom: 20px;
  }
  
  .testimonial-carousel .owl-dots .owl-dot {
    width: 50px;
    height: 50px;
    margin: 0 3px;
  }
  
  .testimonial-carousel .owl-dots .owl-dot.active {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 576px) {
  .testimonial-carousel .owl-dots {
    height: 60px;
    margin-bottom: 15px;
  }
  
  .testimonial-carousel .owl-dots .owl-dot {
    width: 40px;
    height: 40px;
    margin: 0 2px;
  }
  
  .testimonial-carousel .owl-dots .owl-dot.active {
    width: 60px;
    height: 60px;
  }
}

.testimonial-carousel .owl-dots .owl-dot::after {
  position: absolute;
  width: 40px;
  height: 40px;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  content: "\f10d";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: var(--primary);
  background: #ffffff;
  border-radius: 40px;
  transition: 0.5s;
  opacity: 0;
}

.testimonial-carousel .owl-dots .owl-dot.active::after {
  opacity: 1;
}

.testimonial-carousel .owl-dots .owl-dot img {
  opacity: 0.4;
  transition: 0.5s;
}

.testimonial-carousel .owl-dots .owl-dot.active img {
  opacity: 1;
}

/*** Footer ***/
.footer .btn.btn-link {
  display: block;
  margin-bottom: 5px;
  padding: 0;
  text-align: left;
  color: #777777;
  font-weight: normal;
  text-transform: capitalize;
  transition: 0.3s;
}

.footer .btn.btn-link::before {
  position: relative;
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: var(--primary);
  margin-right: 10px;
}

.footer .btn.btn-link:hover {
  color: var(--primary);
  letter-spacing: 1px;
  box-shadow: none;
}

.footer .form-control {
  border-color: #777777;
}

.footer .copyright {
  padding: 25px 0;
  font-size: 15px;
  border-top: 1px solid rgba(256, 256, 256, 0.1);
}

.footer .copyright a {
  color: var(--light);
}

.footer .copyright a:hover {
  color: var(--primary);
}

@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer .copyright {
    padding: 20px 0;
    font-size: 14px;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .footer {
    padding: 1.5rem 0 0.5rem;
  }
  
  .footer .copyright {
    padding: 15px 0;
    font-size: 13px;
  }
}

/*** Gallery ***/
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #b78d658e;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay i {
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.gallery-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 20px 15px 15px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-title {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .gallery-item {
    margin-bottom: 1rem;
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  .gallery-overlay i {
    font-size: 1.8rem;
  }
  
  .gallery-title {
    padding: 15px 12px 12px;
  }
}

@media (max-width: 576px) {
  .gallery-item {
    border-radius: 8px;
  }
  
  .gallery-item img {
    height: 180px;
  }
  
  .gallery-overlay i {
    font-size: 1.5rem;
  }
  
  .gallery-title {
    padding: 12px 10px 10px;
    font-size: 0.9rem;
  }
}

/* Modal styles for full-size images */
.modal-dialog-full {
  max-width: 90vw;
  margin: 5vh auto;
}

.modal-body img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .modal-dialog-full {
    max-width: 95vw;
    margin: 2vh auto;
  }
}

/* Quote Line */
.quote-line {
  color: #007bff;
  cursor: pointer;
  transition: color 0.3s;
  font-weight: 500;
}

.quote-line:hover {
  color: #0056b3;
}

@media (max-width: 576px) {
  .quote-line {
    font-size: 0.9rem;
  }
}

/*** Video Section ***/
.video-item {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s;
  margin-bottom: 1.5rem;
}

.video-item:hover {
  transform: scale(1.03);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(22, 22, 22, 0.6);
  opacity: 0;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-item:hover .video-overlay {
  opacity: 1;
}

.video-overlay i {
  font-size: 48px;
  color: #fff;
}

.video-title {
  background-color: #f8f9fa;
  padding: 15px;
  text-align: center;
  border-top: 1px solid #dee2e6;
}

/* Enhanced Video Mobile Responsiveness */
@media (max-width: 992px) {
  .video-overlay i {
    font-size: 40px;
  }
  
  .video-title h5 {
    font-size: 17px;
    margin-bottom: 0.5rem;
  }
  
  .video-title p {
    font-size: 14px;
    margin-bottom: 0;
  }
}

@media (max-width: 576px) {
  .video-item {
    margin-bottom: 20px;
    border-radius: 6px;
  }
  
  .video-overlay i {
    font-size: 30px;
  }
  
  .video-title {
    padding: 12px 8px;
  }
  
  .video-title h5 {
    font-size: 16px;
    margin-bottom: 0.3rem;
  }
  
  .video-title p {
    font-size: 12px;
    line-height: 1.4;
  }
}

/* Additional Mobile Optimizations */

/* Container and Layout Adjustments */
@media (max-width: 1200px) {
  .container {
    max-width: 95%;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Section spacing */
  section {
    padding: 3rem 0 2rem;
  }
  
  /* Row gutters */
  .row {
    margin-left: -10px;
    margin-right: -10px;
  }
  
  .row > * {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  section {
    padding: 2rem 0 1.5rem;
  }
  
  .row {
    margin-left: -8px;
    margin-right: -8px;
  }
  
  .row > * {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* Form Controls Mobile Enhancement */
@media (max-width: 768px) {
  .form-control {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .form-select {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
}

@media (max-width: 576px) {
  .form-control {
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
  }
  
  .form-select {
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
  }
  
  .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
  }
}

/* Card Components Mobile Enhancement */
@media (max-width: 768px) {
  .card {
    margin-bottom: 1.5rem;
  }
  
  .card-body {
    padding: 1.2rem;
  }
  
  .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }
  
  .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

@media (max-width: 576px) {
  .card-body {
    padding: 1rem;
  }
  
  .card-title {
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }
  
  .card-text {
    font-size: 0.85rem;
    line-height: 1.4;
  }
}

/* List and Content Mobile Enhancement */
@media (max-width: 768px) {
  ul, ol {
    padding-left: 1.2rem;
  }
  
  li {
    margin-bottom: 0.3rem;
  }
  
  p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  ul, ol {
    padding-left: 1rem;
  }
  
  li {
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
  }
  
  p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
  }
}

/* Table Responsiveness */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.85rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem 0.3rem;
  }
}

@media (max-width: 576px) {
  .table-responsive {
    font-size: 0.8rem;
  }
  
  .table th,
  .table td {
    padding: 0.4rem 0.2rem;
  }
}

/* Image Responsiveness Enhancement */
img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .img-fluid {
    border-radius: 8px;
  }
}

@media (max-width: 576px) {
  .img-fluid {
    border-radius: 6px;
  }
}

/* Spacing Utilities Mobile Override */
@media (max-width: 768px) {
  .py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
  .py-4 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .py-3 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
  .my-5 { margin-top: 2.5rem !important; margin-bottom: 2.5rem !important; }
  .my-4 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
  .my-3 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
}

@media (max-width: 576px) {
  .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
  .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .my-5 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
  .my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
  .my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
}

/* Text Alignment Mobile Utilities */
@media (max-width: 768px) {
  .text-md-center { text-align: center !important; }
  .text-md-left { text-align: left !important; }
  .text-md-right { text-align: right !important; }
}

@media (max-width: 576px) {
  .text-sm-center { text-align: center !important; }
  .text-sm-left { text-align: left !important; }
  .text-sm-right { text-align: right !important; }
}

/* Flexbox Mobile Utilities */
@media (max-width: 768px) {
  .flex-md-column { flex-direction: column !important; }
  .flex-md-row { flex-direction: row !important; }
  .justify-content-md-center { justify-content: center !important; }
  .align-items-md-center { align-items: center !important; }
}

@media (max-width: 576px) {
  .flex-sm-column { flex-direction: column !important; }
  .flex-sm-row { flex-direction: row !important; }
  .justify-content-sm-center { justify-content: center !important; }
  .align-items-sm-center { align-items: center !important; }
}

/* Display Mobile Utilities */
@media (max-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-inline { display: inline !important; }
  .d-md-inline-block { display: inline-block !important; }
  .d-md-flex { display: flex !important; }
}

@media (max-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-inline { display: inline !important; }
  .d-sm-inline-block { display: inline-block !important; }
  .d-sm-flex { display: flex !important; }
}

/* Touch-friendly Interactive Elements */
@media (max-width: 768px) {
  a, button, .btn, input[type="submit"], input[type="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Increase tap targets for better mobile UX */
  .nav-link, .dropdown-item {
    padding: 0.75rem 1rem;
  }
}

/* Scrollbar Styling for Mobile */
@media (max-width: 768px) {
  /* Webkit browsers */
  ::-webkit-scrollbar {
    width: 6px;
  }
  
  ::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: #a67c59;
  }
}

/* Performance Optimizations */
@media (max-width: 768px) {
  /* Reduce animations on mobile for better performance */
  .reduce-motion {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  /* Optimize hover effects for touch devices */
  @media (hover: none) {
    .gallery-item:hover,
    .service-item:hover,
    .team-item:hover,
    .video-item:hover {
      transform: none;
    }
    
    .gallery-item:hover .gallery-overlay,
    .video-item:hover .video-overlay {
      opacity: 0.8;
    }
  }
} h5 {
    font-size: 18px;
  }
  
  .video-title p {
    font-size: 14px;
  }


@media (max-width: 576px) {
    .video-item {
        margin-bottom: 20px;
    }
    .video-title {
        padding: 12px 8px;
    }
    .video-title h5 {
        font-size: 16px;
    }
    .video-title p {
        font-size: 12px;
    }
}

/* special cases */
.case-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  color: #333;
}

.case-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  background-color: #7c5738; /* Hover background color */
  color: #fff;
}

.case-img {
  height: 230px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.case-card:hover .case-img {
  transform: scale(1.08);
  filter: brightness(0.85);
}

.case-card h5 {
  font-size: 1.75rem;
  margin: 1rem 1rem 0.5rem;
  transition: color 0.3s ease;
}

.case-card p {
  font-size: 0.95rem;
  margin: 0 1rem 1rem;
  transition: color 0.3s ease;
  flex-grow: 1;
  color: #555;
}

.case-card:hover h5,
.case-card:hover p {
  color: #fff;
}

/* Responsive support for card height and layout */
@media (min-width: 768px) {
  .case-card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .case-card p {
    flex-grow: 1;
  }
}


.team-item img {
  height: 350px; /* Set desired uniform height */
  object-fit: cover; /* Crop and fit the image nicely */
  width: 100%;
}
