/* Gallery Page Dedicated Styles */

/* Only gallery-specific additions to avoid overriding main site styles */
/* Keep variables in case gallery needs standalone rendering */
:root {
  --accent: #2563eb;
  --border: #e2e8f0;
  --shadow: 0 10px 25px rgba(0,0,0,0.08);
  --radius: 14px;
}

/* Nav overrides to match main site (mctiairoli.com) */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.05);
  padding: 15px 0;
}

.navbar { width: 100%; }

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: auto;
}

.logo-img { height: 50px; }

.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header .nav-menu .nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark, #1e272e);
  position: relative;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  text-decoration: none;
}

.header .nav-menu .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary, #D32F2F);
  transition: all 0.3s ease;
}

.header .nav-menu .nav-link:hover::after,
.header .nav-menu .nav-link.active::after {
  width: 100%;
}

.header .nav-menu .nav-link:hover {
  color: var(--dark, #1e272e);
  background: transparent;
  transform: none;
}

.header .nav-menu .nav-link.active {
  color: var(--dark, #1e272e);
  background: transparent;
  box-shadow: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: var(--primary, #D32F2F);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.hamburger span {
  width: 30px;
  height: 3px;
  background-color: var(--dark, #1e272e);
  border-radius: 2px;
  transition: all 0.3s ease;
}

body.dark-mode .header {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

body.dark-mode .nav-menu {
  background: var(--white, #0f172a);
}

body.dark-mode .header .nav-menu .nav-link,
body.dark-mode .hamburger span {
  color: var(--dark, #f8fafc);
}

body.dark-mode .hamburger span {
  background-color: var(--dark, #f8fafc);
}

body.dark-mode .theme-toggle {
  border-color: #334155;
  background: #0f172a;
  color: #fbbf24;
}

/* Hero */
.gallery-hero { background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%); padding: 60px 0; border-bottom: 1px solid var(--border); }
.gallery-hero h1 { font-size: 2.2rem; margin: 0 0 10px; }
.gallery-hero p { margin: 0; color: var(--text-secondary); }

/* Sections */
.gallery-section { padding: 50px 0; }
.gallery-page { padding-top: 100px; }
.gallery-header { margin-bottom: 20px; }
.gallery-title { font-size: 1.6rem; margin: 0 0 6px; }
.gallery-subtitle { color: var(--text-secondary); margin: 0; }

/* Grid */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.gallery-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s ease; }
.gallery-item:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,0.12); }
.gallery-item img { display: block; width: 100%; height: 220px; object-fit: cover; backface-visibility: hidden; transform: translateZ(0); }
.gallery-item img { image-rendering: auto; }
/* Ensure Best Performers banner shows fully (no crop) */
#best-performers-2025 .gallery-item img,
#best-performers-2025-2 .gallery-item img { height: auto; object-fit: contain; object-position: center; }

/* Simple two-slide carousel for Best Performers */
#best-performers-2025 .bp-carousel,
#best-performers-2025-2 .bp-carousel { position: relative; }
#best-performers-2025 .bp-slide,
#best-performers-2025-2 .bp-slide { display: none; width: 100%; height: auto; }
#best-performers-2025 .bp-slide.active,
#best-performers-2025-2 .bp-slide.active { display: block; }
#best-performers-2025 .gallery-grid,
#best-performers-2025-2 .gallery-grid { grid-template-columns: 1fr; justify-items: center; }
#best-performers-2025 .bp-nav,
#best-performers-2025-2 .bp-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 0;
  background: rgba(15, 23, 42, 0.85); /* dark slate */
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  cursor: pointer;
}
#best-performers-2025 .bp-prev,
#best-performers-2025-2 .bp-prev { left: 8px; }
#best-performers-2025 .bp-next,
#best-performers-2025-2 .bp-next { right: 8px; }
#best-performers-2025 .bp-nav:hover,
#best-performers-2025-2 .bp-nav:hover { filter: brightness(1.1); }

#best-performers-2025 .bp-dots,
#best-performers-2025-2 .bp-dots {
  position: static;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  grid-column: 1 / -1; /* ensure it sits under the image in the grid */
}
#best-performers-2025 .bp-dot,
#best-performers-2025-2 .bp-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #94a3b8; /* slate-400 visible on light bg */
  border: 0;
  opacity: 0.8;
}
#best-performers-2025 .bp-dot.active,
#best-performers-2025-2 .bp-dot.active {
  background: var(--primary-color, #2563eb);
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.25);
}

/* Dark mode tweaks */
body.dark-mode #best-performers-2025 .bp-dot,
body.dark-mode #best-performers-2025-2 .bp-dot {
  background: rgba(255,255,255,0.5);
}
body.dark-mode #best-performers-2025 .bp-dot.active,
body.dark-mode #best-performers-2025-2 .bp-dot.active {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
}
.gallery-item.offset-down img { object-position: 50% 35%; }
.gallery-item figcaption { padding: 10px 12px; font-weight: 600; color: var(--text-primary); }

/* Video grid */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.video-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-wrapper { position: relative; width: 100%; padding-top: 56.25%; }
.video-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Actions */
.gallery-actions { margin-top: 24px; }
.btn { display: inline-flex; gap: 8px; align-items: center; padding: 12px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }

/* Floating Buttons */
.floating-buttons { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.floating-buttons a { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.whatsapp-btn { background: #25D366; }
.call-btn { background: #10b981; }

/* Footer uses main site styles from styles.css */

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    left: auto;
    width: 80%;
    height: 100vh;
    background: var(--white, #fff);
    flex-direction: column;
    padding: 80px 30px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: 0.3s;
    z-index: 999;
  }

  .nav-menu.active { right: 0; left: auto; }
  .hamburger { display: flex; z-index: 1001; }
  body.dark-mode .nav-menu { background: #0f172a; }

  .gallery-page { padding-top: 90px; }
  .gallery-title { font-size: 1.4rem; }
  .gallery-grid { grid-template-columns: 1fr; gap: 16px; }
  .gallery-item img { height: 180px; }
  /* Hide carousel chevrons on mobile for both sections */
  #best-performers-2025 .bp-nav,
  #best-performers-2025-2 .bp-nav { display: none !important; }
  /* Certificate Distribution: show full image on mobile */
  #certificate-distribution .gallery-item img { height: auto; object-fit: contain; object-position: center; }
  .video-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .gallery-page { padding-top: 80px; }
  .gallery-item img { height: 160px; }
  #certificate-distribution .gallery-item img { height: auto; object-fit: contain; object-position: center; }
}

/* Tablet: also show full image for Certificate Distribution */
@media (min-width: 769px) and (max-width: 1024px) {
  #certificate-distribution .gallery-item img { height: auto; object-fit: contain; object-position: center; }
  .video-grid { grid-template-columns: 1fr 1fr; }
}

