/* RACE Fest Custom Overrides */

/* Color scheme: Blue primary + Gold accent */
:root {
  --rf-blue: #2979FF;
  --rf-blue-dark: #1565C0;
  --rf-blue-light: #448AFF;
  --rf-gold: #E8A020;
  --rf-gold-dark: #D4941A;
  --rf-gold-light: #F5B740;
}

/* Override Bootstrap primary colors */
.bg-gradient-primary-to-secondary {
  background: linear-gradient(135deg, var(--rf-blue), var(--rf-blue-dark)) !important;
}

.text-gradient {
  background: -webkit-linear-gradient(var(--rf-blue), var(--rf-gold));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navbar */
#mainNav .navbar-brand {
  color: var(--rf-blue) !important;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}
#mainNav .navbar-brand:hover,
#mainNav .navbar-brand:active {
  color: var(--rf-blue-dark) !important;
}
#mainNav .navbar-brand img {
  height: 40px;
  vertical-align: middle;
  mix-blend-mode: multiply;
}
#mainNav .navbar-nav .nav-item .nav-link.active {
  color: var(--rf-blue) !important;
}
#mainNav .navbar-nav .nav-item .nav-link:hover {
  color: var(--rf-blue) !important;
}
#mainNav .btn-primary,
.btn-racefest {
  background: var(--rf-blue) !important;
  border-color: var(--rf-blue) !important;
  color: #fff !important;
  transition: all 0.3s ease;
}
#mainNav .btn-primary:hover,
.btn-racefest:hover {
  background: var(--rf-blue-dark) !important;
  border-color: var(--rf-blue-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 121, 255, 0.35);
}

/* SVG gradient overrides */
.features-device-mockup .circle .gradient-start-color,
.masthead .masthead-device-mockup .circle .gradient-start-color {
  stop-color: var(--rf-blue) !important;
}
.features-device-mockup .circle .gradient-end-color,
.masthead .masthead-device-mockup .circle .gradient-end-color {
  stop-color: var(--rf-gold) !important;
}
.features-device-mockup .shape-1,
.features-device-mockup .shape-2,
.masthead .masthead-device-mockup .shape-1,
.masthead .masthead-device-mockup .shape-2 {
  fill: var(--rf-blue) !important;
}

/* Masthead */
.masthead {
  background: linear-gradient(170deg, #eef3fc 0%, #f5f8ff 50%, #fdf4e3 100%);
}
.masthead h1 {
  color: #1a1a2e;
}
.masthead .lead {
  font-size: 1.15rem;
}
.masthead .badge-edition {
  display: inline-block;
  background: var(--rf-gold);
  color: #fff;
  padding: 0.35rem 1.2rem;
  border-radius: 50rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

/* Unified subtle gradient for content sections */
#features {
  background: linear-gradient(170deg, #eef3fc 0%, #f5f8ff 50%, #fdf4e3 100%);
}
#galeria {
  background: linear-gradient(170deg, #fdf4e3 0%, #f5f8ff 50%, #eef3fc 100%) !important;
}
#programa {
  background: linear-gradient(170deg, #eef3fc 0%, #f5f8ff 50%, #fdf4e3 100%);
}

/* Feature icons */
.icon-feature.text-gradient {
  background: -webkit-linear-gradient(var(--rf-blue), var(--rf-gold));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Quote / Testimonial */
aside.text-center.bg-gradient-primary-to-secondary {
  background: linear-gradient(135deg, var(--rf-blue), var(--rf-blue-dark)) !important;
}

/* CTA Section */
section.cta {
  background-image: url("https://images.unsplash.com/photo-1559128010-7c1ad6e1b6a5?w=1500&q=80") !important;
}
section.cta:before {
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.85), rgba(41, 121, 255, 0.7)) !important;
}

/* Download section */
#download {
  background: linear-gradient(135deg, var(--rf-blue), var(--rf-blue-dark)) !important;
}

/* Footer */
.site-footer {
  background: linear-gradient(170deg, #0d1f3c 0%, #0d1b2a 100%);
  padding: 3rem 0;
}
.footer-contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  transition: all 0.3s ease;
}
.footer-contact-link:hover {
  color: #fff;
  transform: translateY(-2px);
}
.footer-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}
.footer-contact-link:hover .footer-icon {
  background: var(--rf-blue);
  border-color: var(--rf-blue);
  box-shadow: 0 4px 14px rgba(41, 121, 255, 0.4);
}
.footer-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

/* Phone mockup screens - show images instead of video */
.screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Feature cards (legacy) */
.feature-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  height: 100%;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(41, 121, 255, 0.12);
}

/* Feature image cards */
.feature-img-card {
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.35s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.feature-img-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(41, 121, 255, 0.18);
}
.feature-img-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #f0f4ff;
}
.feature-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}
.feature-img-card:hover .feature-img-wrapper img {
  transform: scale(1.03);
}
.feature-img-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
}
.feature-img-body h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}
.feature-img-body p {
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 991px) {
  .feature-img-wrapper {
    height: 240px;
  }
}
@media (max-width: 575px) {
  .feature-img-wrapper {
    height: 300px;
  }
}

/* Gallery wrapper with arrows */
.gallery-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.gallery-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--rf-blue);
  background: #fff;
  color: var(--rf-blue);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 2;
}
.gallery-arrow:hover {
  background: var(--rf-blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(41, 121, 255, 0.3);
}

/* Gallery scroll area */
.app-gallery {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-width: 0;
}
.app-gallery::-webkit-scrollbar {
  height: 6px;
}
.app-gallery::-webkit-scrollbar-thumb {
  background: var(--rf-blue-light);
  border-radius: 3px;
}
.gallery-item {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}
.gallery-item:hover {
  transform: scale(1.03);
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.active {
  display: flex;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}
.lightbox-content {
  position: relative;
  z-index: 1;
  max-height: 90vh;
  max-width: 90vw;
  animation: lightbox-in 0.3s ease;
}
.lightbox-content img {
  max-height: 90vh;
  max-width: 90vw;
  border-radius: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: block;
}
@keyframes lightbox-in {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lightbox-arrow {
  position: relative;
  z-index: 2;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  margin: 0 1rem;
  flex-shrink: 0;
}
.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 575px) {
  .gallery-arrow {
    display: none;
  }
  .lightbox-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    margin: 0 0.25rem;
  }
}

/* Organization info */
.org-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(41, 121, 255, 0.08);
  border: 1px solid rgba(41, 121, 255, 0.15);
  padding: 0.4rem 1rem;
  border-radius: 50rem;
  font-size: 0.85rem;
  color: var(--rf-blue-dark);
  font-weight: 600;
}

/* Section titles */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--rf-gold);
  border-radius: 2px;
}
.section-title-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Stats section */
.stats-section {
  padding: 4rem 0;
  background: linear-gradient(170deg, #eef3fc 0%, #f5f8ff 50%, #fdf4e3 100%);
  position: relative;
}
.stat-card {
  text-align: center;
  background: #fff;
  border-radius: 1.25rem;
  padding: 2rem 1.25rem 1.5rem;
  box-shadow: 0 4px 24px rgba(41, 121, 255, 0.08);
  border: 1px solid rgba(41, 121, 255, 0.08);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(41, 121, 255, 0.15);
  border-color: rgba(41, 121, 255, 0.2);
}
.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rf-blue), var(--rf-blue-light));
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 14px rgba(41, 121, 255, 0.3);
}
.stat-card .stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--rf-blue-dark);
  line-height: 1;
  display: inline;
}
.stat-card .stat-suffix {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--rf-gold);
  display: inline;
  vertical-align: top;
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 0.8rem;
  color: #6c757d;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 0.5rem;
}
.stat-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--rf-blue), var(--rf-gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}
.stat-card:hover .stat-bar {
  transform: scaleX(1);
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-item {
    width: 180px;
  }
  .stat-card .stat-number {
    font-size: 2rem;
  }
  .stat-card .stat-suffix {
    font-size: 1.3rem;
  }
  .stat-card {
    padding: 1.5rem 1rem 1.25rem;
  }
  .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
}

/* Download section */
.download-section {
  background: linear-gradient(170deg, #e0ecff 0%, #eae3d8 50%, #f5e6c8 100%);
  padding: 3.5rem 0;
}
.download-card {
  background: #faf6f0;
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(41, 121, 255, 0.08);
  border: 1px solid rgba(210, 190, 160, 0.3);
  text-align: center;
  transition: all 0.35s ease;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.download-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(41, 121, 255, 0.15);
  border-color: rgba(41, 121, 255, 0.2);
}
.download-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 3px solid var(--rf-gold);
  font-size: 1rem;
}
.download-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-code {
  width: 160px;
  height: 160px;
  border-radius: 0.75rem;
  border: 3px solid #e8ddd0;
  transition: border-color 0.3s ease;
}
.download-card:hover .qr-code {
  border-color: var(--rf-blue-light);
}
.download-card-footer {
  padding: 0.75rem 1rem 1.25rem;
}
.download-card-footer .app-badge {
  height: 2.5rem;
  transition: transform 0.2s ease;
}
.download-card-footer .app-badge:hover {
  transform: scale(1.05);
}
@media (max-width: 575px) {
  .qr-code {
    width: 130px;
    height: 130px;
  }
}

/* Gold accent button variant */
.btn-gold {
  background: var(--rf-gold) !important;
  border-color: var(--rf-gold) !important;
  color: #fff !important;
  font-weight: 600;
}
.btn-gold:hover {
  background: var(--rf-gold-dark) !important;
  border-color: var(--rf-gold-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 160, 32, 0.35);
}
