/* ================================
   FEATURES SECTION STYLES
   Custom Phone Frame Implementation
   ================================ */

/* CSS Custom Properties for Easy Customization */
:root {
  /* Phone Frame Dimensions */
  --phone-width: 290px;
  --phone-height: 620px;

  /* Screen Area Positioning (adjust these for your custom frame) */
  --screen-top: 67px;
  --screen-left: 26px;
  --screen-right: 23px;
  --screen-bottom: 90px;
  --screen-radius: 45px;

  /* Colors */
  --primary-color: #8731e8;
  --text-dark: #333;
  --text-light: #666;
  --bg-light: #f8f9fa;
  --shadow-light: rgba(0, 0, 0, 0.1);

  /* Mobile Breakpoints */
  --mobile-phone-width: 245px;
  --mobile-phone-height: 480px;
  --mobile-screen-top: 52px;
  --mobile-screen-left: 0px;
  --mobile-screen-right: 18px;
  --mobile-screen-bottom: 90px;
  --mobile-screen-radius: 12px;

  --small-phone-width: 220px;
  --small-phone-height: 430px;
  --small-screen-top: 52px;
  --small-screen-left: 21px;
  --small-screen-right: 18px;
  --small-screen-bottom: 90px;
  --small-screen-radius: 22px;
}

/* ================================
   MAIN FEATURES SECTION
   ================================ */

.features-section {
  overflow: hidden;
  padding: 80px 0;
  position: relative;
}

.features-section.primary-bg {
  background-color: var(--bg-light);
}

/* Section Introduction */
.features-section .intro {
  margin-bottom: 60px;
}

.features-section .intro .title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.features-section .intro p {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ================================
   PHONE FRAME SLIDER WRAPPER
   ================================ */

.features-slider-wrapper {
  position: relative;
  width: var(--phone-width);
  height: var(--phone-height);
  margin: 0 auto;
  /* Replace with your custom Android frame image */
  background: url("../img/content/phone-frame.png") no-repeat center
    center/contain;
  background-size: contain;
  filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.4));
  transition:
    width 0.3s ease,
    height 0.3s ease;
}

/* Alternative: If you want to use a separate phone frame element */
.features-slider-wrapper .phone-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../img/content/phone-frame.png") no-repeat center
    center/contain;
  z-index: 2;
  pointer-events: none;
}

/* ================================
   FEATURES SLIDER
   ================================ */

.features-slider-wrapper .features-slider {
  position: absolute;
  /* Fixed screen area - adjust these to fit your phone frame */
  top: 45px;
  left: 50%;
  transform: translateX(-50%);
  width: 270px; /* Fixed width for screen area */
  height: 525px; /* Fixed height for screen area */
  padding: 0;
  margin: 0;
  list-style: none;
  overflow: hidden;
  border-radius: var(--screen-radius);
  z-index: 1; /* LOW z-index to be behind the frame */
  transition:
    width 0.3s ease,
    height 0.3s ease,
    top 0.3s ease,
    border-radius 0.3s ease;
}

/* Remove inner shadow since frame is now on top */
/*
.features-slider-wrapper .features-slider::before {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
}
*/

/* ================================
   SLIDE ITEMS
   ================================ */

.features-slider-wrapper .slide-item {
  margin: 0;
  width: 100%;
  height: 100%;
  position: relative;
}

.features-slider-wrapper .slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--screen-radius);
  transition: transform 0.3s ease;
}

/* Hover effect for screenshots */
.features-slider-wrapper .slide-item img:hover {
  transform: scale(1.02);
}

/* ================================
   FEATURES LIST
   ================================ */

.features-item.list-group {
  padding: 0;
}

.features-item.list-group .list-group-item {
  margin: 0;
  margin-bottom: 30px;
  padding: 25px;
  background: white;
  border: none !important;
  border-radius: 15px;
  box-shadow: 0 5px 20px var(--shadow-light);
  transition: all 0.3s ease;
}

.features-item.list-group .list-group-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ================================
   IMAGE BOX (FEATURE ICONS)
   ================================ */

.features-section .item .layout-2 {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.features-section .item .avatar-sm {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 12px;
  padding: 12px;
  background: transparent;
  filter: none;
}

.features-section .item .content {
  flex: 1;
}

.features-section .item .content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  margin-top: 0;
}

.features-section .item .content p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

/* ================================
   OWL CAROUSEL CUSTOMIZATION
   ================================ */

.features-slider.owl-carousel .owl-nav {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.features-slider.owl-carousel .owl-nav button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.features-slider.owl-carousel .owl-nav button:hover {
  background: #6b21a8;
  transform: scale(1.1);
}

.features-slider.owl-carousel .owl-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 15; /* Higher than phone frame to be visible */
}

.features-slider.owl-carousel .owl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.features-slider.owl-carousel .owl-dot.active,
.features-slider.owl-carousel .owl-dot:hover {
  background: white;
  transform: scale(1.2);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

/* Large Tablet */
@media (max-width: 991px) and (min-width: 768px) {
  .features-slider-wrapper {
    width: 270px !important;
    height: 580px !important;
  }
  .features-slider-wrapper .features-slider {
    top: 42px !important;
    width: 250px !important;
    height: 490px !important;
    border-radius: 40px !important;
  }
}

/* Medium Tablet */
@media (max-width: 767px) and (min-width: 650px) {
  .features-slider-wrapper {
    width: 250px !important;
    height: 520px !important;
  }
  .features-slider-wrapper .features-slider {
    top: 32px !important;
    width: 234px !important;
    height: 450px !important;
    border-radius: 34px !important;
  }
}

/* Small Tablet/Large Phone */
@media (max-width: 649px) and (min-width: 576px) {
  .features-slider-wrapper {
    width: 235px !important;
    height: 480px !important;
  }
  .features-slider-wrapper .features-slider {
    top: 22px !important;
    width: 220px !important;
    height: 428px !important;
    border-radius: 30px !important;
  }
}

/* Small Mobile Styles */
@media (max-width: 575px) {
  .features-section {
    padding: 40px 0;
  }

  .features-slider-wrapper {
    width: var(--small-phone-width);
    height: var(--small-phone-height);
  }

  .features-slider-wrapper .features-slider {
    top: 15px; /* Adjusted for small mobile */
    left: 50%;
    transform: translateX(-50%);
    width: 200px; /* Even smaller for tiny screens */
    height: 395px;
    border-radius: var(--small-screen-radius);
  }

  .features-slider-wrapper .slide-item img {
    border-radius: var(--small-screen-radius);
  }

  .features-section .intro .title {
    font-size: 1.8rem;
  }

  .features-item.list-group .list-group-item {
    padding: 15px;
  }

  .features-section .image-box {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .features-section .image-box .avatar-sm {
    width: 45px;
    height: 45px;
    margin: 0 auto;
  }
}

/* ================================
   ANIMATION UTILITIES
   ================================ */

/* Fade in animation for features */
.features-item.list-group .list-group-item {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.features-item.list-group .list-group-item:nth-child(1) {
  animation-delay: 0.1s;
}
.features-item.list-group .list-group-item:nth-child(2) {
  animation-delay: 0.2s;
}
.features-item.list-group .list-group-item:nth-child(3) {
  animation-delay: 0.3s;
}
.features-item.list-group .list-group-item:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Phone frame entrance animation */
.features-slider-wrapper {
  opacity: 0;
  transform: scale(0.8);
  animation: phoneEntrance 0.8s ease forwards;
  animation-delay: 0.2s;
}

@keyframes phoneEntrance {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ================================
   ACCESSIBILITY
   ================================ */

/* Focus styles for interactive elements */
.features-slider.owl-carousel .owl-nav button:focus,
.features-slider.owl-carousel .owl-dot:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .features-item.list-group .list-group-item,
  .features-slider-wrapper {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .features-slider-wrapper .slide-item img:hover {
    transform: none;
  }

  .features-item.list-group .list-group-item:hover {
    transform: none;
  }
}

/* ================================
   PRINT STYLES
   ================================ */

@media print {
  .features-section {
    padding: 20px 0;
  }

  .features-slider-wrapper {
    display: none;
  }

  .features-item.list-group .list-group-item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
