/* ============================================================
   TunaGrow CBO — Hero / Home Section Styles
   File: css/hero.css
   ============================================================ */

#home { padding-top: 126px; background: var(--cream); position: relative; overflow: hidden; }
@media (max-width: 900px) { #home { padding-top: 116px; } }

.hero-pattern {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(107,66,38,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 80px 5% 60px;
  display: grid; grid-template-columns: 450px 1fr;
  gap: 60px; align-items: center; position: relative; z-index: 1;
}

/* ── Hero Copy ── */
.hero-content { display: flex; flex-direction: column; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(74,124,63,0.12);
  border: 1px solid rgba(74,124,63,0.3);
  padding: 6px 16px; border-radius: 30px; margin-bottom: 24px;
  font-size: 0.8rem; font-weight: 500; color: var(--leaf); width: fit-content;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem,5vw,3.8rem);
  line-height: 1.15; color: var(--earth); margin-bottom: 20px;
}
.hero-title em { color: var(--leaf); font-style: italic; }

.hero-desc {
  font-size: 1.05rem; color: var(--muted);
  line-height: 1.75; margin-bottom: 36px; font-weight: 300;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Hero Stats ── */
.hero-stats { display: flex; gap: 30px; margin-top: 48px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 800; color: var(--harvest);
}
.stat-label {
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── Hero Visual Card (Mercedes-Benz inspired) ── */
.hero-visual {
  position: relative; display: flex;
  align-items: center; justify-content: center;
}

/* Full-width sliding image card on desktop */
.hero-card {
  background: var(--white);
  border-radius: 24px;
  padding: 0;
  width: 100%;
  box-shadow: 0 20px 60px rgba(59,42,26,0.12), 0 2px 8px rgba(59,42,26,0.06);
  position: relative;
  overflow: hidden;
}

/* ── Carousel (Sliding Images as Background) ── */
.carousel-slides {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
}

/* Individual slides with background images */
.carousel-slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.8s ease;
  /* Background gradients simulate images */
  background-size: cover;
  background-position: center;
}

.carousel-slide.active { opacity: 1; }

/* Slide backgrounds (nature/farming themed gradients) */
.carousel-slide:nth-child(1) {
  background: linear-gradient(135deg, #2d5016 0%, #4a7c3f 30%, #7db567 100%);
}
.carousel-slide:nth-child(2) {
  background: linear-gradient(135deg, #3b2a1a 0%, #6b4226 50%, #c97d2e 100%);
}
.carousel-slide:nth-child(3) {
  background: linear-gradient(135deg, #1a3a2a 0%, #4a7c3f 50%, #f2b84b 100%);
}
.carousel-slide:nth-child(4) {
  background: linear-gradient(135deg, #6b4226 0%, #c97d2e 40%, #f2b84b 100%);
}

/* Slide overlay for text readability */
.carousel-slide::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 1;
}

/* Ensure text overlay is at the bottom of the slide */
.carousel-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  text-align: left;
  padding: 24px 28px 20px;
  color: var(--white);
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}

.carousel-slide-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; margin-bottom: 6px;
  font-weight: 700;
}

.carousel-slide-content p {
  font-size: 0.85rem; opacity: 0.9;
  line-height: 1.5;
  max-width: 90%;
}

/* Dynamic text colors per slide */
.carousel-slide[data-text-color="light"] .carousel-slide-content {
  color: #ffffff;
}
.carousel-slide[data-text-color="light"] .carousel-slide-content h3 {
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.carousel-slide[data-text-color="light"] .carousel-slide-content p {
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.carousel-slide[data-text-color="dark"] .carousel-slide-content {
  color: var(--earth);
  background: linear-gradient(to top, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.4) 60%, transparent 100%);
}
.carousel-slide[data-text-color="dark"] .carousel-slide-content h3 {
  text-shadow: 0 2px 8px rgba(255,255,255,0.3);
}
.carousel-slide[data-text-color="dark"] .carousel-slide-content p {
  text-shadow: 0 1px 4px rgba(255,255,255,0.2);
}

/* Slide tag/badge */
.carousel-slide-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-size: 0.7rem; font-weight: 600;
  padding: 3px 12px; border-radius: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ── Carousel Play/Pause Button ── */
.carousel-pause-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.3s ease, background 0.3s ease;
  pointer-events: none;
}

/* Show button on hover over carousel */
.carousel-slides:hover .carousel-pause-btn {
  opacity: 1;
  pointer-events: all;
}

/* Keep button visible when carousel is paused */
.carousel-pause-btn.is-visible {
  opacity: 1 !important;
  pointer-events: all !important;
}

.carousel-pause-btn:hover {
  background: rgba(255,255,255,0.45);
  transform: translate(-50%, -50%) scale(1.1);
}

.carousel-pause-btn .pause-icon,
.carousel-pause-btn .play-icon {
  font-size: 1.2rem;
  color: var(--white);
  transition: opacity 0.2s ease;
  position: absolute;
}

/* Show pause icon by default (carousel is playing) */
.carousel-pause-btn .pause-icon { opacity: 1; }
.carousel-pause-btn .play-icon { opacity: 0; }

/* When paused, show play icon */
.carousel-pause-btn.is-paused .pause-icon { opacity: 0; }
.carousel-pause-btn.is-paused .play-icon { opacity: 1; }

/* On mobile, make button slightly smaller */
@media (max-width: 600px) {
  .carousel-pause-btn {
    width: 44px;
    height: 44px;
  }
  .carousel-pause-btn .pause-icon,
  .carousel-pause-btn .play-icon {
    font-size: 1rem;
  }
}

/* ── Carousel Dots ── */
.carousel-dots {
  display: flex; gap: 8px; justify-content: center; padding: 12px;
  position: absolute; bottom: 4px; width: 100%; z-index: 3;
}
.carousel-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer;
  transition: all 0.3s ease;
}
.carousel-dot:hover {
  background: rgba(255,255,255,0.7);
  transform: scale(1.2);
}
.carousel-dot.active {
  background: var(--white);
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}


/* ── Floating Leaves ── */
.floating-leaf {
  position: absolute; font-size: 2rem; opacity: 0.6;
  animation: float 4s ease-in-out infinite; pointer-events: none;
}
.floating-leaf:nth-child(1) { top: 10%; left: -10%; animation-delay: 0s; }
.floating-leaf:nth-child(2) { bottom: 15%; right: -8%; animation-delay: 1.5s; }

@keyframes float {
  0%,100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-14px) rotate(5deg); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; max-width: 100%; }
  .hero-content { order: 1; }
  .hero-visual  { order: 2; display: flex; }
  .hero-stats   { order: 0; margin-top: 0; margin-bottom: 24px; }
  .floating-leaf { display: none; }
  .carousel-slides { height: 380px; }
  .carousel-slide-content h3 { font-size: 1.2rem; }
  .carousel-slide-content p { font-size: 0.8rem; }
  .carousel-slide-content { padding: 20px 20px 16px; }
}
@media (max-width: 480px) {
  .carousel-slides { height: 340px; }
  .carousel-slide-content { padding: 16px 16px 12px; }
  .carousel-slide-content h3 { font-size: 1.1rem; }
  .carousel-slide-content p { font-size: 0.78rem; }
}
@media (min-width: 901px) {
  .hero-visual { display: flex; }
  .hero-card { }
  .carousel-slides { height: 400px; }
}
@media (min-width: 1200px) {
  .hero-card { }
  .carousel-slides { height: 450px; }
}

@media (min-width: 1400px) {
  .hero-card { max-width: 100%; }
  .carousel-slides { height: 480px; }
}

@media (min-width: 1440px) {
  .hero-title    { font-size: 3.8rem; }
  .hero-subtitle { font-size: 1.3rem; max-width: 700px; }
}
@media (min-width: 1920px) {
  .hero-title    { font-size: 4.8rem; }
  .hero-subtitle { font-size: 1.5rem; max-width: 860px; }
}

@media (min-width: 2560px) {
  .hero-title    { font-size: 6rem; }
  .hero-subtitle { font-size: 1.8rem; max-width: 1100px; }
}
@media (min-width: 3840px) {
  .hero-title    { font-size: 8rem; }
  .hero-subtitle { font-size: 2.2rem; max-width: 1500px; }
}
