/* Global styles */
*::before,
::after {
  box-sizing: border-box;
  font-family: Kanit, sans-serif;
}

body {
  background-color: white;
  margin: 0; /* Ensure no default margin */
  z-index: 0;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.carousel {
  height: 100vh;
  width: 100vw;
  z-index: 1; /* Ensure it is below the fixed header */
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: 400ms opacity ease-in-out;
}

.slide[data-active] {
  position: absolute;
  inset: 0;
  opacity: 1;
  transition: 400ms opacity ease-in-out;
}

.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-button {
  position: absolute;
  border: none;
  font-size: 4rem;
  background: none;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  color: rgba(225, 225, 255, 0.5);
  cursor: pointer;
  border-radius: 0.25rem;
  padding: 0 0.5rem;
  background-color: rgba(0, 0, 0, 0.1);
}

.carousel-button:hover,
.carousel-button:focus {
  color: white;
  background-color: rgba(0, 0, 0, 0.2);
}

.carousel-button.next {
  right: 1rem;
}

.carousel-button.prev {
  left: 1rem;
}

.fixed-header {
  display: flex;
  width: 100%;
  position: absolute;
  left: 0;
  align-items: center;
  box-sizing: border-box;
  z-index: 4; /* Ensure it stays on top */
  background-color: black;
}

.fixed-header .logo img {
  height: 100px;
  margin-left: 20px;
  margin-right: auto;
  flex-shrink: 1;
}

.contact-button {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 50px;
  width: 100%;
  margin-top: -20px;
}

/* Services section*/
section[aria-label="Our Services"] {
  height: auto; /* Occupy the full height of the viewport */
  width: 100%; /* Occupy the full width of the viewport */
  display: flex; /* Enable flexible alignment of content */
  align-items: center; /* Vertically center the content */
  flex-direction: column;
  justify-content: center; /* Horizontally center the content */
  padding: 20px; /* Add some padding for spacing */
  box-sizing: border-box; /* Include padding and border in the width and height */
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px; /* Add padding if needed for spacing */
  box-sizing: border-box;
  font-family: Raleway, sans-serif;
  font-weight: 200;
}

.services-wrapper {
  display: flex;
  flex-direction: row; /* Align header and container in a row */
  align-items: flex-start; /* Align items to the top */
  width: 100%; /* Occupy the full width of the section */
  padding: 20px; /* Add padding for spacing */
  box-sizing: border-box;
}

.Services-Header {
  flex: 0 0 20%;
  text-align: center; /* Center the header text */
  font-size: xxx-large; /* Large font for emphasis */
  color: black;
  margin-top: -40px;
  font-size: 4rem;
}

.services-container {
  flex: 1;
  display: flex;
  flex-direction: row;
  opacity: 1;
  width: 100%;
  transition: opacity 1s ease-in-out;
  justify-content: center;
}

.services-list {
  display: flex;
  flex: 1;
  color: black;
  justify-content: center;
  font-size: 2rem;
}

.services-list p {
  cursor: pointer;
  padding: 25px;
  font-size: xx-large;
  transition: color 0.3s;
}

.services-list p:hover,
.services-list p.active {
  color: green;
}

.description {
  flex: 3;
  display: flex;
  align-items: center;
  border-left: 2px solid white;
  justify-content: center;
}

/* Service Description and Image Styling */
.service-description {
  display: none;
  opacity: 0;
  transition: opacity 3s ease-in-out;
  color: black;
}

.service-description.active {
  display: flex;
  animation: fadeIn 3s forwards;
  padding-top: 30px;
  flex-direction: right;
  justify-content: center;
  align-items: center;
}
.parawrapper {
  display: flex; /* Enable Flexbox */
  align-items: center; /* Vertically center the child (p) */
  justify-content: center; /* Horizontally center the text (optional) */
  height: 30.5rem;
}

.parawrapper p {
  font-size: xx-large;
  margin: 0; /* Remove default margin */
  text-align: center; /* Ensure text is centered horizontally */
  line-height: 1.6;
  max-width: 1200px;
}

.service-description.active img.serviceimg {
  width: 26.3rem; /* Specifying width */
  height: auto; /* Specifying height */
  margin: 5px; /* Adjust margin as needed */
}

@media screen and (max-width: 1150px) {
  .serviceimg {
    display: none;
  }
}
@media screen and (max-width: 1012px) {
  .parawrapper p {
    font-size: 2.5vw;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInSection {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.contact-us,
.menu-button {
  padding: 5px;
  margin-left: 10px; /* Adds space between the contact-us and menu */
}

.contact-us {
  position: fixed;
  font-family: Kanit, sans-serif;
}

.menu-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 5; /* Ensure it stays on top */
  transition: transform 0.3s ease; /* Add transition for rotation */
  margin-top: -20px;
}

.menu-toggle.active {
  transform: rotate(45deg); /* Rotate when active */
}

.menu-line {
  width: 30px;
  height: 4px;
  background-color: black;
  margin: 3px 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease; /* Add transition for lines */
}

.menu-toggle.active .menu-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg); /* Transform top line */
}

.menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0; /* Hide middle line */
}

.menu-toggle.active .menu-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg); /* Transform bottom line */
}

.dropdown-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: black;
  z-index: 10; /* Ensure it stays on top */
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s,
    visibility 0.5s;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu a,
.dropdown-menu .back-button {
  color: white;
  text-decoration: none;
  padding: 10px; /* Reduced padding for smaller highlight boxes */
  font-size: 24px;
  text-align: center;
  display: table;
  font-family: kanit, sans-serif;
}

.dropdown-menu a:hover,
.dropdown-menu .back-button:hover {
  color: green; /* Change text color to green */
}

/* Move the back button to the right */
.back-button {
  position: absolute;
  top: 20px;
  right: 20px; /* Moved to the right side */
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* Contact us button styling */
.contact-us button {
  background-color: black; /* Default white background */
  color: white; /* Black text color */
  border: 1px solid white; /* Border matching the background */
  padding: 9px 20px; /* Padding for the button */
  font-size: 15px; /* Font size */
  cursor: pointer; /* Pointer cursor on hover */
  border-radius: 4px; /* Rounded corners */
  transition:
    background-color -1.3s ease,
    color 0.3s ease; /* Smooth transitions */
  font-family: kanit, sans-serif;
}

.contact-us button.black-bg {
  background-color: white; /* Black background for carousel */
  color: black; /* White text color */
  border: 1px solid black; /* Border matching the background */
  font-family: kanit, sans-serif;
}

.contact-us button:hover {
  background-color: white; /* Maintain white background on hover */
  color: green; /* Text color turns green on hover */
}

.contact-us button.black-bg:hover {
  background-color: black; /* Maintain black background on hover */
  color: green; /* Text color turns green on hover */
}

/* Global styles remain unchanged */

/* === MOBILE OVERRIDES FOR SERVICES & PROJECTS === */
@media (max-width: 768px) {
  /* — SERVICES SECTION — */
  /* ensure you’ve renamed .service-wrapper → .services-wrapper in your HTML */
  .services-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
  }
  .services-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 1rem;
  }
  .services-list p {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    white-space: nowrap;
  }
  .description,
  .parawrapper {
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
  }
  .parawrapper p {
    font-size: 1rem;
    line-height: 1.5;
  }

  /* — PROJECTS HEADER — */
  .projects-header-container {
    text-align: center;
    padding-left: 0rem;
    padding-right: 1rem;
    position: relative;
  }
  .projects-header {
    font-size: 2rem;
    margin: 0 auto;
  }
  /* move “See all projects” below the title, centered */
  .view-portfolio {
    display: inline-block;
    top: 175px !important;
    position: static;
    margin: 0.5rem auto 0;
    font-size: 0.9rem;
  }
}

/* Global styles remain unchanged */

/* Services Section for Small Screens (300px width) */
@media (max-width: 300px) {
  .services-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 300px; /* Constrain the width to 300px */
    margin: 0 auto; /* Center the container */
    padding: 0 10px; /* Add padding to avoid content touching edges */
  }

  .services-list {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding-bottom: 15px; /* Adjust space between headers and content */
  }

  .services-list h2 {
    font-size: clamp(1rem, 2vw, 1.2rem); /* Scale font size dynamically */
    padding: 5px 8px; /* Reduce padding to fit smaller screens */
    cursor: pointer;
  }

  .services-list h2.active {
    color: green; /* Active header color */
  }

  .service-description {
    width: 100%;
    padding: 10px 5px; /* Reduce padding to fit content within 300px */
    display: none;
    font-size: clamp(
      0.8rem,
      2vw,
      1rem
    ); /* Dynamically scale description text */
    margin-top: 0;
  }

  .service-description.active {
    display: block;
    color: white;
    text-align: center;
    padding: 15px;
  }

  .services-header {
    font-size: clamp(1.5rem, 4vw, 2rem); /* Responsive header text scaling */
    margin-bottom: 10px; /* Space between header and service sections */
    color: white;
  }
}

/* Responsive adjustments for other small screens (480px and below) */
@media (max-width: 480px) {
  .services-container {
    max-width: 300px; /* Apply maximum width for small devices */
  }

  .services-list h2 {
    font-size: clamp(1rem, 3vw, 1.5rem); /* Slightly larger on wider screens */
    padding: 10px 5px;
  }

  .service-description {
    font-size: clamp(0.9rem, 3vw, 1.1rem); /* Adjust for better readability */
    padding: 15px;
  }
}
/* Keyframes for animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Projects Section remains unchanged */

/* Adjust logo size for smaller screens */
@media (max-width: 768px) {
  .fixed-header .logo img {
    height: 30px; /* Adjust as needed for smaller screens */
  }

  .contact-us button {
    font-size: 14px; /* Adjust font size for smaller screens */
    padding: 8px 16px; /* Adjust padding for smaller screens */
  }

  .menu-toggle {
    width: 45px;
    height: 45px;
  }

  .menu-line {
    width: 25px;
    height: 3px;
  }

  .services-container {
    flex-direction: column;
    margin-right: 20px;
  }

  .services-list {
    position: relative;
    top: 0;
    padding-left: 20px;
    padding-bottom: 20px;
  }

  .services-description {
    padding-left: 0;
    border-left: none;
  }
}

@media (max-width: 480px) {
  .fixed-header .logo img {
    height: 2.813rem; /* Further adjust for even smaller screens */
  }

  .contact-us button {
    font-size: 12px; /* Adjust font size for smaller screens */
    padding: 7px 14px; /* Adjust padding for smaller screens */
    margin-top: 1.25rem;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    margin-top: 0.063rem;
  }

  .menu-line {
    width: 20px;
    height: 3px;
  }
}

@media (max-width: 320px) {
  .contact-us button {
    font-size: 10px; /* Further adjust font size for very small screens */
    padding: 1px 1px; /* Further adjust padding for very small screens */
  }

  .menu-toggle {
    width: 35px;
    height: 35px;
  }

  .menu-line {
    width: 18px;
    height: 3px;
  }
}

/* New CSS for the entire services section fade-in and fade-out */
section[aria-label="Our Services"] {
  opacity: 1;
  transition: opacity 1s ease-in-out;
}

section[aria-label="Our Services"].fade-in {
  opacity: 1;
}

section[aria-label="Our Services"].fade-out {
  opacity: 0;
}

/* Additional CSS for active class */
.services-list h2.active {
  color: green; /* Ensure this matches the desired style */
}

/* Projects Section */
.carousel-container {
  position: relative;
  width: 100%; /* Ensures the section takes full width */
  padding: 50px 20px; /* Adds spacing around the carousel */
  margin-top: 80px;
}

/* header row: centered title, link pinned top‑right */

.projects-header-container {
  max-width: 1200px; /* match your .swiper‑container */
  margin: 0 auto 1.5rem; /* center + spacing below */
  position: relative; /* so absolutely‑positioned children are scoped here */
  display: flex;
  align-items: center;
  justify-content: center; /* center the “Projects” text */
}

/* header row: centered title, link pinned top‑right */
.projects-header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 1.5rem;
}

/* “See all” link pinned in top‑right of header row */
.view-portfolio {
  position: absolute;
  top: 240px;
  right: 0;
  font-size: 1rem;
  text-decoration: none;
  color: #28a745; /* match your green accent */
  padding: 0.25rem 0.5rem;
  border: 1px solid #28a745;
  border-radius: 4px;
  transition:
    background-color 0.2s,
    color 0.2s;
  z-index: 20;
}

.view-portfolio:hover {
  background-color: #28a745;
  color: green;
}
/* Swiper Container */
.swiper-container {
  width: 100%; /* Full width */
  max-width: 1200px; /* Limit max width */
  height: auto; /* Adjust height based on content */
  margin: 0 auto; /* Center the carousel */
  overflow: hidden; /* Prevent overflow issues */
  padding: 60px 35px; /* Add vertical spacing */
  position: relative; /* Ensure child elements are positioned relative to this container */
}

/* Swiper Wrapper */
.swiper-wrapper {
  display: flex;
  height: auto; /* Adjust height dynamically */
}

/* Swiper Slide */
.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 300px; /* Set consistent slide width */
}

/* Project Card */
.project-card {
  background-color: #fff;
  color: black;
  border-radius: 10px;
  overflow: hidden;
  width: 100%; /* Use 100% of the slide width */
  max-width: 300px; /* Limit the card width */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in-out;
  text-align: center;
}

.project-card:hover {
  transform: scale(1.05); /* Adds hover scaling effect */
}

/* Card Image */
.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Card Body */
.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card-text {
  font-size: 1rem;
  color: #6c757d;
}

/* Swiper Navigation Buttons */
.swiper-button-prev,
.swiper-button-next {
  color: green !important; /* Matches theme color */
  z-index: 10; /* Ensure buttons are above other elements */
  position: absolute; /* Required for proper positioning */
  top: 50%; /* Vertically centered within the container */
  transform: translateY(-50%); /* Centers the buttons vertically */
  width: 40px; /* Adjust button size */
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-button-prev {
  left: -2px !important; /* Position left arrow */
}

.swiper-button-next {
  right: -2px !important; /* Position right arrow */
}

/* Swiper Pagination */
.swiper-pagination {
  position: absolute; /* Position relative to the swiper-container */
  bottom: -20px; /* Place it at the bottom of the container */
  left: 50%; /* Center horizontally */
  transform: translateX(-50%); /* Center alignment fix */
  text-align: center; /* Center the dots */
  z-index: 10; /* Ensure it stays above other elements */
}

.swiper-pagination-bullet {
  width: 13px !important;
  height: 13px !important;
  background-color: slategray !important; /* Default color for dots */
  opacity: 1; /* Ensures dots are visible */
  transition: background-color 0.3s ease;
}

.swiper-pagination-bullet-active {
  background-color: #28a745 !important; /* Active dot color */
  height: 15px !important;
  width: 15px !important;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); /* Optional glow effect */
}
@media (max-width: 1154px) {
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }
  .swiper-container {
    margin-left: auto;
    margin-right: auto;
    width: 80%;
  }
}
@media (max-width: 480px) {
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }
  .swiper-container {
    margin-left: auto;
    margin-right: auto;
    width: 80%;
  }
}
