/* ============================================================
   Home Page Specific Styles (home.css)
   ============================================================ */

/* Hero Section - Full uncropped height */
.hero-section {
  position: relative;
  width: 100%;
  padding: 0;
  margin: 0;
  display: block;
}

.hero-wrapper {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-container {
  position: relative;
  width: 100%;
  height: auto;
  z-index: 1;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Overlay to ensure high contrast and legibility for the quote */
.hero-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  z-index: 2;
  pointer-events: none;
}

/* Hero Text / Quote */
.hero-text-container {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px var(--page-margin);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.hero-image-container.has-video img.hero-image {
  opacity: 0.2;
}

.quotes-rotator-wrapper {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quotes-rotator-wrapper.fade-out {
  opacity: 0;
  transform: translateY(-8px);
}

.hero-quote {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 400;
  font-size: 44px;
  line-height: 115%;
  letter-spacing: 0%;
  text-align: center;
  color: #FFFFFF;
  margin: 0;
  max-width: 820px;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-quote em {
  font-style: italic;
}

.quote-author-credit {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: #a3d88d;
  margin-top: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.quote-dots-indicator {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  pointer-events: auto;
}

.quote-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quote-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.quote-dot.active {
  background: #a3d88d;
  width: 24px;
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-quote {
    font-size: 36px;
    min-width: auto;
  }

  .bottom-header-body {
    padding: 20px 20px 24px;
  }

  .bottom-header-inner-card {
    min-height: 180px;
    padding: 24px;
  }

  .bottom-header-title {
    font-size: 36px;
  }
}

@media (max-width: 680px) {
  .quote-break {
    display: none;
  }

  .hero-quote {
    font-size: 26px;
    line-height: 1.15;
    min-width: auto;
  }

  .sawtooth-pattern-wrapper,
  .sawtooth-svg {
    height: 40px;
  }

  .bottom-header-section {
    padding-top: 20px;
  }

  .bottom-header-body {
    padding: 14px 14px 18px;
  }

  .bottom-header-inner-card {
    min-height: 150px;
    padding: 18px 16px;
  }

  .bottom-header-title {
    font-size: 24px;
  }
}

/* Bottom Header / Section: Be A Part Of Our Latest */
.bottom-header-section {
  position: relative;
  width: 100%;
  background-color: #000000;
  padding: 20px 0 0;
}

.bottom-header-container {
  position: relative;
  width: 100%;
  margin: 0;
}

/* Serrated / Sawtooth Wave Top Edge (Group 9) */
.sawtooth-pattern-wrapper {
  position: relative;
  width: 100%;
  height: 57.37px;
  overflow: hidden;
  line-height: 0;
  display: block;
}

.sawtooth-svg {
  display: block;
  width: 100%;
  height: 57.37px;
}

/* Green Leaf Repeating Banner (Frame 259) */
.repeating-leaf-banner {
  position: relative;
  width: 100%;
  height: 54px;
  background-color: #a3d88d;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin: 0;
  border: none;
}

.repeating-leaf-pattern {
  width: 100%;
  height: 54px;
  background-image: url('/assets/Home_Catch_up.png');
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 54px;
  transform: none;
}

/* Green Body Frame */
.bottom-header-body {
  position: relative;
  width: 100%;
  background-color: #a3d88d;
  padding: 28px 28px 32px;
  margin-top: -1px;
  box-sizing: border-box;
}

/* White Inner Card */
.bottom-header-inner-card {
  position: relative;
  width: 100%;
  min-height: 220px;
  background-color: #ffffff;
  padding: 32px 36px;
  box-sizing: border-box;
}

.latest-card-layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.latest-card-header {
  flex: 1;
  min-width: 280px;
}

.bottom-header-title {
  font-family: 'Roboto', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #000000;
  margin: 0 0 12px 0;
  text-transform: uppercase;
}

.latest-section-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
  max-width: 520px;
}

/* Latest Video Preview Card */
.latest-video-preview-wrapper {
  flex: 1;
  max-width: 560px;
  width: 100%;
}

.latest-video-card {
  background: #0d1117;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.latest-video-card:hover,
.latest-video-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  border-color: #a3d88d;
}

.latest-video-thumb-wrap {
  position: relative;
  width: 180px;
  height: 110px;
  min-width: 180px;
  border-radius: 10px;
  overflow: hidden;
  background: #000000;
}

.latest-video-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.latest-video-card:hover .latest-video-cover-img {
  transform: scale(1.06);
}

.latest-video-thumb-wrap .video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(163, 216, 141, 0.92);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.latest-video-card:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.12);
  background: #a3d88d;
}

.latest-video-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.latest-video-badge {
  display: inline-block;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #a3d88d;
  text-transform: uppercase;
}

.latest-video-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.latest-video-summary {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: #9da5b4;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 900px) {
  .latest-card-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .latest-video-preview-wrapper {
    max-width: 100%;
  }
  .bottom-header-title {
    font-size: 32px;
  }
}

@media (max-width: 600px) {
  .latest-video-card {
    flex-direction: column;
    align-items: stretch;
  }
  .latest-video-thumb-wrap {
    width: 100%;
    height: 180px;
  }
}

/* ============================================================
   Pakistan Map / Our Stories Section
   ============================================================ */
.map-section {
  width: 100%;
  background-color: #000000;
}

/* Centered frame with side margins matching Figma Frame 154 */
.map-frame {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px var(--page-margin) 36px;
  box-sizing: border-box;
}

/* Relative container — markers are positioned % relative to this */
.map-pin-area {
  position: relative;
  width: 100%;
  line-height: 0;
}

.map-bg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* ---- City Marker ---- */
.city-marker {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 5;
  outline: none;
  background: transparent;
  border: none;
  padding: 0;
}

.city-marker:focus-visible .city-label {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

/* ---- Green Leaf Icon ---- */
.city-leaf {
  display: block;
  width: clamp(22px, 2.8vw, 42px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(163, 216, 141, 0.45));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.25s ease;
  pointer-events: none;
  user-select: none;
}

.city-marker:hover .city-leaf {
  transform: translateY(-3px) scale(1.08);
  filter: drop-shadow(0 6px 18px rgba(163, 216, 141, 0.7));
}

/* ---- Dark Pill Label ---- */
.city-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(10px, 1.4vw, 20px);
  height: clamp(22px, 2.2vw, 34px);
  border-radius: 9999px;
  white-space: nowrap;
  user-select: none;

  background: radial-gradient(ellipse at 50% 0%, #4a4a4e 0%, #1c1c1e 55%, #0a0a0a 100%);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.8),
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    inset 0 -1px 2px rgba(0, 0, 0, 0.9);

  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: clamp(9px, 0.9vw, 14px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  transition: box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.city-marker:hover .city-label {
  transform: translateY(1px);
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.9),
    inset 0 1px 1px rgba(255, 255, 255, 0.16),
    inset 0 -1px 2px rgba(0, 0, 0, 1);
}

/* ---- Ripple Rings Container ---- */
.city-ripples {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: -1;
}

/* ---- Individual Ripple Rings ---- */
.ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: clamp(100px, 12vw, 180px);
  height: clamp(100px, 12vw, 180px);
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  opacity: 0;
  pointer-events: none;
}

.city-marker:hover .ripple,
.city-marker:focus-visible .ripple {
  animation: ripple-expand 2.2s ease-out infinite;
}

.city-marker:hover .r2,
.city-marker:focus-visible .r2 {
  animation-delay: 0.55s;
}

.city-marker:hover .r3,
.city-marker:focus-visible .r3 {
  animation-delay: 1.1s;
}

@keyframes ripple-expand {
  0% {
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0.75;
  }

  60% {
    opacity: 0.3;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

@media (max-width: 680px) {
  .city-label {
    padding: 0 8px;
    height: 20px;
    font-size: 8px;
    letter-spacing: 0.04em;
  }

  .city-leaf {
    width: 18px;
  }

  .ripple {
    width: 70px;
    height: 70px;
  }
}

/* ---- Interactive Map Marker Popup / Dropdown Card ---- */
.city-popup {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(240px, 23vw, 300px);
  background-color: #ffffff;
  padding: 24px 24px 28px;
  box-sizing: border-box;
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.94);
  transform-origin: top left;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.22s ease;
  z-index: 30;
  text-align: left;
  cursor: default;
}

#marker-jalalpur .city-popup,
#marker-hunza .city-popup {
  left: auto;
  right: 0;
  transform-origin: top right;
}

#marker-thar .city-popup {
  top: auto;
  bottom: 0;
  transform-origin: bottom left;
}

.city-marker.is-open {
  z-index: 35;
}

.city-marker.is-open .city-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

.city-marker.is-open .city-leaf,
.city-marker.is-open .city-label,
.city-marker.is-open .city-ripples {
  opacity: 0;
  pointer-events: none;
}

.popup-badge {
  display: inline-block;
  background-color: #8cd867;
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 22px;
  border-radius: 9999px;
  margin-bottom: 18px;
  user-select: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(140, 216, 103, 0.3);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.popup-badge:hover {
  filter: brightness(1.05);
  transform: scale(1.02);
}

.popup-text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(13px, 1.1vw, 15.5px);
  line-height: 1.48;
  color: #606060;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

@media (max-width: 900px) {
  .city-popup {
    width: min(280px, 82vw) !important;
    max-width: 86vw !important;
    padding: 18px 16px 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85) !important;
  }

  .popup-badge {
    font-size: 11px !important;
    padding: 6px 16px !important;
    margin-bottom: 10px !important;
  }

  .popup-text {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }
}

@media (max-width: 768px) {
  .hero-text-container {
    padding: 24px var(--page-margin);
  }

  .hero-quote {
    font-size: clamp(24px, 7vw, 36px);
    line-height: 1.2;
    min-width: auto;
  }

  .bottom-header-section {
    padding-top: 16px;
  }

  .bottom-header-body {
    padding: 16px 14px 20px;
  }

  .bottom-header-inner-card {
    padding: 20px 16px;
    border-radius: 4px;
  }

  .bottom-header-title {
    font-size: clamp(26px, 6vw, 34px);
    line-height: 1.15;
  }

  .latest-section-desc {
    font-size: 14px;
    line-height: 1.55;
  }

  .latest-video-thumb-wrap .video-play-btn {
    width: 48px;
    height: 48px;
  }

  .map-frame {
    padding: 20px var(--page-margin) 28px;
  }

  .city-marker {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .hero-quote {
    font-size: clamp(20px, 6.5vw, 28px);
    line-height: 1.22;
  }

  .sawtooth-pattern-wrapper,
  .sawtooth-svg {
    height: 32px;
  }

  .repeating-leaf-banner,
  .repeating-leaf-pattern {
    height: 40px;
    background-size: auto 40px;
  }

  .bottom-header-title {
    font-size: 24px;
  }

  .latest-video-thumb-wrap {
    height: 160px;
  }
}
