/* ========================================
   MODERN UI ENHANCEMENTS FOR KUWONA DIGITAL
   ======================================== */

/* 1. SUBTLE CONTACT FORM ENHANCEMENTS */
.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(74, 144, 226, 0.5);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Subtle Submit Button Enhancement */
.submit-btn {
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 2. PARTNER LOGOS - CLEAN WITHOUT BORDERS */
.logo-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-grid a:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

.logo-grid img {
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
  transition: all 0.3s ease;
}

/* 3. SERVICE CARD ENHANCEMENTS - REMOVED TO PREVENT CONFLICTS */
/* All service card animations removed to maintain original functionality */

/* 4. TESTIMONIALS SECTION */
.testimonials-section {
  padding: 4rem 2rem 6rem;
  background: rgba(242, 251, 251, 0.02);
  border-top: 1px solid rgba(242, 251, 251, 0.1);
  border-bottom: 1px solid rgba(242, 251, 251, 0.1);
  margin-top: 2rem;
}

.testimonials-section h1 {
  text-align: center;
  margin-bottom: 1rem;
}

.testimonials-section h2 {
  text-align: center;
  margin: 0 auto 4rem;
  width: 65%;
  font-family: "Sora", sans-serif;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonial-card {
  background: rgba(242, 251, 251, 0.05);
  border: 1px solid rgba(242, 251, 251, 0.1);
  border-radius: 20px;
  padding: 2.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 120px;
  color: rgba(74, 144, 226, 0.1);
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  border-color: rgba(74, 144, 226, 0.3);
  background: rgba(242, 251, 251, 0.08);
  box-shadow: 0 10px 40px rgba(74, 144, 226, 0.15);
}

.testimonial-quote {
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(242, 251, 251, 0.9);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  font-family: "Sora", sans-serif;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-author-info h4 {
  margin: 0;
  font-size: 1.1rem;
  color: #F2FBFB;
  font-weight: 500;
}

.testimonial-author-info p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: rgba(242, 251, 251, 0.6);
  font-family: "Space Grotesk", sans-serif;
}

/* 5. CASE STUDIES SECTION - MINIMAL WITH EXPAND */
.case-studies-section {
  padding: 6rem 2rem;
}

.case-studies-section h1 {
  text-align: center;
  margin-bottom: 1rem;
}

.case-studies-section h2 {
  text-align: center;
  margin: 0 auto 4rem;
  width: 65%;
  font-family: "Sora", sans-serif;
}

.case-studies-list {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.case-study-item {
  border-bottom: 1px solid rgba(242, 251, 251, 0.1);
  transition: all 0.3s ease;
}

.case-study-item:last-child {
  border-bottom: none;
}

/* Summary View - Always Visible */
.case-study-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 1.5rem;
  transition: all 0.3s ease, transform 0.1s ease;
  position: relative;
}

.case-study-summary:hover,
.case-study-summary:active,
.case-study-summary.touch-active {
  background: rgba(242, 251, 251, 0.02);
}

/* Mobile touch feedback */
.case-study-summary.touch-active {
  transform: scale(0.98);
}

.case-study-actions {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.expand-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  font-size: 1.5rem;
  color: rgba(242, 251, 251, 0.4);
  font-weight: 300;
  line-height: 1;
  width: auto;
  height: auto;
}

.expand-toggle:hover,
.expand-toggle:active,
.expand-toggle.touch-active {
  color: rgba(74, 144, 226, 0.6);
  transform: scale(1.1);
}

.expand-icon::before {
  content: '+';
}

.case-study-item.expanded .expand-toggle .expand-icon::before {
  content: '−';
}

.expand-icon {
  /* display: block; */
  font-size: 2rem;
  display: none;
}

.case-study-basic-info {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  flex: 1;
  cursor: pointer;
}

.case-study-basic-info:hover h3,
.case-study-basic-info:active h3,
.case-study-summary.touch-active .case-study-basic-info h3 {
  /* color: #4A90E2; */
  color: #2d677b;
}

.case-study-basic-info h3 {
  font-size: 1.6rem;
  margin: 0 0 0.5rem 0;
  color: #F2FBFB;
  font-family: "Space Grotesk", sans-serif;
  transition: color 0.3s ease;
  text-transform: lowercase;
  font-weight: 400;
}

.case-study-tagline {
  font-size: 0.95rem;
  color: rgba(242, 251, 251, 0.5);
  margin: 0;
  font-family: "Sora", sans-serif;
  font-style: normal;
  text-transform: lowercase;
}

.case-study-category {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  /* background: rgba(74, 144, 226, 0.15); */
  border-radius: 10px;
  font-size: 0.85rem;
  font-family: "lores-12", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  white-space: nowrap;
  color: #48a5c5;
  background: #2d677b2b;

}

/* Details View - Hidden by Default */
.case-study-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 1.5rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-study-item.expanded .case-study-details {
  max-height: 2000px;
  opacity: 1;
  padding: 0 1.5rem 3rem;
}

.case-study-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(242, 251, 251, 0.8);
  margin-bottom: 2rem;
  font-family: "Sora", sans-serif;
  max-width: 900px;
}

.case-study-stats {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(242, 251, 251, 0.1);
}

.stat {
  flex: 0;
}

.stat-value {
  font-size: 2rem;
  font-weight: 500;
  color: #4A90E2;
  display: block;
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(242, 251, 251, 0.6);
  text-transform: lowercase;
  font-family: "Space Grotesk", sans-serif;
}

/* Stacked Images Container */
.stacked-images-container {
  position: relative;
  width: 100%;
  height: 500px;
  margin: 2rem 0;
  perspective: 1500px;
}

.stacked-image {
  position: absolute;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(242, 251, 251, 0.1);
  cursor: pointer;
}

.stacked-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.stacked-image:hover {
  transform: translateY(-15px) scale(1.02) !important;
  z-index: 50 !important;
  box-shadow: 0 20px 60px rgba(74, 144, 226, 0.4);
}

.stacked-image:hover img {
  transform: scale(1.05);
}

/* Positioning for different stacked layouts */
/* Two-image layout */
.case-study-item:nth-child(1) .stacked-image-1 {
  width: 55%;
  height: 70%;
  top: 0;
  left: 0;
  transform: rotate(-2deg);
  z-index: 2;
}

.case-study-item:nth-child(1) .stacked-image-2 {
  width: 55%;
  height: 70%;
  bottom: 0;
  right: 0;
  transform: rotate(2deg);
  z-index: 1;
}

/* Three-image layout - Option 1 */
.case-study-item:nth-child(2) .stacked-image-1 {
  width: 50%;
  height: 65%;
  top: 0;
  left: 5%;
  transform: rotate(-3deg);
  z-index: 3;
}

.case-study-item:nth-child(2) .stacked-image-2 {
  width: 45%;
  height: 60%;
  top: 15%;
  right: 8%;
  transform: rotate(4deg);
  z-index: 2;
}

.case-study-item:nth-child(2) .stacked-image-3 {
  width: 48%;
  height: 58%;
  bottom: 0;
  left: 25%;
  transform: rotate(-1deg);
  z-index: 1;
}

/* Three-image layout - Option 2 */
.case-study-item:nth-child(3) .stacked-image-1 {
  width: 52%;
  height: 68%;
  top: 5%;
  right: 0;
  transform: rotate(2deg);
  z-index: 1;
}

.case-study-item:nth-child(3) .stacked-image-2 {
  width: 48%;
  height: 63%;
  top: 10%;
  left: 0;
  transform: rotate(-3deg);
  z-index: 3;
}

.case-study-item:nth-child(3) .stacked-image-3 {
  width: 45%;
  height: 55%;
  bottom: 0;
  right: 10%;
  transform: rotate(1deg);
  z-index: 2;
}

.case-study-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #4A90E2;
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  margin-top: 2rem;
  transition: all 0.3s ease;
}

.case-study-link:hover,
.case-study-link:active,
.case-study-link.touch-active {
  gap: 1rem;
  color: rgba(74, 144, 226, 0.8);
}

/* 6. HERO SECTION ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.section-hero .content {
  animation: fadeInUp 0.8s ease-out;
}

.hero-text h1 {
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-text h2 {
  animation: fadeInUp 1s ease-out 0.4s both;
}

#digital-logo {
  animation: fadeInLeft 0.8s ease-out;
}

/* Scroll-triggered animations */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modal enhancement */
.modal-content {
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .stacked-images-container {
    height: 400px;
  }

  .stacked-image {
    max-width: 60% !important;
  }
}

@media (max-width: 768px) {
  .logo-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-section h2,
  .case-studies-section h2 {
    width: 90%;
  }

  .case-study-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1rem;
  }

  .case-study-actions {
    width: 100%;
  }

  .case-study-basic-info {
    flex: 1;
  }

  .case-study-basic-info h3 {
    font-size: 1.5rem;
  }

  .case-study-category {
    align-self: flex-start;
  }

  .case-study-item.expanded .case-study-details {
    padding: 0 1rem 2rem;
  }

  .case-study-stats {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .stacked-images-container {
    height: 350px;
  }

  /* Simplify stacking on tablets */
  .case-study-item .stacked-image-1,
  .case-study-item .stacked-image-2,
  .case-study-item .stacked-image-3 {
    width: 70% !important;
    height: 65% !important;
  }

  .case-study-item .stacked-image-1 {
    top: 0 !important;
    left: 0 !important;
  }

  .case-study-item .stacked-image-2 {
    top: 10% !important;
    right: 0 !important;
    left: auto !important;
  }

  .case-study-item .stacked-image-3 {
    bottom: 0 !important;
    left: 15% !important;
    right: auto !important;
  }
}

@media (max-width: 480px) {
  .logo-grid {
    gap: 0.75rem;
    padding: 0.5rem;
  }

  .logo-grid a {
    padding: 0.5rem;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  .case-study-summary {
    padding: 1.5rem 0.75rem;
  }

  .expand-toggle {
    font-size: 1.8rem;
  }

  .case-study-basic-info h3 {
    font-size: 1.3rem;
  }

  .case-study-tagline {
    font-size: 0.9rem;
  }

  .case-study-category {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
  }

  .case-study-item.expanded .case-study-details {
    padding: 0 0.75rem 2rem;
  }

  .case-study-description {
    font-size: 1rem;
  }

  .case-study-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .stacked-images-container {
    height: 300px;
  }

  /* Stack images more simply on mobile */
  .case-study-item .stacked-image-1,
  .case-study-item .stacked-image-2,
  .case-study-item .stacked-image-3 {
    width: 85% !important;
    height: 60% !important;
    transform: rotate(0deg) !important;
  }

  .case-study-item .stacked-image-1 {
    top: 0 !important;
    left: 0 !important;
    z-index: 3 !important;
  }

  .case-study-item .stacked-image-2 {
    top: 8% !important;
    left: 10% !important;
    z-index: 2 !important;
  }

  .case-study-item .stacked-image-3 {
    top: 16% !important;
    left: 15% !important;
    z-index: 1 !important;
  }
}
