/* Bootstrap Custom Theme for Sports Loop */

:root {
  /* Override Bootstrap colors with Sports Loop brand colors */
  --bs-primary: #1B365D;
  --bs-primary-rgb: 27, 54, 93;
  --bs-secondary: #00E5BE;
  --bs-secondary-rgb: 0, 229, 190;
  --bs-dark: #134074;
  --bs-dark-rgb: 19, 64, 116;
  
  /* Additional brand colors */
  --bs-info: #00E5BE;
  --bs-success: #28A745;
  --bs-warning: #FFC107;
  --bs-danger: #DC3545;
  
  /* Font */
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Primary button override */
.btn-primary {
  background-color: #1B365D;
  border-color: #1B365D;
}

.btn-primary:hover {
  background-color: #134074;
  border-color: #134074;
}

/* Secondary button override */
.btn-secondary {
  background-color: #00E5BE;
  border-color: #00E5BE;
  color: #1B365D;
}

.btn-secondary:hover {
  background-color: #00CCB0;
  border-color: #00CCB0;
  color: #1B365D;
}

/* Navbar customization */
.navbar {
  padding-top: 1rem;
  padding-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.navbar-brand img {
  height: 32px;
}

/* Mobile navbar adjustments */
@media (max-width: 768px) {
  .navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

/* Hero section with Bootstrap */
.hero {
  background: linear-gradient(135deg, #1B365D 0%, #134074 100%);
  color: white;
  padding: 80px 0 60px;
  min-height: auto;
}

.hero .row {
  align-items: center;
  min-height: 580px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Footer with Bootstrap */
.footer {
  background-color: #1B365D;
  color: white;
  padding: 60px 0 20px;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer a:hover {
  color: white;
  text-decoration: none;
}

.footer h4 {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Card components */
.card {
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Forms */
.form-control:focus {
  border-color: #00E5BE;
  box-shadow: 0 0 0 0.2rem rgba(0, 229, 190, 0.25);
}

/* Social links */
.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-right: 10px;
  transition: background-color 0.3s ease;
}

.social-links a:hover {
  background-color: #00E5BE;
}

/* Section spacing */
section {
  padding: 80px 0;
}

/* Custom utilities */
.text-primary {
  color: #1B365D !important;
}

.text-secondary {
  color: #00E5BE !important;
}

.bg-primary {
  background-color: #1B365D !important;
}

.bg-secondary {
  background-color: #00E5BE !important;
}

/* Hero carousel app images */
#heroCarousel .carousel-item img {
  width: 350px;
  height: 625px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* Communities showcase image sizing */
.img-fluid {
  max-width: 800px;
  max-height: 600px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* Communities section general styling */
#communities .col-lg-6:last-child {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#communities .img-fluid {
  width: 100%;
  max-width: 500px;
  height: auto;
}

/* Hero Carousel Pagination */
#heroCarousel .carousel-indicators {
  bottom: -40px;
  margin-bottom: 0;
}

#heroCarousel .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background-color: transparent;
  margin: 0 6px;
  transition: all 0.3s ease;
}

#heroCarousel .carousel-indicators button.active {
  background-color: white;
  border-color: white;
  transform: scale(1.2);
}

/* Hero Carousel Controls */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
  width: 40px;
  height: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  opacity: 0.7;
  transition: all 0.3s ease;
}

#heroCarousel .carousel-control-prev {
  left: -50px;
}

#heroCarousel .carousel-control-next {
  right: -50px;
}

#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
  width: 20px;
  height: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 80px 0 30px; /* Increased top padding for mobile navbar */
    margin-top: 0;
  }
  
  .hero .row {
    min-height: auto;
    flex-direction: column;
  }
  
  .hero .col-lg-6:first-child {
    order: 1;
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
    width: 100%;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .hero .col-lg-6:last-child {
    order: 2;
    margin-bottom: 20px;
    width: 100%;
  }
  
  .hero h1 {
    font-size: 1.75rem;
    line-height: 1.2;
    color: white !important;
    font-weight: 700;
    margin-bottom: 1rem;
  }
  
  .hero p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.4;
  }
  
  .hero .d-flex.gap-3 {
    flex-direction: column;
    align-items: center;
    gap: 12px !important;
  }
  
  .hero .btn {
    width: 200px;
    padding: 12px 20px;
  }
  
  section {
    padding: 50px 0;
  }
  
  /* Optimized app images for mobile */
  #heroCarousel {
    max-width: 280px;
    margin: 0 auto 20px;
  }
  
  #heroCarousel .carousel-item img {
    width: 200px;
    height: 356px;
    max-width: 100%;
  }
  
  /* Mobile carousel indicators - larger and more visible */
  #heroCarousel .carousel-indicators {
    bottom: -50px;
    margin-bottom: 0;
  }
  
  #heroCarousel .carousel-indicators button {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.6);
    background-color: transparent;
    margin: 0 8px;
    transition: all 0.3s ease;
  }
  
  #heroCarousel .carousel-indicators button.active {
    background-color: white;
    border-color: white;
    transform: scale(1.3);
  }
  
  /* Show carousel controls on mobile with better positioning */
  #heroCarousel .carousel-control-prev,
  #heroCarousel .carousel-control-next {
    width: 35px;
    height: 35px;
    top: 45%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    opacity: 0.8;
  }
  
  #heroCarousel .carousel-control-prev {
    left: -15px;
  }
  
  #heroCarousel .carousel-control-next {
    right: -15px;
  }
  
  #heroCarousel .carousel-control-prev-icon,
  #heroCarousel .carousel-control-next-icon {
    width: 16px;
    height: 16px;
  }
  
  /* Add slide counter for mobile */
  #heroCarousel::after {
    content: attr(data-slide-counter);
    position: absolute;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
  }
  
  /* Mobile-optimized app store badges */
  .hero .d-flex.gap-3:last-child {
    flex-direction: row;
    justify-content: center;
    gap: 10px !important;
  }
  
  .hero .d-flex.gap-3:last-child img {
    height: 40px;
    max-width: 140px;
  }
  
  /* Communities section mobile adjustments */
  #communities .col-lg-6 {
    text-align: center;
    margin-bottom: 30px;
  }
  
  #communities .col-lg-6:last-child {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  #communities .img-fluid {
    max-width: 100%;
    height: auto;
    width: auto;
    max-height: 400px;
  }
  
  /* Button styling for mobile */
  .btn-lg {
    width: auto;
    min-width: 160px;
    padding: 12px 24px;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .hero p {
    font-size: 0.9rem;
  }
  
  #heroCarousel .carousel-item img {
    width: 160px;
    height: 285px;
  }
  
  .hero .btn {
    width: 180px;
    font-size: 0.9rem;
  }
}