/* Base responsive utilities for all screen sizes */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.text-justify {
  text-align: justify !important;
}

/* Custom height classes with percentage fallbacks */
.vh-75 {
  height: 75vh;
  min-height: 450px;
}

.vh-50 {
  height: 50vh;
  min-height: 300px;
}

.vh-25 {
  height: 25vh;
  min-height: 150px;
}

.w-30 {
  width: 30%;
}


/* Large Desktop Styles (1560px and up) */
@media (min-width: 1560px) {
  .header {
    height: 100vh;
  }

  .header h1 {
    font-size: 8rem;
  }

  .values > div {
    height: 75vh !important;
    max-height: 700px;
  }

  .expertise-cards > div {
    height: 50vh;
    margin: 10px 0;
  }

  .card {
    height: 50vh;
  }
}

/* Desktop Styles (1200px to 1559px) */
@media (min-width: 1200px) and (max-width: 1559px) {
  .header h1 {
    font-size: 6rem;
  }

  .forward_rectangle h2 {
    font-size: 4.5rem;
  }

  .contact {
    height: auto;
    min-height: 150vh;
    padding-bottom: 60px;
  }
}

/* Tablet Landscape to Desktop (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .header h1 {
    font-size: 5rem;
  }

  .header .d-flex {
    width: 70% !important;
  }

  .forward_rectangle h2 {
    font-size: 3.5rem;
  }

  .back_rectangle {
    width: 80%;
  }

  .contact {
    height: auto;
    min-height: 140vh;
    padding-bottom: 60px;
  }

  .copyright {
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    margin-top: 30px;
  }

  .w-30 {
    width: 45%;
  }
}

@media (min-width: 992px) {
  .custom-vh-lg-50 {
    height: 50vh;
  }
}

/* Tablet Portrait (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .header h1 {
    font-size: 4rem;
  }

  .header .d-flex {
    width: 80% !important;
    padding: 2rem !important;
  }

  .header p {
    font-size: 1.2rem !important;
  }

  .back_rectangle {
    position: absolute;
    top: -155px;
    left: 30px;
    right: 0;
    height: 95%;
    width: 75%;
    background-color: #f4b942;
    border-radius: 6px;
    z-index: 0;
  }
  
  .forward_rectangle {
    position: relative;
    width: 87%;
    height: 45vh;
    padding: 1rem 1.25rem 0.75rem;
    background-color: #fff;
    border-radius: 6px;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }

  .forward_rectangle h2 {
    font-size: 3rem;
  }

  .vision {
    height: 25vh;
  }

  .section_2 {
    flex-direction: column !important;
    margin-top: 2rem !important;
    margin-bottom: 3rem !important;
  }

  .section_2 p,
  .section_2 .col-md-5 {
    width: 100%;
  }

  .w-30 {
    width: 45%;
  }

  .values > div {
    margin: 1rem 0;
  }

  .card {
    height: auto;
    min-height: 450px;
  }

  .contact {
    height: auto;
    padding: 80px 0 40px;
  }

  .contactBox {
    position: relative;
    top: 0;
    margin-bottom: 40px;
  }

  .contactForm {
    position: relative;
    top: 0;
  }

  .copyright {
    position: relative;
    text-align: center;
    width: 100%;
    left: 0;
    margin-top: 30px;
  }
}

/* Mobile Landscape to Tablet Portrait (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .navbar-brand img {
    max-width: 120px !important;
  }

  .header h1 {
    font-size: 3.5rem;
    text-align: center;
  }

  .header .d-flex {
    width: 100% !important;
    padding: 1.5rem !important;
  }

  .header p {
    font-size: 1.2rem !important;
  }

  .vision {
    height: 20vh;
  }

  .back_rectangle {
    width: 90%;
    height: 30vh;
    top: -15vh;
  }

  .forward_rectangle {
    width: 95%;
    height: 40vh;
  }

  .forward_rectangle h2 {
    font-size: 2.5rem;
  }

  .forward_rectangle p {
    font-size: 1rem;
  }

  .section_2 {
    flex-direction: column !important;
    margin-top: 1.5rem !important;
  }

  .section_2 p,
  .section_2 .col-md-5 {
    width: 100%;
  }

  .w-30 {
    width: 80%;
  }

  .values > div {
    width: 90%;
    margin: 1rem auto;
  }

  .services {
    height: auto !important;
    min-height: 80vh;
    padding-bottom: 40px;
  }

  .carousel {
    height: auto !important;
    min-height: 60vh;
  }

  .carousel-inner {
    height: auto !important;
    min-height: 60vh;
  }

  .services .carousel-item h2 {
    font-size: 1.5rem;
  }

  .expertise-cards .col-md-3,
  .expertise-cards .col-md-4 {
    width: 85%;
  }

  .card {
    height: auto;
    min-height: 400px;
    margin-bottom: 1rem;
  }

  .contact {
    height: auto;
    padding: 60px 0 30px;
  }

  .contactBox {
    position: relative;
    top: 0;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
  }

  .contactBox > div {
    width: 85%;
    margin: 1rem auto;
    height: auto !important;
    min-height: 200px;
  }

  .contactForm {
    position: relative;
    top: 0;
    flex-direction: column-reverse !important;
  }

  .leftSide,
  .formSide {
    width: 85%;
    margin: 1rem auto;
  }

  .form label,
  .form input[type="text"],
  .form input[type="email"],
  .form textarea {
    width: 100%;
  }

  .form button {
    width: 100% !important;
  }

  .copyright {
    position: relative;
    text-align: center;
    width: 100%;
    left: 0;
    margin-top: 20px;
  }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
  .navbar-brand img {
    max-width: 100px !important;
  }

  .header {
    height: 100vh;
  }

  .header h1 {
    font-size: 2.5rem;
    text-align: center;
  }

  .header .d-flex {
    width: 100% !important;
    padding: 1rem !important;
  }

  .header p {
    font-size: 1rem !important;
  }
  .bg-vision{
    height: 50vh !important;
  }
  .bg-vision img {
    height: 50vh !important;
    object-fit: cover;
  }

  .vision{
    height: 20vh;
  }
  .back_rectangle {
    position: relative;
    width: 95%;
    top: -10vh;
    margin: 0 auto;
    background-color: #f4b942; /* or whatever your yellow is */
    height: 25vh;
    padding: 10px;
    z-index: 0;
    border-radius: 6px;
  }

  .forward_rectangle {
    position: relative;
    width: 100%;
    background-color: #fff;
    padding: 1rem 1rem 0.75rem;
    z-index: 1;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    height: 45vh;
  }

  .forward_rectangle h2 {
    font-size: 2rem;
    margin: 0.5rem !important;
  }

  .forward_rectangle p {
    font-size: 0.9rem;
    margin: 0.5rem !important;
  }
  
  .section_2 {
    flex-direction: column !important;
    margin-top: 1rem !important;
    height: auto !important;
  }

  .section_2 p,
  .section_2 .col-md-5 {
    width: 100%;
    font-size: 0.9rem !important;
  }

  .values > div {
    width: 95%;
    margin: 0.75rem auto;
    height: auto !important;
    min-height: 450px;
  }

  .value-cards {
    width: 95% !important;
  }

  .services {
    height: auto !important;
    min-height: 90vh;
    padding-bottom: 30px;
  }

  .carousel {
    height: auto !important;
  }

  .carousel-inner {
    width: 95% !important;
    height: auto !important;
    padding: 15px !important;
  }

  .services .carousel-item h2 {
    font-size: 1.25rem;
  }

  .services .carousel-item ul {
    padding: 0;
  }

  .services .carousel-item li {
    font-size: 0.9rem;
  }

  .expertise-cards .col-md-3,
  .expertise-cards .col-md-4 {
    width: 95%;
  }

  .expertise-cards .col-md-4 > div {
    height: auto !important;
  }

  .card {
    height: auto;
    min-height: 350px;
    margin-bottom: 1rem;
    padding: 1rem !important;
  }

  .card h4 {
    font-size: 1.25rem;
  }

  .card p {
    font-size: 0.9rem;
  }

  .contact {
    height: auto;
    padding: 40px 0 20px;
  }

  .contactBox {
    position: relative;
    top: 0;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
  }

  .contactBox > div {
    width: 95%;
    margin: 0.75rem auto;
    height: auto !important;
    min-height: 180px;
    padding: 15px !important;
  }

  .contactForm {
    position: relative;
    top: 0;
    flex-direction: column-reverse !important;
    width: 100%;
  }

  .leftSide,
  .formSide {
    width: 95%;
    margin: 0.75rem auto;
  }

  .leftSide h2 {
    font-size: 1.5rem;
  }

  .leftSide ul {
    width: 80% !important;
  }

  .form {
    padding: 15px !important;
  }

  .form label,
  .form input[type="text"],
  .form input[type="email"],
  .form textarea {
    width: 100%;
  }

  .form button {
    width: 100% !important;
  }

  .copyright {
    position: relative;
    text-align: center;
    width: 100%;
    left: 0;
    font-size: 0.8rem;
    margin-top: 15px;
  }
}

/* Extra Small Mobile Devices (375px and below) */
@media (max-width: 375px) {
  .header h1 {
    font-size: 2rem;
  }

  .forward_rectangle h2 {
    font-size: 1.5rem;
  }

  .card {
    min-height: 320px;
  }

  .expertise h2 {
    font-size: 1.5rem;
  }

  .contactBox > div h2 {
    font-size: 1.25rem;
  }
}

/* Fix Bootstrap Carousel on small screens */
@media (max-width: 767px) {
  .carousel-inner .row {
    flex-direction: column;
  }

  .carousel-inner .col-md-6 {
    width: 100%;
    margin-bottom: 10px;
  }

  .carousel-item h4 {
    text-align: center;
    margin-top: 10px;
  }
}

/* Fix header and navigation on all screen sizes */
.navbar {
  transition: all 0.3s ease;
}

.navbar-collapse {
  transition: all 0.3s ease;
}

@media (max-width: 991px) {
  .navbar-nav {
    padding: 1rem;
  }

  .nav-item {
    margin: 5px 0;
  }
}

/* Fix image responsiveness */
img {
  max-width: 100%;
  height: auto;
}

/* Fix background images */
.header {
  background-image: url(./images/home2.webp);
  background-size: cover;
  background-position: center;
  height: 100vh;
}

.services {
  background-image: url(./images/our\ services.webp);
  background-size: cover;
  background-position: center;
}

/* Fix form responsiveness */
.form label,
.form input[type="text"],
.form input[type="email"],
.form textarea {
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .form label,
  .form input[type="text"],
  .form input[type="email"],
  .form textarea {
    width: 100%;
  }
}
