/* Import Fonts */
@import url("https://fonts.googleapis.com/css2?family=Allura&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Great+Vibes&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

:root {
  --primary-color: #0f3d0f; /* Emerald Green */
  --secondary-color: #d4af37; /* Gold */
  --accent-color: #1a4d1a;
  --bg-color: #fdfcf8;
  --text-color: #1a1a1a;
  --font-heading: "Great Vibes", cursive;
  --font-subheading: "Playfair Display", serif;
  --font-body: "Cormorant Garamond", serif;
  --font-ui: "Roboto", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  position: relative;
  background: var(--bg-color);
  font-family: var(--font-body);
  color: var(--text-color);
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

/* Wrapper & Overlay */
.wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: var(--bg-color);
  transition:
    opacity 0.8s ease-out,
    visibility 0.8s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wrapper.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay {
  width: 100%;
  max-width: 480px;
  height: 100%;
  background-image: url("./images/intro-bg.png"); /* Fallback / Texture */
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 61, 15, 0.4); /* Green tint */
  backdrop-filter: blur(2px);
}

.overlay-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.toggle-button {
  background: white;
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  width: 160px;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
  transition: transform 0.3s ease;
  padding: 20px;
}

.toggle-button:hover {
  transform: scale(1.05);
}

.toggle-button p {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--primary-color);
  line-height: 1;
  margin: 2px 0;
}

.toggle-button .buka {
  font-family: var(--font-ui);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 10px;
  color: var(--text-color);
}

/* Card Container */
.card {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  display: none; /* Hidden by default until overlay opens */
}

/* Animations */
.fade-top-1 {
  animation: fadeTop 0.8s ease forwards;
  opacity: 0;
  transform: translateY(20px);
  animation-delay: 0.2s;
}
.fade-top-2 {
  animation: fadeTop 0.8s ease forwards;
  opacity: 0;
  transform: translateY(20px);
  animation-delay: 0.4s;
}
.fade-top-3 {
  animation: fadeTop 0.8s ease forwards;
  opacity: 0;
  transform: translateY(20px);
  animation-delay: 0.6s;
}
.fade-top-4 {
  animation: fadeTop 0.8s ease forwards;
  opacity: 0;
  transform: translateY(20px);
  animation-delay: 0.8s;
}

@keyframes fadeTop {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Intro Section */
.intro {
  padding: 60px 20px;
  text-align: center;
  background: url("./images/intro2-bg.png") no-repeat center top;
  background-size: cover;
  min-height: 100vh; /* Fallback */
  min-height: 100svh; /* Stable Mobile Height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative; /* Context for scroll indicator */
}

/* Mobile Adjustment for Scroll Indicator */
@media (max-width: 768px) {
  .intro {
    padding-top: 30px; /* Reduce space on top */
  }
  .scroll-indicator {
    bottom: 130px; /* Lift higher on mobile to clear browser UI bars */
  }
}

.bismillah-container {
  margin-bottom: 20px;
}

.bismillah {
  width: 60%;
  max-width: 200px;
  filter: brightness(0) saturate(100%) invert(18%) sepia(26%) saturate(3015%)
    hue-rotate(85deg) brightness(97%) contrast(93%); /* Make it dark green approximately */
}

.intro .title {
  font-family: var(--font-subheading);
  text-transform: uppercase;
  font-size: 1.2rem;
  letter-spacing: 3px;
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

.intro h2 {
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--primary-color);
  line-height: 1;
  margin: 10px 0;
}

.intro .date {
  margin-top: 2rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  color: #555;
  letter-spacing: 1px;
}



/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--primary-color);
  animation: bounce 2s infinite;
  opacity: 0.8;
}

.scroll-indicator p {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.scroll-indicator i {
  font-size: 2rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Info Section */
.info {
  padding: 60px 20px;
  text-align: center;
  background-color: #fff;
}

.quran-verse {
  font-style: italic;
  color: #555;
  margin-bottom: 40px;
  padding: 0 10px;
}

.quran-verse .surah {
  font-style: normal;
  font-weight: 600;
  margin-top: 10px;
  font-size: 0.9rem;
}

.divider-custom img {
  width: 60%;
  margin: 20px 0;
}

.parents {
  margin-top: 20px;
  margin-bottom: 40px;
}

.parent-names p {
  font-family: var(--font-subheading);
  font-size: 1.3rem;
  color: var(--primary-color);
  font-weight: 600;
  margin: 5px 0;
}

.couple > p {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--primary-color);
  margin: 10px 0;
}

.event-details {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.event-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.map-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--primary-color);
  padding: 5px 15px;
  border-radius: 20px;
  transition: all 0.3s;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

.map-link:hover {
  background: var(--primary-color);
  color: white;
}

.detail-item .label {
  font-family: var(--font-ui);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: var(--secondary-color);
  margin-bottom: 5px;
  font-weight: 700;
  text-align: center; /* Ensure centering */
}

.detail-item .value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.countdown {
  margin: 60px 0;
  padding: 30px 20px;
  background: var(--primary-color);
  border-radius: 10px;
  color: white;
}

.countdown .title {
  font-family: var(--font-subheading);
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.timer {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.time-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 5px;
  min-width: 60px;
}

.time-box span:first-child {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-ui);
}

.time-box .label {
  font-size: 0.7rem;
  text-transform: uppercase;
}

/* Itinerary */
.itinerary {
  margin: 50px 0;
}

.itinerary .title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 30px;
}

.parents-info {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: #555;
  margin-top: -5px;
  font-style: italic;
}

.schedule p {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  color: #333;
  margin: 5px 0;
}

/* Timeline / Itinerary */
.timeline {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

/* Central Line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--secondary-color);
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  position: relative;
  width: 50%;
  margin-bottom: 0px;
  clear: both;
}

/* Odd Items (Left) */
.timeline-item:nth-child(odd) {
  float: left;
  text-align: right;
  padding-right: 30px;
}

/* Even Items (Right) */
.timeline-item:nth-child(even) {
  float: right;
  text-align: left;
  padding-left: 30px;
}

/* Clear Floats */
.timeline::after {
  content: "";
  display: table;
  clear: both;
}

/* The Dots */
.timeline-item::after { 
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--secondary-color);
  border-radius: 50%;
  top: 5px;
  /* Border to make it pop against the line */
  border: 3px solid #fff; 
  box-sizing: content-box;
}

/* Dot Positioning for Odd (Right edge) */
.timeline-item:nth-child(odd)::after {
  right: -10px; /* 7px radius + 3px border = 10px approx center? 
                   Width 14px -> radius 7. Border 3. Total half width 10. 
                   Line is at 0 relative to edge. 
                   So right: -10px puts center at 0. */
}

/* Dot Positioning for Even (Left edge) */
.timeline-item:nth-child(even)::after {
  left: -10px;
}

/* Override previous specific styling if needed */
.timeline-item .time {
  display: block;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.timeline-item .activity {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #555;
}



/* Footer Nav */
.footer-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 90%;
  max-width: 400px;
}

.menu {
  background: white;
  display: flex;
  justify-content: space-around;
  padding: 10px;
  border-radius: 50px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  list-style: none;
}

.menu li {
  font-size: 1.5rem;
  color: var(--primary-color);
  padding: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.menu li:hover {
  transform: translateY(-3px) scale(1.1);
  color: var(--secondary-color);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 90%;
  width: 350px;
  position: relative;
  text-align: center;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #888;
}

.modal-body h3 {
  margin-bottom: 15px;
  font-family: var(--font-subheading);
  color: var(--primary-color);
}

.modal-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-buttons button {
  padding: 10px;
  border: 1px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
}

.modal-buttons button:hover {
  background: var(--primary-color);
  color: white;
}



@media (min-width: 768px) {
  .card {
    border-right: 1px solid #eee;
    border-left: 1px solid #eee;
  }
}
