/* Platform Feature Widget Styles */

/* Elementor Editor Preview Support */
.elementor-editor-preview .unlockafe-platform-feature,
.elementor-editor-active .unlockafe-platform-feature,
.unlockafe-platform-feature {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  overflow: hidden;
}

.elementor-editor-preview .unlockafe-platform-feature .content-wrapper,
.elementor-editor-active .unlockafe-platform-feature .content-wrapper,
.unlockafe-platform-feature .content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* Heading Styles */
.elementor-editor-preview .unlockafe-heading,
.elementor-editor-active .unlockafe-heading,
.unlockafe-heading {
  color: #0f172a;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px 0;
  text-align: center;
}

/* Description Styles */
.elementor-editor-preview .unlockafe-description,
.elementor-editor-active .unlockafe-description,
.unlockafe-description {
  color: #64748b;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  margin: 0 0 48px 0;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards Grid - Base */
.elementor-editor-preview .unlockafe-cards-grid,
.elementor-editor-active .unlockafe-cards-grid,
.unlockafe-cards-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 48px;
}

.elementor-editor-preview .unlockafe-card-row,
.elementor-editor-active .unlockafe-card-row,
.unlockafe-card-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}

/* Square Layout (Cross Shape) */
.unlockafe-cards-grid.unlockafe-square-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.unlockafe-cards-grid.unlockafe-square-layout .unlockafe-top-row,
.unlockafe-cards-grid.unlockafe-square-layout .unlockafe-bottom-row {
  display: flex;
  justify-content: center;
}

.unlockafe-cards-grid.unlockafe-square-layout .unlockafe-middle-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 400px;
}

@media (min-width: 640px) {
  .unlockafe-cards-grid.unlockafe-square-layout .unlockafe-middle-row {
    max-width: 800px;
  }
}

@media (min-width: 1024px) {
  .unlockafe-cards-grid.unlockafe-square-layout .unlockafe-middle-row {
    max-width: 1200px;
  }
}

/* Grid Layout */
.unlockafe-cards-grid.unlockafe-grid-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .unlockafe-cards-grid.unlockafe-grid-layout {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .unlockafe-cards-grid.unlockafe-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Pyramid Layout */
.unlockafe-cards-grid.unlockafe-pyramid-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.unlockafe-cards-grid.unlockafe-pyramid-layout .unlockafe-pyramid-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Flip Card Container */
.elementor-editor-preview .unlockafe-flip-card-container,
.elementor-editor-active .unlockafe-flip-card-container,
.unlockafe-flip-card-container {
  width: 100%;
  max-width: 280px;
  height: 280px;
  perspective: 1000px;
  flex-shrink: 0;
}

/* Flip Card */
.elementor-editor-preview .unlockafe-flip-card,
.elementor-editor-active .unlockafe-flip-card,
.unlockafe-flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  cursor: pointer;
}

.elementor-editor-preview .unlockafe-flip-card-container:hover .unlockafe-flip-card,
.elementor-editor-active .unlockafe-flip-card-container:hover .unlockafe-flip-card,
.unlockafe-flip-card-container:hover .unlockafe-flip-card {
  transform: rotateY(180deg);
}

.unlockafe-flip-card-front,
.unlockafe-flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Front Face */
.unlockafe-flip-card-front {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid #cbd5e1;
}

.unlockafe-flip-card-front .unlockafe-icon-wrapper {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8b1538, #6b0f2b);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(139, 21, 56, 0.3);
  flex-shrink: 0;
}

.unlockafe-flip-card-front .unlockafe-icon-wrapper i,
.unlockafe-flip-card-front .unlockafe-icon-wrapper svg {
  width: 24px;
  height: 24px;
  color: #ffffff !important;
  fill: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unlockafe-flip-card-front .unlockafe-icon-wrapper svg {
  fill: #ffffff !important;
  stroke: #ffffff !important;
  color: #ffffff !important;
}

.unlockafe-flip-card-front .unlockafe-icon-wrapper svg path {
  stroke: #ffffff !important;
  fill: none !important;
}

.unlockafe-flip-card-front .unlockafe-icon-wrapper svg path[fill] {
  fill: #ffffff !important;
}

.unlockafe-flip-card-front .unlockafe-icon-wrapper img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Make images white */
}

.unlockafe-flip-card-front h3 {
  color: #0f172a;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

/* Glow Effect on Front Hover */
.unlockafe-flip-card-front .unlockafe-glow-effect {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 21, 56, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.unlockafe-flip-card-container:hover .unlockafe-flip-card-front .unlockafe-glow-effect {
  opacity: 1;
}

/* Back Face */
.unlockafe-flip-card-back {
  background: linear-gradient(135deg, #8b1538, #6b0f2b);
  transform: rotateY(180deg);
  color: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(139, 21, 56, 0.5);
}

.unlockafe-flip-card-back .unlockafe-back-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #ffffff;
}

.unlockafe-flip-card-back .unlockafe-back-icon-wrapper i,
.unlockafe-flip-card-back .unlockafe-back-icon-wrapper svg {
  width: 20px;
  height: 20px;
  color: inherit;
}

.unlockafe-flip-card-back .unlockafe-back-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.unlockafe-flip-card-back h3 {
  color: #ffffff !important;
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Ensure white color on hover/flip - Higher specificity for Elementor preview */
.unlockafe-flip-card-container:hover .unlockafe-flip-card-back h3,
.unlockafe-flip-card.flipped .unlockafe-flip-card-back h3,
.unlockafe-flip-card-container:hover .unlockafe-flip-card .unlockafe-flip-card-back h3 {
  color: #ffffff !important;
}

/* Override any inline styles from Elementor */
.elementor-editor-active .unlockafe-flip-card-back h3,
.elementor-editor-active .unlockafe-flip-card-container:hover .unlockafe-flip-card-back h3 {
  color: #ffffff !important;
}

.unlockafe-flip-card-back p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Accent Glow on Back */
.unlockafe-accent-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  filter: blur(40px);
  border-radius: 9999px;
  pointer-events: none;
}

/* Background Effects */
.unlockafe-background-effects {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.unlockafe-orb {
  position: absolute;
  width: 384px;
  height: 384px;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.3;
}

.unlockafe-orb-1 {
  top: 25%;
  left: 25%;
  background-color: rgba(139, 21, 56, 0.1);
  animation: orb1-anim var(--orb1-duration, 8s) infinite ease-in-out;
}

.unlockafe-orb-2 {
  bottom: 25%;
  right: 25%;
  background-color: rgba(147, 51, 234, 0.1);
  animation: orb2-anim var(--orb2-duration, 10s) infinite ease-in-out;
}

.unlockafe-wave-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

.unlockafe-wave-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
}

.unlockafe-wave-1 {
  animation: draw-line var(--wave-duration, 2s) ease-in-out forwards;
}

.unlockafe-wave-2 {
  animation: draw-line var(--wave-duration, 2s) ease-in-out 0.2s forwards;
}

.unlockafe-wave-3 {
  animation: draw-line var(--wave-duration, 2s) ease-in-out 0.4s forwards;
}

.unlockafe-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: linear-gradient(rgba(139, 21, 56, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 21, 56, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Particles */
.unlockafe-particle {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #8b1538;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  opacity: 0;
}

.unlockafe-p1 {
  left: 10%;
  top: 20%;
  animation: particle-anim var(--particle1-duration, 3s) infinite ease-in-out 0s;
}

.unlockafe-p2 {
  left: 80%;
  top: 15%;
  animation: particle-anim var(--particle2-duration, 4s) infinite ease-in-out 1s;
}

.unlockafe-p3 {
  left: 60%;
  top: 80%;
  animation: particle-anim var(--particle3-duration, 3.5s) infinite ease-in-out 2s;
}

.unlockafe-p4 {
  left: 20%;
  top: 70%;
  animation: particle-anim var(--particle4-duration, 4.5s) infinite ease-in-out 0.5s;
}

.unlockafe-p5 {
  left: 90%;
  top: 60%;
  animation: particle-anim var(--particle5-duration, 3.8s) infinite ease-in-out 1.5s;
}

/* Animations */
@keyframes orb1-anim {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.5;
  }
}

@keyframes orb2-anim {
  0%,
  100% {
    transform: scale(1.2);
    opacity: 0.2;
  }
  50% {
    transform: scale(1);
    opacity: 0.4;
  }
}

@keyframes particle-anim {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scale(0) rotate(360deg);
    opacity: 0;
  }
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

/* Mobile Touch Support */
@media (max-width: 768px) {
  .unlockafe-flip-card.flipped {
    transform: rotateY(180deg);
  }
}

/* CTA Section - Buttons */
.unlockafe-cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}

@media (min-width: 640px) {
  .unlockafe-cta-section {
    flex-direction: row;
  }
}

.unlockafe-btn-primary {
  position: relative;
  padding: 16px 32px;
  background: linear-gradient(90deg, #8b1538, #6b0f2b);
  color: #ffffff;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.unlockafe-btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(139, 21, 56, 0.25),
    0 8px 10px -6px rgba(139, 21, 56, 0.25);
  text-decoration: none;
  color: #ffffff;
}

.unlockafe-btn-primary .unlockafe-btn-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.unlockafe-btn-primary .unlockafe-btn-icon {
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.unlockafe-btn-primary:hover .unlockafe-btn-icon {
  transform: translateX(4px);
}

.unlockafe-btn-primary .unlockafe-btn-icon i,
.unlockafe-btn-primary .unlockafe-btn-icon svg {
  width: 20px;
  height: 20px;
}

.unlockafe-btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #a01845,
    #8b1538
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.unlockafe-btn-primary:hover .unlockafe-btn-glow {
  opacity: 1;
}

.unlockafe-btn-secondary {
  padding: 16px 32px;
  background-color: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.unlockafe-btn-secondary:hover {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
  transform: scale(1.05);
  text-decoration: none;
  color: #0f172a;
}

/* Responsive */
@media (max-width: 768px) {
  .unlockafe-platform-feature {
    padding: 40px 16px;
  }

  .unlockafe-flip-card-container {
    max-width: 100%;
    height: auto;
    min-height: 200px;
  }

  .unlockafe-flip-card-front,
  .unlockafe-flip-card-back {
    padding: 24px;
  }

  .unlockafe-flip-card-front h3,
  .unlockafe-flip-card-back h3 {
    font-size: 18px;
  }

  .unlockafe-cta-section {
    flex-direction: column;
    width: 100%;
  }

  .unlockafe-btn-primary,
  .unlockafe-btn-secondary {
    width: 100%;
    max-width: 100%;
  }
}

