/* ========================= */
/* ===== Global Reset ===== */
/* ========================= */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --bg-color: #dae9f8;
  --accent-color: #ceeff2;
  --accent-hover: #b1dde0;
  --font-main: 'Poppins', sans-serif;
  --font-fancy: 'Dancing Script', cursive;
  --text-dark: #333;
  --text-primary: #1d3557;
  --text-secondary: #457b9d;
}

/* ========================= */
/* ===== Base Styles ======= */
/* ========================= */
body {
  background-color: #dae9f8;
  background-image: url("../images/flower.jpg"), url("../images/flower1.jpg");
  background-repeat: no-repeat, no-repeat;
  background-position: left center, right center;
  background-size: 50vw, 50vw;
  background-attachment: fixed, fixed;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: var(--font-main);
}

/* ========================= */
/* ===== Navigation ======== */
/* ========================= */
nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  background-color: #dae9f8;
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: wrap;
  flex-direction: row;
}

nav a {
  text-decoration: none;
  font-weight: 500;
  color: #333;
  transition: color 0.2s ease;
  position: relative;
  white-space: nowrap;
}

nav a:hover {
  color: #457b9d;
}

nav a:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 50%;
  background-color: #333;
}

nav a:focus {
  color: var(--text-primary);
  text-decoration: underline;
}

/* ========================= */
/* ===== Sections ========== */
/* ========================= */
.section-wrapper,
.wishlist-form,
.photo-upload-section {
  width: 90%;
  max-width: 700px;
  margin: 40px auto;
  padding: 2rem;
  background-color: var(--bg-color);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  text-align: center;
}

.section-wrapper h2,
.wishlist-form h2,
.photo-upload-section h2 {
  margin-bottom: 1.5rem;
  font-family: var(--font-fancy);
  font-size: 2rem;
  color: var(--text-primary);
}

/* ========================= */
/* ===== Hero ============== */
/* ========================= */
.hero {
  background-color: var(--bg-color);
  border-radius: 12px;
  padding: 60px 20px;
  color: var(--text-dark);
}

.hero h1,
.hero p,
.countdown-section h2,
.details p {
  font-family: var(--font-fancy);
}

.hero h1 {
  font-size: 3em;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.5em;
}

/* ========================= */
/* ===== Countdown ========= */
/* ========================= */
.countdown-section h2 {
  font-size: 2.5rem;
  color: var(--text-secondary);
}

#countdown {
  font-size: 2rem;
  color: var(--text-primary);
}

/* ========================= */
/* ===== Buttons =========== */
/* ========================= */
.button,
.playlist-form button,
.claim-btn,
.wishlist-form button {
  background-color: var(--accent-color);
  color: var(--text-dark);
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  font-family: var(--font-main);
}

.button:hover,
.playlist-form button:hover,
.claim-btn:hover,
.wishlist-form button:hover {
  background-color: var(--accent-hover);
}

.button:disabled,
.claim-btn:disabled,
.wishlist-form button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ========================= */
/* ===== Forms ============= */
/* ========================= */
input[type="text"],
input[type="email"],
textarea {
  max-width: 700px;
  width: 80%;
  margin: 0 auto 15px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: var(--font-main);
  display: block;
}

textarea {
  resize: vertical;
}

/* ========================= */
/* ===== Photo Gallery ===== */
/* ========================= */
.photo-gallery,
#photoGallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* Gallery container */
.photo-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.photo-item:hover {
  transform: scale(1.05);
}

/* Image protection */
.photo-item img,
.lightbox-content {
  max-height: 160px;
  width: 100%;
  object-fit: cover;
  display: block;

  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* Invisible overlay to block interaction */
.image-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 2;
}

/* ========================= */
/* ===== Lightbox ========== */
/* ========================= */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}

/* ========================= */
/* ===== Floating Hearts ==== */
/* ========================= */
.heart {
  position: absolute;
  width: 16px;
  height: 16px;
  background: pink;
  transform: rotate(45deg);
  animation: floatUp 6s linear forwards;
  pointer-events: none;
}

@keyframes floatUp {
  from {
    transform: translateY(0) rotate(45deg);
    opacity: 1;
  }
  to {
    transform: translateY(-100vh) rotate(45deg);
    opacity: 0;
  }
}

/* ========================= */
/* ===== Mobile ============ */
/* ========================= */
@media (max-width: 768px) {
  .heart {
    display: none !important;
  }

  nav {
    gap: 0.5rem !important;
    padding: 0.75rem 0.25rem !important;
    row-gap: 0.75rem !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  nav a {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    flex: 0 0 calc(33.333% - 0.75rem);
    text-align: center;
  }

  nav a::before {
    display: none;
  }

  .hero h1 {
    font-size: 2em;
  }

  .hero p {
    font-size: 1.2em;
  }

  input[type="text"],
  input[type="email"],
  textarea {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .section-wrapper,
  .wishlist-form,
  .photo-upload-section {
    width: 95%;
    max-width: 95vw;
    padding: 1.5rem 1rem;
    margin-left: auto;
    margin-right: auto;
  }
}
/* =============================== */
/* MOBILE ACTION BUTTON NAV FIX    */
/* =============================== */
@media (max-width: 768px) {

  .actions .button-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem 0.5rem;
    width: 100%;
    margin-top: 1.25rem;
  }

  .actions .button-group a,
  .actions .button-group button {
    font-size: 0.85rem;
    padding: 0.6rem 0;
    text-align: center;
    border-radius: 8px;
    white-space: nowrap;
  }
}
/* ===================================== */
/* MOBILE ACTION BUTTON NAV — HARD FIX   */
/* ===================================== */
@media (max-width: 768px) {

  .actions {
    padding: 1.5rem 1rem;
  }

  .actions p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
  }

  .actions .button-group {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    width: 100%;
    margin: 0 auto;
  }

  .actions .button-group a.button {
    padding: 0.65rem 0;
    font-size: 0.85rem;
    line-height: 1.2;
    text-align: center;
    border-radius: 10px;
    width: 100%;
    white-space: nowrap;
  }
}
