/* ==========  HOME PAGE SPECIFIC STYLES  ========== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}

main {
  padding-top: 80px !important;
}

/* ==========  HERO SECTION  ========== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-top: 50px;
  padding-bottom: 50px;
  text-align: center;
  min-height: 500px;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 5;
  margin: 100px 0px;
  max-width: 100%;
  padding: 0 1rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: #3498db; /* Fallback for browsers without gradient support */
  background: linear-gradient(90deg, #3498db, #d85c28);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-background-clip: text;
  -moz-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent; /* Standard property (future-proofing) */
  background-size: 200% 100%;
  background-position: left;
  transition: background-position 1s ease;
  cursor: pointer;
}

/* Enhanced fallback for browsers without background-clip support */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title {
    color: #3498db;
    -webkit-text-fill-color: inherit;
    -moz-text-fill-color: inherit;
    text-fill-color: inherit;
  }
}

.hero-title:hover {
  background-position: right;
}

.hero p {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 2rem;
}

.hero-btn {
  font-size: 1.125rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(90deg, #d85c28, #f29964);
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: 0.2s;
  width: auto;
}

.hero-btn:hover {
  background: linear-gradient(90deg, #c04d20, #d88555);
  transform: translateY(-2px);
}

.hero-btn i {
  color: white;
  font-size: 1em;
}

/* ==========  CAROUSEL  ========== */
.hero-carousel-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: 2rem;
}

.hero-carousel-wrapper::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 50px;
  background: radial-gradient(ellipse at center, rgba(221, 221, 221, 0.3) 0%, rgba(0,0,0,0) 80%);
  pointer-events: none;
  z-index: 2;
}

.hero-carousel {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 60px;
  z-index: 3;
}

.hero-carousel img {
  max-width: 460px;
  max-height: 320px;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: all 0.5s ease;
  border-radius: 12px;
}

.hero-carousel img.side {
  max-width: 360px;
  opacity: 0.5;
  filter: blur(1px);
}

.hero-carousel img.center {
  opacity: 1;
  filter: blur(0);
}

.hero-carousel img.center:hover {
  transform: scale(1.08);
  filter: blur(0);
}


/* ==========  FEATURE GRID  ========== */
.feature-grid-wrapper {
  position: relative;
  margin: 3rem 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background-color: #fff;
  position: relative;
  z-index: 1;
}

.feature-card {
  padding: 2rem;
  border: 1px solid #eee;
  text-align: left;
  transition: all 0.3s ease;
}

.feature-card .icon {
  font-size: 2.5rem;
  color: #555;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.feature-card h3 {
  font-size: 1.4rem;
  margin: 0.75rem 0;
  color: #333;
  transition: color 0.3s ease;
}

.feature-card p {
  color: #555;
  line-height: 1.6;
}

.feature-card:hover {
  border-color: #F26631;
}

.feature-card:hover .icon {
  color: #F26631;
  transform: rotate(360deg);
  transition: transform 0.6s ease;
}

.feature-card:hover h3 {
  color: #3498db;
}

/* Make cards tappable on mobile with active/focus states */
.feature-card:active,
.feature-card:focus-within {
  border-color: #F26631;
}

.feature-card:active .icon,
.feature-card:focus-within .icon {
  color: #F26631;
  transform: rotate(360deg);
}

.feature-card:active h3,
.feature-card:focus-within h3 {
  color: #3498db;
}

/* Decorative corners */
.corner {
  position: absolute;
  width: 30px;
  height: 30px;
  z-index: 2;
}

.corner::before,
.corner::after {
  content: "";
  position: absolute;
  background-color: #eee;
}

.corner::before {
  width: 2px;
  height: 100%;
  left: 0;
  top: 0;
}

.corner::after {
  width: 100%;
  height: 2px;
  left: 0;
  top: 0;
}

.top-left {
  top: -29px;
  left: -29px;
  transform: scaleX(-1) scaleY(-1);
}

.top-right {
  top: -29px;
  right: -29px;
  transform: scaleY(-1);
}

.bottom-left {
  bottom: -29px;
  left: -29px;
  transform: scaleX(-1);
}

.bottom-right {
  bottom: -29px;
  right: -29px;
}

/* ==========  RESPONSIVE  ========== */
@media (max-width: 768px) {
  .hero-carousel img.side {
    display: none;
  }
  
  .hero-carousel {
    gap: 0;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .corner {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-carousel img,
  .feature-card .icon {
    transition: none;
  }
  
  .hero-carousel img {
    animation: none;
  }
}
