/* Experience Section Styles - Fixed Layout */
.experience-section {
  background: linear-gradient(135deg, #F4A261 0%, #E76F51 100%);
  padding: 100px 0 80px; /* Increased top padding to prevent clipping */
  position: relative;
  overflow: visible; /* Changed from hidden to prevent clipping */
  margin-top: 20px; /* Added margin to create space from previous section */
  z-index: 1; /* Ensure proper stacking context */
}

.experience-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative; /* Added for proper positioning context */
}

/* Section Header - Fixed Positioning */
.experience-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  position: relative; /* Added for proper positioning */
  z-index: 2; /* Ensure header is above other elements */
}

.experience-section .section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-white, #ffffff);
  line-height: 1.2;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: block; /* Ensure block display */
  width: 100%; /* Full width */
  visibility: visible; /* Explicitly set visibility */
  opacity: 1; /* Ensure full opacity */
}

.experience-section .section-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 0;
  font-weight: 400;
  display: block; /* Ensure block display */
  width: 100%; /* Full width */
  visibility: visible; /* Explicitly set visibility */
  opacity: 1; /* Ensure full opacity */
}

.experience-section .section-subtitle strong {
  font-weight: 700;
  color: var(--color-white, #ffffff);
}

/* Features Grid - Fixed Layout */
.experience-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
  position: relative; /* Added for proper positioning */
  z-index: 2; /* Ensure features are above background */
}

/* Individual Feature Cards - Fixed Layout */
.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 20px; /* Added padding for better spacing */
  background-color: transparent; /* Ensure transparent background */
  border-radius: 8px; /* Rounded corners */
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

/* Feature Mockup Container - Fixed Sizing */
.feature-mockup {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin-bottom: 30px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.feature-mockup-inner {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible; /* Ensure no clipping */
}

.feature-mockup img {
  width: 100%;
  height: auto;
  max-width: 200px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block; /* Ensure block display */
  visibility: visible; /* Explicitly set visibility */
  opacity: 1; /* Ensure full opacity */
}

.feature-card:hover .feature-mockup img {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Feature Content - Fixed Layout */
.feature-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%; /* Full width */
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white, #ffffff);
  margin-bottom: 16px;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  width: 100%; /* Full width */
  display: block; /* Ensure block display */
}

.feature-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0;
  max-width: 280px;
  width: 100%; /* Full width */
  display: block; /* Ensure block display */
}

/* Responsive Design - Fixed Layout */
@media (max-width: 1024px) {
  .experience-section {
    padding: 80px 0 60px; /* Adjusted padding */
  }
  
  .experience-header {
    margin-bottom: 50px;
  }
  
  .experience-section .section-title {
    font-size: 2.25rem;
  }
  
  .experience-features {
    gap: 30px;
    max-width: 900px;
  }
  
  .feature-mockup {
    max-width: 240px;
    margin-bottom: 25px;
  }
  
  .feature-mockup img {
    max-width: 180px;
  }
  
  .feature-title {
    font-size: 1.125rem;
  }
  
  .feature-description {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .experience-section {
    padding: 70px 0 50px; /* Adjusted padding */
  }
  
  .experience-section .container {
    padding: 0 16px;
  }
  
  .experience-header {
    margin-bottom: 40px;
  }
  
  .experience-section .section-title {
    font-size: 2rem;
  }
  
  .experience-section .section-subtitle {
    font-size: 1rem;
  }
  
  .experience-features {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 400px;
  }
  
  .feature-mockup {
    max-width: 220px;
    margin-bottom: 20px;
  }
  
  .feature-mockup img {
    max-width: 160px;
  }
  
  .feature-title {
    font-size: 1.125rem;
    margin-bottom: 12px;
  }
  
  .feature-description {
    font-size: 0.9rem;
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .experience-section {
    padding: 60px 0 40px; /* Adjusted padding */
  }
  
  .experience-section .container {
    padding: 0 12px;
  }
  
  .experience-header {
    margin-bottom: 30px;
  }
  
  .experience-section .section-title {
    font-size: 1.75rem;
  }
  
  .experience-section .section-subtitle {
    font-size: 0.95rem;
  }
  
  .experience-features {
    gap: 30px;
  }
  
  .feature-mockup {
    max-width: 200px;
    margin-bottom: 16px;
  }
  
  .feature-mockup img {
    max-width: 140px;
  }
  
  .feature-title {
    font-size: 1rem;
    margin-bottom: 10px;
  }
  
  .feature-description {
    font-size: 0.875rem;
    max-width: 280px;
  }
}

/* Loading State - Fixed Visibility */
.experience-features.loading {
  opacity: 0.7;
}

.feature-card.loading {
  opacity: 0.5;
}

.feature-card.loading .feature-mockup img {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.1) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Accessibility - Fixed Focus */
.feature-card:focus-within {
  outline: 2px solid var(--color-white, #ffffff);
  outline-offset: 4px;
  border-radius: 8px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .experience-section .section-title,
  .feature-title {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  }
  
  .experience-section .section-subtitle,
  .feature-description {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .feature-mockup img {
    transition: none;
  }
  
  .feature-card:hover .feature-mockup img {
    transform: none;
  }
  
  .feature-card.loading .feature-mockup img {
    animation: none;
  }
}

/* Print styles */
@media print {
  .experience-section {
    background: none !important;
    color: black !important;
  }
  
  .experience-features {
    display: block;
  }
  
  .feature-card {
    display: block;
    margin-bottom: 30px;
    page-break-inside: avoid;
  }
  
  .experience-section .section-title,
  .feature-title {
    color: black !important;
    text-shadow: none;
  }
  
  .experience-section .section-subtitle,
  .feature-description {
    color: #333 !important;
    text-shadow: none;
  }
}

/* Fix for potential clipping issues */
.experience-section::before {
  content: '';
  display: block;
  height: 1px;
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  background: transparent;
  z-index: -1;
}

/* Ensure section is visible */
.experience-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.phone-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.feature-column {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
}

.phone-mockup {
  width: 100%;
  height: 500px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.phone-mockup .phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.korners-mockup .phone-screen {
  background-image: url('../images/ip1.png');
}

.loops-mockup .phone-screen {
  background-image: url('../images/ip2.png');
}

.nooks-mockup .phone-screen {
  background-image: url('../images/ip3.png');
}

@media (max-width: 992px) {
  .phone-features {
    gap: 50px;
  }
  
  .feature-column {
    flex: 0 0 calc(50% - 25px);
  }
}

@media (max-width: 768px) {
  .feature-column {
    flex: 0 0 100%;
    margin-bottom: 40px;
  }
  
  .phone-mockup {
    height: 450px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
}