/* =============================================
   FEATURES PAGE - UNIFIED WITH HOME DESIGN
   Red theme with glassmorphism - Matching home.css
   ============================================= */

/* Base styling */
body {
  background: #0D0D0D;
  overflow-x: hidden;
}

/* ========================================
   SCROLL PROGRESS BAR
======================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #dd023c, #ff1744);
  z-index: 1000;
  transition: width 0.1s ease;
}

/* ========================================
   FLOATING PARTICLES
======================================== */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(221, 2, 60, 0.6);
  border-radius: 50%;
  animation: float 20s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

/* ========================================
   HERO SECTION - MATCHING HOME.CSS
======================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: url('../../../static/media/panel-list.webp') no-repeat center center;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to top, #0D0D0D, rgba(0, 0, 0, 0));
  z-index: 2;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  width: 100%;
  align-items: center;
  z-index: 3;
  position: relative;
}

.hero-text {
  animation: slideUp 0.6s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(221, 2, 60, 0.15);
  border: 1px solid rgba(221, 2, 60, 0.4);
  border-radius: 50px;
  color: #dd023c;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: white;
  line-height: 1.2;
}

.hero-text .highlight {
  color: #dd023c;
  display: block;
}

.hero-text p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 24px;
  background: #dd023c;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(221, 2, 60, 0.3);
}

.cta-button:hover {
  background: #b00230;
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(221, 2, 60, 0.5);
}

.hero-image {
  position: relative;
  animation: slideLeft 0.6s ease-out 0.4s both;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.hero-image:hover img {
  transform: translateY(-8px);
  border-color: rgba(221, 2, 60, 0.3);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========================================
   FEATURES CONTAINER
======================================== */
.features-container {
  padding: 6rem 0;
  background: #0D0D0D;
}

/* ========================================
   FEATURE SECTIONS - MATCHING HOME CARD STYLE
======================================== */
.feature-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 5rem 5%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s ease;
  position: relative;
}

/* Only apply animation states when page has loaded */
body.loaded .feature-section {
  opacity: 0;
  transform: translateY(50px);
}

body.loaded .feature-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Alternating layout */
.feature-section:nth-child(even) {
  direction: rtl;
}

.feature-section:nth-child(even) > * {
  direction: ltr;
}

/* ========================================
   FEATURE CONTENT - MATCHING HOME CARDS
======================================== */
.feature-content {
  padding: 1rem;
  position: relative;
  z-index: 2;
}

.feature-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: #ffffff;
  line-height: 1.2;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease 0.1s;
}

body.loaded .feature-title {
  opacity: 0;
  transform: translateY(-20px);
}

body.loaded .feature-section.visible .feature-title {
  opacity: 1;
  transform: translateY(0);
}

.feature-list {
  list-style: none;
  padding: 0;
}

/* Feature items styled like home.css feature-card */
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  opacity: 1;
  transform: translateX(0);
}

body.loaded .feature-item {
  opacity: 0;
  transform: translateX(-30px);
}

body.loaded .feature-section.visible .feature-item {
  opacity: 1;
  transform: translateX(0);
}

body.loaded .feature-section.visible .feature-item:nth-child(1) {
  transition-delay: 0.1s;
}

body.loaded .feature-section.visible .feature-item:nth-child(2) {
  transition-delay: 0.2s;
}

body.loaded .feature-section.visible .feature-item:nth-child(3) {
  transition-delay: 0.3s;
}

body.loaded .feature-section.visible .feature-item:nth-child(4) {
  transition-delay: 0.4s;
}

.feature-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(221, 2, 60, 0.5);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Feature icon matching home.css */
.feature-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(221, 2, 60, 0.2), rgba(176, 2, 48, 0.2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #dd023c;
  box-shadow: 0 0 20px rgba(221, 2, 60, 0.3);
  transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(221, 2, 60, 0.5);
}

.feature-text h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #ffffff;
}

.feature-text p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ========================================
   FEATURE IMAGES - FIXED SIZING
======================================== */
.feature-image {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  z-index: 2;
  opacity: 1;
  transform: translateX(0);
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.03);
}

body.loaded .feature-image {
  opacity: 0;
  transform: translateX(30px);
}

body.loaded .feature-section.visible .feature-image {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.8s ease 0.3s;
}

.feature-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.feature-image:hover {
  transform: translateY(-8px);
  border-color: rgba(221, 2, 60, 0.3);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.feature-image:hover img {
  transform: scale(1.02);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1200px) {
  .feature-section {
    gap: 3rem;
    padding: 4rem 5%;
    grid-template-columns: 1.1fr 1fr;
  }

  .feature-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  }
}

@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    padding: 3rem 5%;
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-badge {
    justify-content: center;
  }

  .hero-text p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .feature-section {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 4rem 5%;
  }

  .feature-section:nth-child(even) {
    direction: ltr;
  }

  .feature-content {
    text-align: center;
  }

  .feature-item {
    flex-direction: column;
    text-align: left;
    opacity: 1;
    transform: translateX(0);
  }

  .feature-section.visible .feature-item {
    opacity: 1;
    transform: translateX(0);
  }

  .feature-item:hover {
    transform: translateY(-5px);
  }

  .feature-title,
  .feature-image {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

@media (max-width: 768px) {
  /* Hero adjustments */
  .hero {
    padding: 100px 20px 2rem;
  }

  .hero-text h1 {
    font-size: 1.75rem;
  }

  .hero-text p {
    font-size: 0.9rem;
  }

  .hero-image {
    display: none;
  }

  /* Feature sections */
  .feature-section {
    padding: 2.5rem 5%;
  }

  .feature-title {
    font-size: 1.5rem;
  }

  .feature-item {
    padding: 1rem 1.25rem;
  }

  .feature-text h3 {
    font-size: 0.95rem;
  }

  .feature-text p {
    font-size: 0.85rem;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 90px 1rem 2rem;
  }

  .feature-section {
    padding: 2rem 1rem;
  }

  .feature-title {
    font-size: 1.35rem;
  }

  .feature-content {
    padding: 0.5rem;
  }

  .feature-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }

  .feature-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 80px 1rem 1.5rem;
    min-height: unset;
  }

  .hero-text h1 {
    font-size: 1.5rem;
  }

  .feature-section {
    padding: 1.5rem 1rem;
  }

  .feature-title {
    font-size: 1.25rem;
  }

  .cta-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

  .feature-item {
    padding: 0.875rem;
  }

  .feature-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .feature-text h3 {
    font-size: 0.9rem;
  }

  .feature-text p {
    font-size: 0.8rem;
  }
}

/* Landscape orientation fixes */
@media (max-width: 1024px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding-top: 80px;
  }

  .hero-content {
    grid-template-columns: 1fr 1fr;
  }
}

/* Better touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
  .cta-button {
    min-height: 44px;
    min-width: 44px;
  }

  .feature-item,
  .feature-image {
    cursor: default;
  }

  .feature-item:hover {
    transform: none;
  }

  .feature-image:hover {
    transform: none;
  }

  .feature-image:hover img {
    transform: none;
  }
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.5s ease;
}
