/* ============================================================
   TunaGrow CBO — Home Inner Sections (Video / Events / Impact / Testimonials)
   File: css/home.css
   ============================================================ */

/* ── Home Section Wrapper ── */
.home-section {
  max-width: 1400px; margin: 0 auto;
  padding: 0 5% 80px; position: relative; z-index: 1;
}
.section-header { text-align: center; margin-bottom: 40px; }
.section-header-label {
  font-family: 'Caveat', cursive; font-size: 1.1rem;
  color: var(--harvest); margin-bottom: 6px;
}
.section-header-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem,3vw,2.2rem); color: var(--earth); margin-bottom: 8px;
}
.section-header-divider {
  width: 50px; height: 3px; background: var(--harvest);
  border-radius: 2px; margin: 0 auto 16px;
}
.section-header-sub {
  color: var(--muted); font-size: 0.95rem; max-width: 500px; margin: 0 auto;
}

/* ── Video Cards ── */
.video-card {
  background: var(--white); border-radius: 20px; overflow: hidden;
  box-shadow: none;
  transition: transform 0.3s, box-shadow 0.3s;
  border: none;
}
.video-card:hover {
  transform: translateY(-4px); box-shadow: 0 12px 36px rgba(59,42,26,0.14);
}
.video-info { padding: 20px 22px; }
.video-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; color: var(--earth); margin-bottom: 6px;
}
.video-info p { font-size: 0.8rem; color: var(--muted); line-height: 1.6; }
/* If no video-info, video fills entire card */
.video-card .video-player-wrapper:only-child {
  height: 100%;
}
/* Remove padding when video-info is empty or absent */
.video-card:has(.video-player-wrapper:only-child) {
  padding: 0;
}

/* ── Video Player ── */
.video-player-wrapper {
  position: relative; width: 100%; padding-top: 56.25%;
  background: #000; overflow: hidden; cursor: pointer;
  border: none;
  margin: 0;
}
.video-player-wrapper video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.video-play-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3); z-index: 2; transition: opacity 0.3s;
}
.video-play-overlay.hidden { opacity: 0; pointer-events: none; }
.video-play-btn-circle {
  width: 68px; height: 68px; background: rgba(255,255,255,0.9);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.video-play-btn-circle:hover { background: #fff; transform: scale(1.1); }
.video-play-btn-circle span { font-size: 1.8rem; color: var(--earth); margin-left: 4px; }
.video-pause-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); z-index: 3;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.video-pause-overlay.show { opacity: 1; }
.video-pause-icon {
  width: 68px; height: 68px; background: rgba(255,255,255,0.9);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 4px 20px rgba(0,0,0,0.3); font-size: 2rem;
}

/* ── Event Cards ── */
.event-card {
  background: var(--white); border-radius: 20px; overflow: hidden;
  box-shadow: 0 4px 24px rgba(59,42,26,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.event-card:hover {
  transform: translateY(-4px); box-shadow: 0 12px 36px rgba(59,42,26,0.14);
}
.event-date-badge {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg,rgba(74,124,63,0.08),rgba(122,181,103,0.12));
  border-bottom: 1px solid rgba(107,66,38,0.08);
}
.event-date-box {
  width: 60px; height: 60px; background: var(--leaf);
  color: var(--white); border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0; text-align: center;
}
.event-date-day {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 800; line-height: 1;
}
.event-date-month {
  font-size: 0.7rem; text-transform: uppercase;
  font-weight: 600; letter-spacing: 0.05em;
}
.event-date-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; color: var(--earth); margin-bottom: 4px;
}
.event-date-info .event-time { font-size: 0.8rem; color: var(--harvest); font-weight: 500; }
.event-body { padding: 20px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.event-body p { font-size: 0.85rem; color: var(--muted); line-height: 1.7; margin-bottom: 16px; flex: 1; }
.event-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--soil);
}
.event-meta span { display: flex; align-items: center; gap: 4px; }
.event-tag {
  display: inline-block; background: rgba(201,125,46,0.12); color: var(--harvest);
  font-size: 0.7rem; font-weight: 600; padding: 4px 10px; border-radius: 14px;
  margin-top: 12px; align-self: flex-start;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* ── Impact Cards ── */
.impact-card {
  background: var(--white); border-radius: 20px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(59,42,26,0.06);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex; flex-direction: column;
  align-self: start;
}
.impact-card:hover {
  transform: translateY(-8px); box-shadow: 0 16px 40px rgba(59,42,26,0.12);
}

/* Fallback & Image View */
.impact-images {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px; background: var(--earth); overflow: hidden;
}
.impact-image-box {
  position: relative; min-height: 240px;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: zoom-in;
}
.impact-image-box.before { background-image: linear-gradient(135deg,#8a7060,#a08978); background-color: #8a7060; }
.impact-image-box.after  { background-image: linear-gradient(135deg,#4a7c3f,#7db567); background-color: #4a7c3f; }
.impact-card:hover .impact-image-box { transform: scale(1.04); }

.impact-label {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,0.5); color: var(--white);
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  padding: 6px 12px; border-radius: 12px; letter-spacing: 0.08em; z-index: 2;
  backdrop-filter: blur(4px);
}

.impact-body { padding: 24px 28px 28px; flex: 1; display: flex; flex-direction: column; background: var(--white); position: relative; z-index: 2; }
.impact-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; color: var(--earth); margin-bottom: 12px; font-weight: 800;
}
.impact-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.8; margin-bottom: 20px; flex: 1; }
.impact-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--leaf); font-weight: 600;
  padding-top: 16px; border-top: 1px solid rgba(107,66,38,0.1);
}
.impact-icon { font-size: 1.1rem; }
.impact-subject { color: var(--harvest); }

/* ── Testimonial Cards ── */
.testimonial-card {
  background: var(--white); border-radius: 20px; padding: 32px;
  box-shadow: 0 4px 24px rgba(59,42,26,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.testimonial-card:hover {
  transform: translateY(-4px); box-shadow: 0 12px 36px rgba(59,42,26,0.14);
}
.testimonial-stars { font-size: 1rem; color: var(--sun); margin-bottom: 14px; letter-spacing: 2px; }
.testimonial-card .quote {
  font-size: 0.9rem; color: var(--muted); line-height: 1.8;
  font-style: italic; flex: 1; margin-bottom: 20px;
  padding-left: 20px; border-left: 3px solid var(--sprout);
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: var(--white); flex-shrink: 0;
}
.testimonial-author-info h5 {
  font-size: 0.9rem; font-weight: 600; color: var(--earth); margin-bottom: 2px;
}
.testimonial-author-info p { font-size: 0.75rem; color: var(--harvest); }


/* ── Full-size video card (no description) ── */
.video-card--full {
  padding: 0;
}
.video-card--full .video-player-wrapper {
  padding-top: 0;
  height: 100%;
  min-height: 300px;
  position: relative;
}
.video-card--full .video-player-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .grid-2col { grid-template-columns: 1fr; }
  .impact-images { grid-template-columns: 1fr 1fr; }
}

/* ── Large screens ── */
@media (min-width: 1440px) {
  .home-cards-grid    { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .home-section-wrap  { padding: 100px 8%; }
}
@media (min-width: 1920px) {
  .home-cards-grid    { gap: 40px; }
  .home-section-wrap  { padding: 120px 10%; }
}

@media (min-width: 2560px) {
  .home-cards-grid   { grid-template-columns: repeat(4, 1fr); gap: 48px; }
  .home-section-wrap { padding: 140px 8%; }
}

/* ── Global Lightbox Overlay ── */
.global-lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 10000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  cursor: zoom-out;
}
.global-lightbox-overlay.active {
  opacity: 1; pointer-events: auto;
}
.global-lightbox-wrapper {
  position: relative; max-width: 1200px; max-height: 85vh; width: 95%;
  transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex; align-items: center; justify-content: center;
}
.global-lightbox-overlay.active .global-lightbox-wrapper {
  transform: scale(1);
}
.global-lightbox-wrapper img {
  max-width: 100%; max-height: 85vh; object-fit: contain;
  border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 2px solid rgba(255,255,255,0.1);
}
.global-lightbox-close {
  position: absolute; top: -45px; right: 0;
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 1.2rem;
  cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.global-lightbox-close:hover {
  background: rgba(255,255,255,0.3); transform: scale(1.1);
}
@media (max-width: 768px) {
  .global-lightbox-close {
    top: 15px; right: 15px; background: rgba(0,0,0,0.5);
  }
}
