/* ============================================
   CSS Custom Properties for Theming
============================================ */
:root {
  --primary-color: #1976D2;        /* Blue */
  --primary-dark: #0D47A1;         /* Darker Blue */
  --secondary-color: #FFC107;      /* Amber */
  --secondary-dark: #FFA000;       /* Darker Amber */
  --light-bg: #F5F5F5;             /* Light Grey */
  --light-bg-alt: #E0F2F1;         /* Light Teal */
  --dark-text: #212121;
  --light-text: #FFFFFF;
  --accent-color: #FF5722;         /* Deep Orange Accent */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode variables */
body.dark-mode {
  --primary-color: #90CAF9;        /* Lighter Blue */
  --primary-dark: #64B5F6;         /* Medium Blue */
  --secondary-color: #FFE082;      /* Light Amber */
  --secondary-dark: #FFD54F;       /* Medium Amber */
  --light-bg: #121212;             /* Almost Black */
  --light-bg-alt: #1E1E1E;         /* Dark Grey */
  --dark-text: #F5F5F5;
  --light-text: #FFFFFF;
  --accent-color: #FF5722;         /* Deep Orange Accent */
}

/* ============================================
   Reset and Base Styles
============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  background: linear-gradient(135deg, var(--light-bg), var(--light-bg-alt));
  transition: var(--transition);
}

/* Focus styles for accessibility */
:focus {
  outline: 2px dashed var(--primary-color);
  outline-offset: 4px;
}

/* ============================================
   Custom Scrollbar (Webkit Browsers)
============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-bg-alt);
}

::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 10px;
  border: 2px solid var(--light-bg-alt);
}

/* ============================================
   Scroll Progress Bar
============================================ */
#progressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  width: 0%;
  z-index: 2000;
  transition: width 0.3s ease;
}

/* ============================================
   Loader
============================================ */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--light-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.loader::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Top Menu
============================================ */
.topmenu {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.topmenu .phone,
.topmenu .address {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--light-text);
}

.topmenu i {
  color: var(--accent-color);
}

/* ============================================
   Navbar
============================================ */
.navbar {
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

body.dark-mode .navbar {
  background: rgba(26, 26, 26, 0.95);
}

.navbar-brand img {
  max-height: 60px;
  transition: transform 0.3s ease;
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

.nav-link {
  color: var(--dark-text) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  margin: 0 0.5rem;
  border-radius: 50px;
  transition: var(--transition);
}

.nav-link:hover {
  background: var(--primary-color);
  color: var(--light-text) !important;
  transform: translateY(-2px);
}

/* ============================================
   Header / Carousel
============================================ */
.carousel-item {
  height: 100vh;
  position: relative;
}

.carousel-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(25, 118, 210, 0.3), rgba(255, 193, 7, 0.3));
  z-index: 1;
}

.home-content-box {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-heading h3 {
  font-size: 3.5rem;
  color: var(--light-text);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

/* ============================================
   Video Slide in Carousel
   (Responsive video background with aspect ratio preservation)
============================================ */
.carousel-item.video-item {
  position: relative;
  overflow: hidden;
  height: 100vh;
  min-height: 600px; /* Prevent collapse on mobile */
}

.video-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  min-width: 50%;
  min-height: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
  display: block;
}

/* Mobile-first media queries */
@media (max-width: 768px) {
  .carousel-item.video-item {
    height: 80vh;
    min-height: 480px;
  }
  
  /* Optimize video scaling for portrait screens */
  .video-slide {
    width: 100%;
    height: auto;
  }
}

@media (orientation: portrait) {
  .video-slide {
    width: auto;
    height: 100%;
  }
}

/* Fallback for object-fit */
@supports not (object-fit: cover) {
  .video-slide {
    font-family: 'object-fit: cover;'; /* Polyfill hook */
    background-size: cover;
    background-position: center center;
  }
}

/* ============================================
   Buttons
============================================ */
.btn-primary {
  background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
  color: var(--light-text);
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

/* ============================================
   Services Section
============================================ */
#services {
  padding: 5rem 0;
}

/* ============================================
   Updated Service Cards (Custom Card Design)
============================================ */
.custom-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  overflow: hidden;
  background: var(--light-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.custom-card .card-img-container {
  position: relative;
  overflow: hidden;
}

.custom-card .card-img-container img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.custom-card:hover .card-img-container img {
  transform: scale(1.05);
}

.custom-card .card-img-container .card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-card:hover .card-img-container .card-overlay {
  opacity: 1;
}

.custom-card .card-overlay .card-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
  margin: 0;
}

.custom-card .card-body {
  padding: 1.5rem;
  background: var(--light-bg-alt);
  text-align: center;
}

.custom-card .card-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 0.5rem;
}

.custom-card .card-footer {
  background: transparent;
  border-top: none;
  text-align: center;
  padding: 1rem;
}

/* Dark Mode Overrides for Custom Cards */
body.dark-mode .custom-card {
  background-color: #2D2D2D !important;
  border-color: #444 !important;
}

body.dark-mode .custom-card .card-body {
  background: rgba(0, 0, 0, 0.85) !important;
  color: #fff !important;
}

body.dark-mode .custom-card .card-text {
  color: #fff !important;
}

/* ============================================
   Updated Modal Dialog Box Styles (Custom Modal)
============================================ */
.custom-modal {
  border-radius: 20px;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.custom-modal .modal-header {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: var(--light-text);
  border-bottom: none;
  padding: 1rem 1.5rem;
}

.custom-modal .modal-header .modal-title {
  font-size: 1.75rem;
  font-weight: 700;
}

.custom-modal .modal-body {
  padding: 2rem;
  background: var(--light-bg-alt);
}

.custom-modal .modal-body img {
  border-radius: 5px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  margin-bottom: 1rem;
}

.custom-modal .modal-footer {
  background: var(--light-bg);
  border-top: none;
  padding: 1rem 1.5rem;
  text-align: center;
}

/* Dark Mode Overrides for Custom Modal */
body.dark-mode .custom-modal {
  background-color: #1A1A1A !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .custom-modal .modal-header {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: var(--light-text) !important;
}

body.dark-mode .custom-modal .modal-footer {
  background: #1A1A1A;
}

/* ============================================
   Additional Tweaks for the Booking Form Section
============================================ */
#bookingForm {
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  font-size: 1rem;
}

body.dark-mode #bookingForm {
  background: rgba(26, 26, 26, 0.95);
}

#bookingForm label {
  color: var(--dark-text);
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: block;
}

body.dark-mode #bookingForm label {
  color: var(--light-text);
}

#bookingForm input,
#bookingForm select,
#bookingForm textarea {
  background: var(--light-bg-alt);
  border: 1px solid #ddd;
  padding: 0.75rem;
  transition: background 0.3s ease, border 0.3s ease;
  width: 100%;
  font-size: 1rem;
  color: var(--dark-text);
}

body.dark-mode #bookingForm input,
body.dark-mode #bookingForm select,
body.dark-mode #bookingForm textarea {
  background: #333;
  border: 1px solid #555;
  color: var(--light-text);
}

#bookingForm input::placeholder,
#bookingForm textarea::placeholder {
  color: #888;
}

body.dark-mode #bookingForm input::placeholder,
body.dark-mode #bookingForm textarea::placeholder {
  color: #bbb;
}

#bookingForm button {
  transition: background 0.3s ease, transform 0.3s ease;
}

#bookingForm button:hover {
  transform: translateY(-2px);
}

/* Responsive tweaks for booking form */
@media (max-width: 576px) {
  #bookingForm {
    padding: 1rem;
  }
}

/* ============================================
   Footer
============================================ */
footer {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
  padding: 3rem 0;
}

footer ul li {
  margin: 0 1rem;
}

footer a {
  font-size: 1.5rem;
  transition: var(--transition);
}

footer a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

/* ============================================
   Back-to-Top Button
============================================ */
.back-to-top {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  width: 50px;
  height: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Responsive Media Queries
============================================ */
@media (max-width: 768px) {
  .home-heading h3 {
    font-size: 2rem;
  }
  .navbar {
    padding: 0.75rem 1rem;
  }
  .nav-link {
    margin: 0.25rem 0;
  }
}

@media (max-width: 576px) {
  .topmenu .col-md-6 {
    text-align: center;
    margin-bottom: 0.5rem;
  }
}

/* ============================================
   ABOUT US MAIN PAGE
============================================ */
.responsive-container-block {
  min-height: 75px;
  height: fit-content;
  width: 100%;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  justify-content: flex-start;
}

a {
  text-decoration: none;
}

.text-blk {
  padding: 10px;
  line-height: 25px;
}

.responsive-container-block.bigContainer {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 50px;
}

.mainImg {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.text-blk.headingText {
  font-size: 22px;
  font-weight: 700;
  line-height: 30px;
  color: rgb(176, 98, 255);
  margin-bottom: 5px;
}

.allText {
  width: 40%;
  margin: 0;
}

.text-blk.subHeadingText {
  color: rgb(102, 102, 102);
  font-size: 26px;
  line-height: 32px;
  font-weight: 700;
  margin-bottom: 15px;
}

.text-blk.description {
  font-size: 18px;
  line-height: 26px;
  color: rgb(102, 102, 102);
  margin-bottom: 50px;
  font-weight: 400;
}

.explore {
  font-size: 16px;
  line-height: 28px;
  color: rgb(102, 102, 102);
  border: 2px solid rgb(102, 102, 102);
  cursor: pointer;
  background-color: white;
  padding: 8px 40px;
}

.explore:hover {
  background-color: rgb(176, 98, 255);
  color: white;
  border: none;
}

.responsive-container-block.Container {
  margin: 80px auto 50px;
  justify-content: center;
  align-items: center;
  max-width: 1320px;
  padding: 10px;
}

.responsive-container-block.Container.bottomContainer {
  flex-direction: row-reverse;
  margin: 80px auto 50px;
}

.allText.aboveText {
  margin-left: 40px;
}

.allText.bottomText {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 15px;
}

.purpleBox {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 430px;
  background-color: rgb(176, 98, 255);
  padding: 20px;
  border-radius: 10px;
  position: absolute;
  bottom: -35px;
  left: -8%;
}

.purpleText {
  font-size: 18px;
  line-height: 26px;
  color: white;
  margin-bottom: 10px;
}

.ultimateImg {
  width: 50%;
  position: relative;
}

@media (max-width: 1024px) {
  .responsive-container-block.Container {
    max-width: 850px;
  }
  .mainImg {
    width: 55%;
  }
  .allText {
    width: 40%;
    margin-left: 20px;
  }
  .responsive-container-block.bigContainer,
  .responsive-container-block.Container.bottomContainer {
    padding: 10px;
  }
  .allText.aboveText {
    margin: 30px 0 0 40px;
  }
  .allText.bottomText {
    margin: 30px 40px 0 0;
    text-align: left;
  }
  .text-blk.headingText {
    text-align: center;
  }
  .allText.aboveText {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0 0 0;
  }
  .text-blk.subHeadingText {
    text-align: left;
    font-size: 26px;
  }
  .text-blk.description {
    text-align: left;
    line-height: 24px;
  }
  .explore {
    margin: 0;
  }
  .purpleBox {
    bottom: 10%;
  }
  .responsive-container-block.Container.bottomContainer {
    padding: 10px 0;
    max-width: 930px;
  }
  .allText.bottomText {
    width: 40%;
  }
  .purpleBox {
    bottom: auto;
    left: -10%;
    top: 70%;
  }
  .mainImg {
    width: 100%;
  }
  .text-blk.headingText {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .allText {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .responsive-container-block.Container {
    flex-direction: column;
  }
  .text-blk.headingText,
  .text-blk.subHeadingText,
  .text-blk.description {
    text-align: center;
  }
  .allText {
    margin: 40px 0 0 0;
  }
  .responsive-container-block.Container,
  .responsive-container-block.Container.bottomContainer {
    margin: 80px auto 50px;
  }
  .allText.bottomText {
    margin: 40px 0 0 0;
  }
  .mainImg {
    width: 100%;
    margin-bottom: -70px;
  }
  .responsive-container-block.Container.bottomContainer {
    flex-direction: column;
  }
  .ultimateImg {
    width: 100%;
    position: relative;
  }
  .purpleBox {
    position: static;
  }
  .allText.bottomText {
    width: 100%;
    align-items: flex-start;
  }
  .text-blk.headingText,
  .text-blk.subHeadingText,
  .text-blk.description {
    text-align: left;
  }
  .mainImg,
  .ultimateImg {
    margin: 0;
  }
  .purpleBox {
    position: absolute;
    left: 0;
    top: 80%;
  }
  .allText.bottomText {
    margin-top: 100px;
  }
}

@media (max-width: 500px) {
  .responsive-container-block.Container {
    padding: 10px 0;
    width: 100%;
    max-width: 100%;
  }
  .mainImg {
    width: 100%;
  }
  .responsive-container-block.bigContainer {
    padding: 10px 25px;
  }
  .text-blk.subHeadingText {
    font-size: 24px;
    line-height: 28px;
  }
  .text-blk.description {
    font-size: 16px;
    line-height: 22px;
  }
  .allText {
    width: 100%;
    padding: 0;
  }
  .allText.bottomText {
    margin-top: 50px;
    padding: 0;
  }
  .ultimateImg {
    position: static;
  }
  .purpleBox {
    position: static;
  }
  .stars {
    width: 55%;
  }
  .allText.bottomText {
    margin-top: 75px;
  }
  .responsive-container-block.bigContainer {
    padding: 10px 20px;
  }
  .purpleText {
    font-size: 16px;
    line-height: 22px;
  }
  .explore {
    padding: 6px 35px;
    font-size: 15px;
  }
}

/* ============================================
   Responsive Video for Mobile Devices
============================================ */
@media (max-width: 576px) {
  .embed-responsive {
    height: auto;
  }
  .embed-responsive-item {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}

/* ============================================
   Custom Scroll Animations (Scroll-triggered)
   (These classes can be added via JS when elements enter the viewport)
============================================ */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes fadeInUpCustom {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes zoomInCustom {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Utility classes for scroll animations */
.scroll-slide-left {
  animation: slideInLeft 1s ease-out forwards;
}
.scroll-slide-right {
  animation: slideInRight 1s ease-out forwards;
}
.scroll-fade-up {
  animation: fadeInUpCustom 1s ease-out forwards;
}
.scroll-zoom-in {
  animation: zoomInCustom 1s ease-out forwards;
}

/* ============================================
   JOIN OUR TEAM SECTION
   Ensure the text is visible over the background image
============================================ */
#join {
  position: relative;
  padding: 5rem 0;
  color: var(--light-text);
  text-align: center;
}
#join::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* dark overlay for improved text visibility */
  z-index: 1;
}
#join .container {
  position: relative;
  z-index: 2;
}
