/* CSS Variables */
:root {
  --gunmetal: #0f878b;
  --silver: #bfc0c0ff;
  --white: #ffffffff;
  --coral: #0f878b;
  --paynes-gray: #4f5d75ff;
  --navbar-light-icon-color: #ffffffff;

  --bs-primary: var(--gunmetal);
  --bs-secondary: var(--coral);
}

/* Base */
body {
  font-family: system-ui, -apple-system, sans-serif;
  color: #333;
}

/* Banner */
.banner-container {
  overflow: hidden;
  line-height: 0;
}

/* Navbar */
nav.navbar {
  background-color: var(--gunmetal) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 1rem;
  z-index: 1030;
}

nav.navbar .navbar-brand,
nav.navbar .nav-link {
  color: var(--white) !important;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

nav.navbar .nav-link:hover {
  opacity: 0.85;
  background: none !important;
  transform: none;
}

nav.navbar .nav-link.active {
  font-weight: 700;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.navbar-toggler-icon {
  filter: invert(1);
}

/* Sections */
.section-hero {
  background: var(--white);
  padding-top: 2rem;
}

.section-upload {
  background: #f8f9fa;
  border-top: 3px solid var(--gunmetal);
}

.section-news {
  background: var(--white);
}

.section-gallery {
  background: #f8f9fa;
  border-top: 3px solid var(--gunmetal);
}

.section-sponsors {
  background: var(--white);
}

/* Hero */
.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gunmetal);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--paynes-gray);
  font-weight: 400;
}

.feature-img {
  max-width: 280px;
}

/* Buttons */
.btn-primary {
  background-color: var(--gunmetal) !important;
  border-color: var(--gunmetal) !important;
  color: var(--white) !important;
}

.btn-primary:hover {
  background-color: #0a6a6d !important;
  border-color: #0a6a6d !important;
}

.btn-outline-primary {
  color: var(--gunmetal) !important;
  border-color: var(--gunmetal) !important;
  background: transparent !important;
}

.btn-outline-primary:hover {
  background-color: var(--gunmetal) !important;
  color: var(--white) !important;
}

.btn-outline-danger {
  color: #dc3545 !important;
  border-color: #dc3545 !important;
}

.btn-outline-danger:hover {
  background-color: #dc3545 !important;
  color: var(--white) !important;
}

/* Accordion */
.accordion-button {
  background-color: var(--gunmetal) !important;
  color: var(--white) !important;
  font-weight: 500;
}

.accordion-button::after {
  filter: invert(1);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(15, 135, 139, 0.25);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 8px;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

/* Sponsors carousel */
.sponsor-carousel-wrapper {
  height: 200px;
}

.sponsor-carousel-wrapper .carousel,
.sponsor-carousel-wrapper .carousel-inner,
.sponsor-carousel-wrapper .carousel-item {
  height: 100%;
}

/* Footer */
.site-footer {
  background-color: var(--gunmetal);
  color: var(--white);
}

.site-footer h5 {
  color: var(--white);
  margin-bottom: 1rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--white) !important;
  background: none !important;
  transform: none;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.social-links a {
  font-size: 1.5rem;
  margin-right: 0.75rem;
}

.social-links a:hover {
  opacity: 0.8;
}

.site-footer hr {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Card (upload form) */
.card {
  border: none;
  border-radius: 12px;
}

/* PhotoSwipe caption */
.pswp__custom-caption {
  background: var(--gunmetal);
  font-size: 16px;
  color: #fff;
  width: calc(100% - 32px);
  max-width: 400px;
  padding: 2px 8px;
  border-radius: 4px;
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
}

.pswp__custom-caption a {
  color: #fff;
  text-decoration: underline;
}

/* Links - only style content links, not nav/footer */
main a:not(.btn):not(.gallery-item):not(.nav-link) {
  color: var(--gunmetal) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

main a:not(.btn):not(.gallery-item):not(.nav-link):hover {
  color: #0a6a6d !important;
  text-decoration: underline;
  background: none !important;
  transform: none;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }

  .feature-img {
    max-width: 200px;
  }
}
