/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* Ensure scroll-triggered elements are hidden initially */
.animate-on-scroll {
  opacity: 0;
}

/* Initially hide the hero-subtitle */
.hero-subtitle {
  opacity: 0;
}

/* Animate.css overrides */
/* Slow down bounceInLeft animation for screenshots */
.animate__bounceInLeft {
  animation-duration: 1.5s !important;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
}

.navbar .logo {
  font-size: 1.5em;
  font-weight: 700;
  color: #E30B17; /* FC Barcelona red */
}

.navbar .nav-links {
  list-style: none;
  display: flex;
}

.navbar .nav-links li {
  margin-left: 20px;
}

.navbar .nav-links a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
  color: #E30B17;
}

/* Hero Section */
header {
  height: 100vh;
  background: linear-gradient(135deg, #004D98, #0057B8);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 80px; /* Offset for fixed navbar */
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 40px;
}

/* CTA Button */
.cta-btn {
  background-color: #E30B17;
  color: #fff;
  padding: 15px 30px;
  border: none;
  border-radius: 30px;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-btn:hover {
  transform: scale(1.05);
  background-color: #c10f14;
}

/* Scroll Arrow: custom fade in & slow bounce */
/* Both animations now start after 0.8s, and slowBounce lasts 1.5s */
.scroll-arrow {
  color: #fff;
  margin-top: 60px;
  cursor: pointer;
  opacity: 0;
  animation: fadeIn 1s 0.8s forwards, slowBounce 1.5s ease-in-out 0.8s infinite;
}

/* Keyframes for fadeIn */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Keyframes for slowBounce */
@keyframes slowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Sections */
section {
  padding: 80px 20px;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
  color: #333;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Feature Card */
.feature-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* Screenshots Section */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  align-items: center;
  justify-items: center;
}

/* Image Wrapper with modern hover enlargement */
.image-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 10px;
  transition: box-shadow 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Scale the image on hover */
.image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.image-wrapper:hover img {
  transform: scale(1.1);
}

.image-wrapper:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Tooltip styling */
.tooltip {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10;
  white-space: nowrap;
}

.image-wrapper:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Contact Section: Add margin to push down the GitHub button */
#contact p {
  margin-bottom: 20px;
}

#contact .cta-btn {
  margin-top: 20px;
}

/* Footer */
footer {
  background-color: #333;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .navbar .nav-links {
    display: none;
  }
}
