/* =====================================================
   INDEX.HTML PAGE-SPECIFIC STYLES
   ===================================================== */

/* Index Hero (with background image) */
.hero {
  background:
    linear-gradient(rgba(31, 79, 58, .94), rgba(31, 79, 58, .70)),
    url('https://builtenvironmentindaba.africa/wp-content/uploads/2024/11/066A9790-scaled-1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Overview layout */
.overview {
  max-width: 1400px;
  padding: var(--sm) var(--md);
  margin: auto;
}

.overview-header {
  display: flex;
  align-items: center;
  gap: var(--lg);
  margin-bottom: var(--xl);
  flex-wrap: wrap;
}

.overview-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(31, 79, 58, 0.15));
  transition: transform 0.3s ease;
}

.overview-logo:hover {
  transform: scale(1.05) rotate(2deg);
}

.overview h2 {
  margin-bottom: 0;
  margin: 0;
}

.overview p {
  max-width: 1200px;
  color: var(--muted);
  margin-bottom: var(--xl);
  font-size: 1.05rem;
  line-height: 1.7;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: var(--lg);
  align-items: stretch;
}

.overview-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.overview-quote {
  background: #f8d94c;
  color: #ffffff;
  border-radius: var(--radius);
  padding: var(--xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  min-height: 100%;
  font-weight: 700;
  line-height: 1.75;
}

.overview-quote p {
  color: #ffffff;
  margin: 0;
  font-size: 1.05rem;
}

/* Carousel */
.carousel {
  position: relative;
  margin-top: var(--xxxl);
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: var(--lg);
  transition: transform .4s ease;
  align-items: stretch;
}

.card {
  min-width: 520px;
  flex: 0 0 320px;
  height: 360px;
  background: var(--white);
  padding: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 8px solid var(--red);
  overflow: hidden;
  display: flex;
}

.card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: cover;
}

.card a {
  display: flex;
  flex: 1;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: var(--md);
}

.carousel-btn {
  background: var(--green-primary, #2E6B4E);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-weight: bold;
  box-shadow: 0 10px 25px rgba(46, 107, 78, 0.2);
}

.carousel-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.carousel-btn:hover:not(:disabled) {
  background: var(--green-dark, #1F4F3A);
  transform: scale(1.1);
  box-shadow: 0 15px 35px rgba(46, 107, 78, 0.3);
}

.carousel-btn:active:not(:disabled) {
  transform: scale(0.95);
}

/* Lightbox Modal */
.carousel-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  flex-direction: column;
}

.carousel-lightbox.active {
  display: flex;
}

.carousel-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius);
}

.carousel-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2001;
}

.carousel-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* 2-column grid */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--xxxl);
  margin-top: var(--xxxl);
}

.grid-2col .card {
  position: relative;
  background: linear-gradient(135deg, #2E6B4E 0%, #1F4F3A 100%);
  background-size: cover;
  background-position: center;
  padding: var(--xxl);
  border-radius: var(--radius);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: none;
  border-top: none;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
  gap: var(--md);
}

.grid-2col .card:nth-child(1) {
  background-image: url("https://purepng.com/public/uploads/large/purepng.com-diamondobjectsstoneobjectdiamondjeweljewellery-631521883994wxfoy.png");
  background-repeat: no-repeat;
  background-position: center;
}

.grid-2col .card:nth-child(2) {
  background-image: url('https://pngimg.com/uploads/gold/gold_PNG11028.png');
  background-size: cover;
  background-position: center;
}

.grid-2col .card:nth-child(3) {
  background-image: url('https://pngimg.com/d/silver_PNG17190.png');
  background-size: cover;
  background-position: center;
}

.grid-2col .card:nth-child(4) {
  background-image: url('https://pngimg.com/d/gear_PNG57.png');
  background-size: cover;
  background-position: center;
}

.grid-2col .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(46, 107, 78, 0.85) 0%, rgba(31, 79, 58, 0.9) 100%);
  z-index: 1;
}

.grid-2col .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .15);
}

.grid-2col .card h3 {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 var(--md) 0;
  text-align: center;
}

.grid-2col .card p {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  opacity: 0.95;
}

.grid-2col .card-link {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 1.25rem;
  transition: filter .2s ease;
  display: inline-block;
  margin: 0 auto;
  text-align: center;
}

.grid-2col .card-link:hover {
  filter: brightness(1.05);
}

.grid-2col .card-link::after {
  content: " ↗";
  display: inline-block;
}

/* Partners block */
.partners {
  margin-top: var(--xxxl);
  text-align: center;
}

.partners h3 {
  font-size: 2rem;
  color: var(--green-dark);
  margin-bottom: var(--sm);
}

.partners p {
  max-width: 1000px;
  margin: 0 auto var(--lg);
  color: var(--muted);
  line-height: 1.7;
}

.partners-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--lg) var(--xxl);
  padding: var(--md) 0 var(--lg);
}

.partners-logos img {
  height: 52px;
  opacity: .92;
  filter: contrast(.95) saturate(.95);
}

.partners-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dark);
  padding: var(--sm) var(--lg);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  transition: transform .2s ease;
}

.partners-cta:hover {
  transform: translateY(-2px);
}

/* Booth details panel */
.booth-panel {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  padding: 1.2rem;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--lg);
  align-items: start;
}

.booth-media {
  height: 220px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(22, 76, 59, .15), rgba(22, 76, 59, .35));
  border: 1px solid #E3E7E5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  font-weight: 700;
}

.booth-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.booth-details h4 {
  margin: 0 0 .25rem;
  color: var(--green-dark);
  font-size: 1.25rem;
}

.booth-details h3 {
  margin: 0 0 .65rem;
  font-size: 1.4rem;
  color: var(--black);
}

.booth-details ul {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.55;
}

/* Responsive overrides for index-specific elements */
@media(max-width: 720px) {
  .booth-panel {
    grid-template-columns: 1fr;
  }

  .booth-media {
    height: 160px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .grid-2col {
    grid-template-columns: 1fr;
    gap: var(--xl);
  }
}
