/* Color Theme Variables */
:root {
  --primary: rgba(4, 120, 87);
  --secondary: #a5d6a7;
  --accent: #fbc02d;
  --dark: #1b5e20;
  --background: #f9f9f9;
  --text: #333333;
  --muted: #e0e0e0;
}

/* Custom Styles */
body {
  overflow-x: none;
  font-family: "Poppins", sans-serif;
  background-color: var(--background);
  color: var(--text);
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Typewriter Effect */
.typewriter {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid #ffffff;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
  display: inline-block;
  color: #ffffff; /* Pure white for primary heading */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #ffffff;
  }
}

/* Text Rotation Effect */
.text-rotation-container {
  font-size: 0.85rem;
  height: 50px;
  overflow: hidden;
  margin-top: 8px;
}

.text-rotation {
  animation: rotate 5s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}

.rotating-text {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  font-size: 1.8rem;
  font-weight: 600;
  color: rgba(
    255,
    255,
    255,
    0.9
  ); /* Slightly transparent white for secondary text */
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

@keyframes rotate {
  0%,
  45% {
    transform: translateY(0);
  }
  50%,
  95% {
    transform: translateY(-50px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Hero Section */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 100%);
  z-index: -1;
}

/* --- Navbar --- */
.navbar {
  transform: translateY(-100%);
  animation: slideDown 0.6s ease-out forwards;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.navbar.scrolled {
  border-radius: 0 0 20px 20px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.navbar.scrolled a {
  color: #333 !important;
}

.navbar.scrolled a:hover {
  color: var(--primary) !important;
}

.navbar.scrolled .mobile-menu {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.navbar.scrolled #mobile-menu-button {
  color: #333 !important;
}

.navbar.scrolled .btn-primary {
  background-color: var(--primary) !important;
  color: white !important;
}

.navbar.scrolled .btn-primary:hover {
  background-color: var(--dark) !important;
}

/* --- Hero Section --- */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.4));
  z-index: -1;
}

/* --- Buttons --- */
.btn {
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-primary {
  background-color: var(--primary);
  color: white;
}
.btn-primary:hover {
  background-color: var(--dark);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.btn-secondary {
  background-color: var(--accent);
  color: var(--text);
}
.btn-secondary:hover {
  background-color: #f57f17;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* --- Cards --- */
.feature-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}
.feature-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-8px);
}
.icon-circle {
  background-color: var(--secondary);
  color: var(--primary);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

/* --- Gallery --- */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  grid-auto-rows: 200px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  transition: all 0.4s ease;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 24px;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 24px;
}

.gallery-overlay i {
  font-size: 2rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Bento Grid Layout */
.gallery-item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item:nth-child(4) {
  grid-column: span 2;
  grid-row: span 1;
}

.gallery-item:nth-child(7) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item:nth-child(10) {
  grid-column: span 2;
  grid-row: span 1;
}

.gallery-item:nth-child(13) {
  grid-column: span 2;
  grid-row: span 2;
}

/* Lazy loading placeholder */
.gallery-item img[data-src] {
  filter: blur(5px);
  transition: filter 0.3s;
}

.gallery-item img.loaded {
  filter: blur(0px);
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 85%;
  width: 100%;
  padding: 0 60px;
  position: relative;
}

.lightbox-img {
  max-height: 90%;
  max-width: 90%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: var(--primary);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 2rem;
  padding: 15px;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-nav:hover {
  background-color: var(--primary);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-caption {
  color: white;
  text-align: center;
  padding: 10px 0;
  position: absolute;
  bottom: 10px;
  width: 100%;
}

.lightbox-counter {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 5px;
}

/* --- Bento Grid --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 250px);
  gap: 16px;
  margin: 0 auto;
}

.bento-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.bento-hero {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-tall {
  grid-column: span 1;
  grid-row: span 2;
}

.bento-wide {
  grid-column: span 2;
  grid-row: span 1;
}

.bento-square {
  grid-column: span 1;
  grid-row: span 1;
}

.bento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bento-item:hover .bento-img {
  transform: scale(1.05);
}

/* Mobile responsive for bento grid */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 200px);
  }

  .bento-hero {
    grid-column: span 2;
    grid-row: span 1;
  }

  .bento-tall,
  .bento-wide,
  .bento-square {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 180px);
    gap: 12px;
  }

  .bento-hero,
  .bento-tall,
  .bento-wide,
  .bento-square {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* --- Carousel Modal --- */
.carousel-modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  overflow: hidden;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.carousel-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1002;
  transition: color 0.3s ease;
}

.carousel-close:hover {
  color: #ccc;
}

.carousel-title {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-images {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s ease;
  z-index: 1002;
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s ease;
}

.carousel-dot.active {
  background: white;
}

.carousel-caption {
  text-align: center;
  color: white;
  margin-top: 20px;
}

.carousel-caption p {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.carousel-counter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Mobile responsive for carousel */
@media (max-width: 768px) {
  .carousel-wrapper {
    height: 50vh;
  }

  .carousel-title {
    font-size: 1.5rem;
  }

  .carousel-nav {
    font-size: 20px;
    padding: 12px 16px;
  }

  .carousel-prev {
    left: 10px;
  }

  .carousel-next {
    right: 10px;
  }
}

/* === INLINE CAROUSEL === */
.carousel-container-inline {
  position: relative;
  width: 100%;
  margin: 0 auto;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.carousel-wrapper-inline {
  position: relative;
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-images-inline {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-images-inline img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.carousel-nav-inline {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  border: none;
  padding: 12px 16px;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-nav-inline:hover {
  background-color: #28a745;
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev-inline {
  left: 20px;
}

.carousel-next-inline {
  right: 20px;
}

.carousel-indicators-inline {
  display: flex;
  justify-content: center;
  padding: 15px;
  gap: 8px;
  background: #f8f9fa;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background-color: #28a745;
  transform: scale(1.3);
}

.carousel-caption-inline {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.carousel-caption-inline p {
  margin: 5px 0;
  font-size: 1rem;
  color: #333;
}

.carousel-counter-inline {
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Responsive adjustments for inline carousel */
@media (max-width: 768px) {
  .carousel-container-inline {
    margin: 0 10px;
  }

  .carousel-wrapper-inline {
    height: 300px;
  }

  .carousel-nav-inline {
    padding: 8px 12px;
    font-size: 1rem;
  }

  .carousel-prev-inline {
    left: 10px;
  }

  .carousel-next-inline {
    right: 10px;
  }
}

/* --- Animations --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.6s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background-color: var(--primary);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 50;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background-color: var(--dark);
  transform: translateY(-4px);
}
.call-btn {
  position: fixed;
  bottom: 5.25rem;
  right: 1.25rem;
  background-color: var(--primary);
  color: white;
  width: 3rem;
  height: 8rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
}
.call-btn:hover {
  transform: translateY(-4px);
}

.call-btn.visible {
  opacity: 1;
}

/* --- Contact Modal --- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  overflow: auto;
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 30px;
  border: none;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--primary);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 30px;
}

.form-actions .btn {
  min-width: 120px;
  padding: 12px 24px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success/Error Messages */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 6px;
  font-weight: 500;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 640px) {
  .gallery-container {
    grid-template-columns: 1fr;
    gap: 15px;
    grid-auto-rows: 250px;
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(7),
  .gallery-item:nth-child(10),
  .gallery-item:nth-child(13) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .modal-content {
    margin: 10% auto;
    width: 95%;
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .gallery-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    grid-auto-rows: 220px;
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(7),
  .gallery-item:nth-child(13) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .gallery-item:nth-child(4),
  .gallery-item:nth-child(10) {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (min-width: 1024px) {
  .gallery-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    grid-auto-rows: 200px;
  }
}
