/* ============================================
   HOME PAGE
   Styles for home.ejs landing page
   ============================================ */

/* Home Page Container */
.home-page {
  min-height: 100vh;
}

/* ============================================
   HERO SECTION WITH BACKGROUND VIDEO
   ============================================ */
.hero-section {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text-on-blue);
}

@media (min-width: 768px) {
  .hero-section {
    min-height: 700px;
  }
}

/* Video Container */
.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

@media (min-width: 768px) {
  .hero-video {
    min-width: 100%;
    min-height: 100%;
  }
}

/* Video Overlay (dark tint for text readability) */
.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
    background: linear-gradient(
        135deg, 
        rgba(43, 127, 191, 0.15) 0%, 
        rgba(30, 90, 142, 0.1) 100%
    );
  z-index: 1;
}

@media (min-width: 768px) {
  .hero-video-overlay {
    background: linear-gradient(
        135deg, 
        rgba(43, 127, 191, 0.6) 0%, 
        rgba(30, 90, 142, 0.5) 100%
    );
  }
}

/* Hero Container */
.hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--page-padding);
  width: 100%;
}

@media (min-width: 768px) {
  .hero-container {
    padding: 0 40px;
  }
}

/* Hero Content */
.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero-content {
    text-align: center;
  }
}

.hero-headline {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-on-blue);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .hero-headline {
    font-size: 52px;
    margin-bottom: 24px;
  }
}

@media (min-width: 1024px) {
  .hero-headline {
    font-size: 56px;
  }
}

.hero-subheadline {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 20px;
  line-height: 1.6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
  .hero-subheadline {
    font-size: 22px;
    margin-bottom: 24px;
  }
}

@media (min-width: 1024px) {
  .hero-subheadline {
    font-size: 24px;
  }
}

.hero-badge {
  font-size: var(--font-small);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 32px;
  font-weight: 600;
  padding: 12px 24px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-small);
  display: inline-block;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (min-width: 768px) {
  .hero-badge {
    font-size: var(--font-body);
    margin-bottom: 40px;
    padding: 14px 28px;
  }
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-actions {
    flex-direction: row;
    gap: 20px;
    justify-content: center;
  }
}

.hero-actions .btn {
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
  .hero-actions .btn {
    min-width: 220px;
  }
}

.hero-actions .btn-primary {
  background-color: #FFFFFF;
  color: var(--primary-blue);
  border: 2px solid #FFFFFF;
}

.hero-actions .btn-primary:hover {
  background-color: var(--bg-main);
  color: var(--secondary-blue);
  border-color: var(--bg-main);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .hero-actions .btn-primary:hover {
    transform: translateY(-2px);
  }
}

.hero-actions .btn-secondary {
  background-color: transparent;
  color: var(--text-on-blue);
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.hero-actions .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: #FFFFFF;
  color: var(--text-on-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .hero-actions .btn-secondary:hover {
    transform: translateY(-2px);
  }
}

/* ============================================
   SERVICES OVERVIEW SECTION
   ============================================ */
.home-services-section {
  padding: var(--section-spacing) 0;
  background-color: #FFFFFF;
}

@media (min-width: 768px) {
  .home-services-section {
    padding: 80px 0;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 60px;
  }
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .section-header h2 {
    font-size: 42px;
    margin-bottom: 20px;
  }
}

.section-header p {
  font-size: var(--font-body);
  color: var(--text-medium);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .section-header p {
    font-size: 20px;
  }
}

.home-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .home-services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (min-width: 1024px) {
  .home-services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.home-service-card {
  background-color: var(--card-bg);
  padding: 32px 24px;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-align: center;
  border: 1px solid var(--border-light);
}

.home-service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--primary-blue);
}

@media (min-width: 768px) {
  .home-service-card {
    padding: 40px 28px;
  }
}

.home-service-icon {
  font-size: 56px;
  margin-bottom: 20px;
  display: block;
  line-height: 1;
}

@media (min-width: 768px) {
  .home-service-icon {
    font-size: 64px;
    margin-bottom: 24px;
  }
}

.home-service-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .home-service-card h3 {
    font-size: 22px;
    margin-bottom: 16px;
  }
}

.home-service-card p {
  font-size: var(--font-small);
  color: var(--text-medium);
  margin-bottom: 16px;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .home-service-card p {
    font-size: var(--font-body);
    margin-bottom: 20px;
  }
}

.service-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-small);
  transition: color var(--transition-fast);
  display: inline-block;
}

.service-link:hover {
  color: var(--secondary-blue);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .service-link {
    font-size: var(--font-body);
  }
}

@media (min-width: 768px) {
  .service-link:hover {
    color: var(--secondary-blue);
  }
}

.section-cta {
  text-align: center;
  margin-top: 40px;
}

@media (min-width: 768px) {
  .section-cta {
    margin-top: 60px;
  }
}

/* ============================================
   POOLS CAROUSEL SECTION
   ============================================ */
.pools-carousel-section {
  padding: var(--section-spacing) 0;
  background-color: var(--bg-main);
  overflow: hidden;
}

@media (min-width: 768px) {
  .pools-carousel-section {
    padding: 80px 0;
  }
}

/* Carousel Wrapper */
.carousel-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
  .carousel-wrapper {
    max-width: 1200px;
  }
}

/* Carousel Track */
.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Carousel Slide */
.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
  position: relative;
}

/* Carousel Image Wrapper */
.carousel-image-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background-color: #000000;
}

@media (min-width: 768px) {
  .carousel-image-wrapper {
    height: 600px;
  }
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Carousel Image Overlay */
.carousel-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  opacity: 0;
  transition: opacity var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide:hover .carousel-image-overlay {
  opacity: 1;
}

@media (min-width: 768px) {
  .carousel-slide:hover .carousel-image-overlay {
    opacity: 1;
  }
}

/* Carousel Zoom Button */
.carousel-zoom-btn {
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--primary-blue);
  border: none;
  border-radius: var(--radius-circle);
  width: 60px;
  height: 60px;
  font-size: 28px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-zoom-btn:hover {
  background-color: var(--primary-blue);
  color: #FFFFFF;
  transform: scale(1.1);
}

@media (min-width: 768px) {
  .carousel-zoom-btn {
    width: 70px;
    height: 70px;
    font-size: 32px;
  }
}

/* Carousel Caption */
.carousel-caption {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgb(0 0 0 / 54%) 100%);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 20px 20px 20px;
  color: #FFFFFF;
}

@media (min-width: 768px) {
  .carousel-caption {
    padding: 60px 40px 30px 40px;
  }
}

.carousel-caption p {
  font-size: var(--font-body);
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: var(--text-on-blue);
  margin-bottom: 36px;
}

@media (min-width: 768px) {
  .carousel-caption p {
    font-size: 20px;
  }
}

/* Carousel Navigation Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--primary-blue);
  border: none;
  border-radius: var(--radius-circle);
  width: 50px;
  height: 50px;
  font-size: 32px;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
  line-height: 1;
}

.carousel-arrow:hover {
  background-color: var(--primary-blue);
  color: #FFFFFF;
  transform: translateY(-50%) scale(1.1);
}

@media (min-width: 768px) {
  .carousel-arrow {
    width: 60px;
    height: 60px;
    font-size: 40px;
  }
}

.carousel-prev {
  left: 16px;
}

@media (min-width: 768px) {
  .carousel-prev {
    left: 24px;
  }
}

.carousel-next {
  right: 16px;
}

@media (min-width: 768px) {
  .carousel-next {
    right: 24px;
  }
}

/* Carousel Pagination Dots */
.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

@media (min-width: 768px) {
  .carousel-dots {
    bottom: 30px;
    gap: 12px;
  }
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-circle);
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.carousel-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.carousel-dot.active {
  background-color: #FFFFFF;
  width: 32px;
  border-radius: 6px;
}

@media (min-width: 768px) {
  .carousel-dot {
    width: 14px;
    height: 14px;
  }
  
  .carousel-dot.active {
    width: 40px;
  }
}

/* ============================================
   CAROUSEL LIGHTBOX
   ============================================ */
.carousel-lightbox-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.carousel-lightbox-backdrop.active {
  display: flex;
  opacity: 1;
}

.carousel-lightbox-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-lightbox-content {
  max-width: 95%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .carousel-lightbox-content {
    max-width: 90%;
    max-height: 85%;
  }
}

.carousel-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-medium);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

/* Lightbox Close Button */
.carousel-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  border: none;
  border-radius: var(--radius-circle);
  width: 50px;
  height: 50px;
  font-size: 32px;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
  line-height: 1;
}

.carousel-lightbox-close:hover {
  background-color: var(--primary-blue);
  color: #FFFFFF;
  transform: scale(1.1);
}

@media (min-width: 768px) {
  .carousel-lightbox-close {
    width: 60px;
    height: 60px;
    font-size: 40px;
  }
}

/* Lightbox Navigation Arrows */
.carousel-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--primary-blue);
  border: none;
  border-radius: var(--radius-circle);
  width: 60px;
  height: 60px;
  font-size: 36px;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
  line-height: 1;
}

.carousel-lightbox-arrow:hover {
  background-color: var(--primary-blue);
  color: #FFFFFF;
  transform: translateY(-50%) scale(1.1);
}

@media (min-width: 768px) {
  .carousel-lightbox-arrow {
    width: 70px;
    height: 70px;
    font-size: 44px;
  }
}

.carousel-lightbox-prev {
  left: 20px;
}

@media (min-width: 768px) {
  .carousel-lightbox-prev {
    left: 40px;
  }
}

.carousel-lightbox-next {
  right: 20px;
}

@media (min-width: 768px) {
  .carousel-lightbox-next {
    right: 40px;
  }
}

/* Lightbox Counter */
.carousel-lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: var(--radius-medium);
  font-size: var(--font-body);
  font-weight: 600;
  backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
  .carousel-lightbox-counter {
    font-size: 18px;
    padding: 14px 28px;
  }
}

/* ============================================
   WHY CHOOSE US SECTION
   ============================================ */
.home-why-section {
  padding: var(--section-spacing) 0;
  background-color: #FFFFFF;
}

@media (min-width: 768px) {
  .home-why-section {
    padding: 80px 0;
  }
}

.home-why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .home-why-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}

.home-why-card {
  text-align: center;
  background-color: var(--card-bg);
  padding: 40px 24px;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-light);
}

.home-why-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--primary-blue);
}

@media (min-width: 768px) {
  .home-why-card {
    padding: 48px 32px;
  }
}

.home-why-icon {
  font-size: 56px;
  margin-bottom: 20px;
  display: block;
  line-height: 1;
}

@media (min-width: 768px) {
  .home-why-icon {
    font-size: 64px;
    margin-bottom: 24px;
  }
}

.home-why-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .home-why-card h3 {
    font-size: 22px;
    margin-bottom: 16px;
  }
}

.home-why-card p {
  font-size: var(--font-body);
  color: var(--text-medium);
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 768px) {
  .home-why-card p {
    font-size: 18px;
  }
}

/* ============================================
   FEATURED PROJECTS SECTION
   ============================================ */
.home-projects-section {
  padding: var(--section-spacing) 0;
  background-color: var(--bg-main);
}

@media (min-width: 768px) {
  .home-projects-section {
    padding: 80px 0;
  }
}

.home-projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 40px;
  min-height: 200px;
}

@media (min-width: 768px) {
  .home-projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (min-width: 1024px) {
  .home-projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.home-project-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-medium);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-light);
}

.home-project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--primary-blue);
}

@media (min-width: 768px) {
  .home-project-card:hover {
    transform: translateY(-4px);
  }
}

.home-project-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.home-project-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: var(--bg-main);
}

@media (min-width: 768px) {
  .home-project-image {
    height: 280px;
  }
}

.home-project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.home-project-card:hover .home-project-image img {
  transform: scale(1.08);
}

@media (min-width: 768px) {
  .home-project-card:hover .home-project-image img {
    transform: scale(1.08);
  }
}

.home-project-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
}

.home-project-type {
  background-color: var(--primary-blue);
  color: var(--text-on-blue);
  padding: 6px 12px;
  border-radius: var(--radius-small);
  font-size: var(--font-tiny);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .home-project-type {
    font-size: var(--font-small);
    padding: 8px 16px;
  }
}

.home-project-info {
  padding: var(--card-padding);
}

@media (min-width: 768px) {
  .home-project-info {
    padding: 20px;
  }
}

.home-project-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .home-project-info h3 {
    font-size: 20px;
    margin-bottom: 12px;
  }
}

.home-project-location {
  font-size: var(--font-small);
  color: var(--text-medium);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (min-width: 768px) {
  .home-project-location {
    font-size: var(--font-body);
  }
}

/* ============================================
   FADE IN ANIMATIONS
   ============================================ */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   LOADING SPINNER (for projects)
   ============================================ */
.home-projects-grid .loading-spinner {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 40px 0;
}



.carousel-slide {
  min-width: 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  flex: 0 0 100% !important;
}