/* Creative Section Layouts & Transitions */

/* Zigzag Layout */
.zigzag-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.zigzag-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 80vh;
  position: relative;
  overflow: hidden;
}

.zigzag-section:nth-child(even) .zigzag-content {
  order: 2;
}

.zigzag-section:nth-child(even) .zigzag-visual {
  order: 1;
}

.zigzag-content {
  padding: 4rem 2rem;
  background: var(--panel);
  position: relative;
  z-index: 2;
}

.zigzag-visual {
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 400px;
}

.zigzag-visual::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, var(--brand-500), var(--accent));
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.1;
  animation: pulse 4s ease-in-out infinite;
}

/* Diagonal Cuts */
.zigzag-section::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  height: 100px;
  background: inherit;
  transform: skewY(-2deg);
  z-index: 1;
}

.zigzag-section:nth-child(even)::after {
  transform: skewY(2deg);
}

/* Parallax Scrolling Sections */
.parallax-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parallax-bg {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, 
    rgba(99, 102, 241, 0.1) 0%, 
    rgba(8, 145, 178, 0.1) 50%, 
    rgba(99, 102, 241, 0.1) 100%);
  animation: rotate 20s linear infinite;
}

.parallax-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .parallax-content {
  background: rgba(31, 41, 55, 0.9);
}

/* Card Stack Layout */
.card-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  perspective: 1000px;
  padding: 4rem 0;
}

.stack-card {
  background: var(--panel);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform-style: preserve-3d;
  transition: all 0.3s ease;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.stack-card:nth-child(1) {
  transform: rotateY(-5deg) translateZ(0px);
}

.stack-card:nth-child(2) {
  transform: rotateY(0deg) translateZ(20px);
}

.stack-card:nth-child(3) {
  transform: rotateY(5deg) translateZ(0px);
}

.stack-card:hover {
  transform: rotateY(0deg) translateZ(50px) scale(1.05);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.2);
}

/* Curved Section Dividers */
.curved-divider {
  position: relative;
  overflow: hidden;
}

.curved-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--bg);
  border-radius: 0 0 50% 50%;
  transform: scaleX(1.2);
}

.curved-divider.alt::before {
  border-radius: 50% 50% 0 0;
  bottom: 0;
  top: auto;
}

/* Spiral Layout */
.spiral-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spiral-section {
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 2px solid var(--brand-500);
  animation: spiralRotate 20s linear infinite;
}

.spiral-section:nth-child(2) {
  width: 60%;
  height: 60%;
  animation-direction: reverse;
  animation-duration: 15s;
}

.spiral-section:nth-child(3) {
  width: 40%;
  height: 40%;
  animation-duration: 10s;
}

/* Hexagonal Grid */
.hex-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 4rem 0;
}

.hex-item {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  background: var(--panel);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 2px solid var(--brand-500);
}

.hex-item:hover {
  transform: scale(1.1) rotate(30deg);
  background: var(--brand-500);
  color: white;
}

/* Floating Islands Layout */
.floating-islands {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.island {
  position: absolute;
  background: var(--panel);
  border-radius: 30px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  animation: float 6s ease-in-out infinite;
}

.island:nth-child(1) {
  top: 10%;
  left: 10%;
  width: 300px;
  animation-delay: 0s;
}

.island:nth-child(2) {
  top: 30%;
  right: 15%;
  width: 250px;
  animation-delay: 2s;
}

.island:nth-child(3) {
  bottom: 20%;
  left: 20%;
  width: 280px;
  animation-delay: 4s;
}

/* Animations */
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.2; }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spiralRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Enhanced Testimonies Section */
.testimonies-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.03) 0%, 
    rgba(8, 145, 178, 0.05) 50%, 
    rgba(99, 102, 241, 0.03) 100%);
  position: relative;
  overflow: hidden;
}

.testimonies-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.testimonies-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -15%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.testimonies-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.testimonies-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin: 0 0 1.5rem 0;
  background: linear-gradient(135deg, var(--brand-500), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.testimonies-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 400;
}

.testimonies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.testimony-card {
  background: var(--panel);
  border-radius: 24px;
  padding: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.testimony-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-500), var(--accent), var(--brand-500));
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

.testimony-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 60px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.2);
}

.testimony-content {
  padding: 2.5rem;
  position: relative;
}

.quote-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--brand-500), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  position: relative;
}

.quote-icon::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--brand-500), var(--accent));
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.testimony-card:hover .quote-icon::before {
  opacity: 0.3;
}

.testimony-quote {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 2rem 0;
  font-style: italic;
  font-weight: 400;
  position: relative;
}

.testimony-quote::before {
  content: '"';
  font-size: 4rem;
  color: var(--brand-500);
  position: absolute;
  top: -10px;
  left: -10px;
  opacity: 0.3;
  font-family: serif;
  line-height: 1;
}

.testimony-quote::after {
  content: '"';
  font-size: 4rem;
  color: var(--brand-500);
  position: absolute;
  bottom: -20px;
  right: -5px;
  opacity: 0.3;
  font-family: serif;
  line-height: 1;
}

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

.author-photo {
  position: relative;
}

.author-photo img {
  border: 3px solid var(--brand-500);
  transition: all 0.3s ease;
}

.testimony-card:hover .author-photo img {
  border-color: var(--accent);
  transform: scale(1.05);
}

.author-info h4 {
  margin: 0 0 0.3rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.author-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--brand-500);
  font-weight: 600;
}

/* Dark theme adjustments */
[data-theme="dark"] .testimonies-section {
  background: linear-gradient(135deg, 
    rgba(129, 140, 248, 0.05) 0%, 
    rgba(34, 211, 238, 0.08) 50%, 
    rgba(129, 140, 248, 0.05) 100%);
}

[data-theme="dark"] .testimony-card {
  border: 1px solid rgba(129, 140, 248, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .testimony-card:hover {
  box-shadow: 0 25px 60px rgba(129, 140, 248, 0.2);
  border-color: rgba(129, 140, 248, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
  .testimonies-section {
    padding: 4rem 0;
  }
  
  .testimonies-header {
    margin-bottom: 3rem;
  }
  
  .testimonies-header h2 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  
  .testimonies-subtitle {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .testimonies-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .testimony-content {
    padding: 2rem;
  }
  
  .testimony-quote {
    font-size: 1rem;
  }
  
  .testimony-quote::before,
  .testimony-quote::after {
    font-size: 3rem;
  }
  
  .testimony-author {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
  }
}

@media (max-width: 480px) {
  .testimonies-grid {
    padding: 0 0.5rem;
  }
  
  .testimony-content {
    padding: 1.5rem;
  }
  
  .testimony-quote {
    font-size: 0.95rem;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .zigzag-section {
    grid-template-columns: 1fr;
  }
  
  .zigzag-section:nth-child(even) .zigzag-content,
  .zigzag-section:nth-child(even) .zigzag-visual {
    order: unset;
  }
  
  .hex-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stack-card {
    transform: none;
  }
  
  .stack-card:hover {
    transform: translateY(-10px) scale(1.02);
  }
  
  .island {
    position: relative;
    width: 90% !important;
    margin: 2rem auto;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
  }
}
