/* ===== Tenacious Gallery Page (Optimized Premium Edition - Final) ===== */

:root {
  /* Unified color system */
  --blue: #0033a0;
  --red: #e50914;
  --white: #fff;
  --black: #0d0d0d;
  --gray: #f4f5f7;
  --fade: rgba(0, 0, 0, 0.6);
  --transition: 0.4s ease;
  --radius: 1rem;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--black);
  background: var(--gray);
  overflow-x: hidden;
  line-height: 1.5;
}

/* ===== HEADER ===== */
.gallery-header {
  background: linear-gradient(135deg, var(--blue), var(--black));
  color: var(--white);
  text-align: center;
  padding: 100px 20px;
  position: relative;
}
.gallery-header .title {
  font-size: 3rem;
  font-family: 'Playfair Display', serif;
  margin-bottom: 10px;
}
.gallery-header .subtitle {
  font-size: 1.2rem;
  color: #eaeaea;
  margin-bottom: 30px;
}
.back-home {
  color: var(--white);
  border: 1px solid var(--red);
  padding: 10px 25px;
  border-radius: 50px;
  text-decoration: none;
  transition: var(--transition);
}
.back-home:hover {
  background: var(--red);
  transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.scroll-indicator span {
  display: block;
  width: 2px;
  height: 25px;
  margin: 0 auto 5px;
  background: var(--red);
  animation: bounce 1.2s infinite alternate;
}
.scroll-indicator p {
  font-size: 0.9rem;
  opacity: 0.7;
}
@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(8px); }
}

/* ===== FILTER BAR ===== */
.filter-bar {
  text-align: center;
  padding: 30px 10px 10px;
}
.filter-btn {
  border: none;
  background: var(--white);
  color: var(--black);
  margin: 5px;
  padding: 10px 18px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--red);
  color: var(--white);
}

/* ===== GALLERY ===== */
.gallery-section {
  padding: 60px 5%;
  background: var(--white);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #000;
}
.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  transition: transform 0.4s ease;
}
.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.05);
}
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #fff;
  text-align: center;
  padding: 1rem;
  opacity: 0;
  border-radius: var(--radius);
  transition: opacity 0.3s ease;
}
.gallery-item:hover .overlay { opacity: 1; }
.overlay h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.overlay p { font-size: 0.95rem; color: #dcdcdc; }

/* ===== LIGHTBOX POPUP ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  animation: fadeIn 0.4s ease;
  padding: 2rem;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  text-align: center;
  position: relative;
}
.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain; /* <-- keeps aspect ratio, fits to lightbox */
  border-radius: var(--radius);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}
.lightbox h3 {
  color: var(--red);
  margin-top: 1rem;
  font-size: 1.2rem;
  font-family: 'Playfair Display', serif;
}
.lightbox p {
  color: #ddd;
  font-size: 1rem;
  margin-top: 0.5rem;
}
.close {
  position: absolute;
  top: -40px;
  right: -10px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  padding: 0.4rem 0.7rem;
  transition: background 0.3s ease;
}
.close:hover { background: rgba(255,255,255,0.3); }

/* ===== QUOTE SECTION (restored) ===== */
.quote-section {
  text-align: center;
  background: var(--blue);
  color: var(--white);
  padding: 80px 20px;
  font-family: 'Playfair Display', serif;
}
.quote-section blockquote {
  font-size: 1.8rem;
  font-style: italic;
}
.quote-section cite {
  display: block;
  margin-top: 15px;
  font-size: 1rem;
  color: #ddd;
}

/* ===== REVIEWS (preserved & harmonized) ===== */
.reviews-section {
  background: #f9fafc;
  padding: 100px 8%;
  text-align: center;
}
.reviews-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--black);
  margin-bottom: 10px;
}
.reviews-subtitle {
  color: #555;
  margin-bottom: 50px;
}
.reviews-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 70px;
}
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
  transition: var(--transition);
}
.review-card:hover { transform: translateY(-6px); }
.review-card .stars { color: #fbc02d; font-size: 1.4rem; margin-bottom: 10px; }
.review-card p { font-style: italic; color: #333; margin-bottom: 10px; }
.review-card h4 { color: var(--blue); font-weight: 600; }

/* ===== REVIEW PAGE (text styling restored) ===== */
.review-section { /* page container for reviews separate from small widgets */
  background: #f8f9fb;
  padding: 4rem 1rem;
  text-align: center;
  color: #1b1b1b;
}
.review-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0a2e52;
  margin-bottom: 0.5rem;
  font-family: 'Playfair Display', serif;
}
.review-subtitle {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 2.5rem;
}

/* ===== REVIEW FORM ===== */
.review-form {
  max-width: 600px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: left;
  transition: all 0.3s ease;
}
.review-form:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 35px rgba(0, 0, 0, 0.12);
}
.review-form h3 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-family: 'Playfair Display', serif;
}
.form-group { margin-bottom: 1.5rem; text-align: left; }
label {
  font-weight: 600;
  color: #0a2e52;
  display: block;
  margin-bottom: 0.5rem;
}
.review-form input,
.review-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
}
.review-form textarea { height: 120px; resize: none; }
.stars-input {
  display: flex;
  gap: 8px;
  font-size: 1.6rem;
  color: #ccc;
  cursor: pointer;
  margin-bottom: 1rem;
}
.stars-input span.active { color: #ffb703; transform: scale(1.1); }
.submit-btn {
  background: linear-gradient(90deg, var(--blue), var(--red));
  color: white;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 87, 184, 0.3);
}
#successMsg {
  margin-top: 1rem;
  font-weight: 500;
  color: #0a2e52;
}

/* ===== POPUP ===== */
.popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.popup.active { display: flex; animation: fadeIn 0.3s ease-in-out; }
.popup-content {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  animation: scaleUp 0.3s ease;
}
.popup-content h3 { color: var(--blue); margin-bottom: 0.5rem; font-family: 'Playfair Display', serif; }
.popup-content p { font-size: 1rem; color: #333; margin-bottom: 1.5rem; }
.popup-content button {
  background: linear-gradient(90deg, var(--blue), var(--red));
  color: white;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.popup-content button:hover { transform: scale(1.05); }
@keyframes scaleUp {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}

/* ===== FOOTER (restored) ===== */
.gallery-footer {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 25px;
  font-size: 0.95rem;
}

/* Small responsive tweaks */
@media (max-width: 640px) {
  .gallery-header { padding: 60px 12px; }
  .gallery-header .title { font-size: 2rem; }
  .lightbox-content { padding: 1rem; max-height: 85vh; }
  .lightbox-content img,
  .lightbox-content video { max-height: 70vh; }
}
#backToTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: none;
  transition: all 0.3s ease;
}
#backToTop:hover { background: var(--blue); }
