/* ACF Flexible Components Styles */

/* Color fallbacks - ensure colors work even if WordPress presets fail */
:root {
  --color-primary-50: #f7f7f3;
  --color-primary-100: #e9e9dc;
  --color-primary-200: #d1d1b6;
  --color-primary-300: #b9b790;
  --color-primary-400: #a9a576;
  --color-primary-500: #9c9264;
  --color-primary-600: #887b57;
  --color-primary-700: #73644a;
  --color-primary-800: #605240;
  --color-primary-900: #504537;
  --color-primary-950: #2c251c;
  
  --color-secondary-50: #fff9ec;
  --color-secondary-100: #fff1d3;
  --color-secondary-200: #ffdea5;
  --color-secondary-300: #ffc66d;
  --color-secondary-400: #ffa132;
  --color-secondary-500: #ff850a;
  --color-secondary-600: #ef6500;
  --color-secondary-700: #cc4d02;
  --color-secondary-800: #a13c0b;
  --color-secondary-900: #82330c;
  --color-secondary-950: #461704;
}

/* Test primary-50 visibility with border for debugging */
.test-primary-50 {
  background-color: var(--color-primary-50, #f7f7f3) !important;
  border: 2px solid var(--color-primary-800, #605240) !important;
  min-height: 50px !important;
}

.test-primary-50::before {
  content: "Primary-50 Test: " var(--color-primary-50, #f7f7f3);
  color: var(--color-primary-800, #605240);
  font-weight: bold;
}

/* Hero Component */
.component--hero {
    font-family: 'DM Sans', sans-serif;
    background: var(--color-primary-100, #e9e9dc);
    min-height: 800px;
}

.component--hero .rotating-words {
    transition: transform 1000ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.component--hero .hero-cta-button {
    background: linear-gradient(180deg, rgb(253 186 116) 0%, rgb(249 115 22) 100%);
    transition: all 300ms ease;
    backdrop-filter: blur(8px);
}

.component--hero .hero-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

.component--hero .hero-cta-button:active {
    transform: translateY(0);
}

.component--hero .hero-cta-button svg {
    transition: transform 300ms ease;
}

.component--hero .hero-cta-button:hover svg {
    transform: translateX(4px);
}

.component--hero .hero-image-1,
.component--hero .hero-image-2 {
    transition: transform 300ms ease, opacity 300ms ease;
    will-change: transform;
}

.component--hero .hero-image-1:hover,
.component--hero .hero-image-2:hover {
    transform: scale(1.02);
}

/* Hero decorative pattern animation */
.component--hero .pattern-dot {
    animation: pulse 4s infinite;
    animation-delay: calc(var(--dot-index) * 0.1s);
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Responsive hero adjustments */
@media (max-width: 1024px) {
    .component--hero {
        min-height: 700px;
    }
}

@media (max-width: 768px) {
    .component--hero {
        min-height: 600px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .component--hero .hero-content-box {
        max-width: 100%;
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .component--hero .hero-image-1,
    .component--hero .hero-image-2 {
        display: none; /* Hide decorative images on mobile */
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .component--hero .rotating-words {
        transition: none;
    }
    
    .component--hero .hero-image-1,
    .component--hero .hero-image-2 {
        transform: none !important;
        transition: none;
    }
    
    .component--hero .hero-cta-button {
        transition: none;
    }
    
    .component--hero .pattern-dot {
        animation: none;
    }
}

/* Print styles for hero */
@media print {
    .component--hero {
        background: white !important;
        color: black !important;
        min-height: auto;
    }
    
    .component--hero .hero-image-1,
    .component--hero .hero-image-2 {
        display: none;
    }
    
    .component--hero::before,
    .component--hero::after {
        display: none;
    }
}

/* Base component styles */
.component {
    position: relative;
}

/* Beliefs Component */
.component--beliefs .belief-item {
    transition: transform 0.2s ease-in-out;
}

.component--beliefs .belief-item:hover {
    transform: translateY(-2px);
}

/* Pros & Cons Component */
.component--pros_cons .comparison-card {
    position: relative;
    overflow: hidden;
}

.component--pros_cons .comparison-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.5) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.component--pros_cons .comparison-card:hover::before {
    transform: translateX(100%);
}

/* Hero About Component */
.component--hero_about img {
    transition: transform 0.3s ease;
}

.component--hero_about:hover img {
    transform: scale(1.02);
}

/* Methods Component */
.component--methods .step-card {
    position: relative;
    transition: all 0.3s ease;
}

.component--methods .step-card:hover {
    transform: translateY(-4px);
}

/* Connection line animation */
.component--methods .connection-line {
    position: relative;
    overflow: hidden;
}

.component--methods .connection-line::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #3B82F6 50%, transparent 100%);
    transform: translateY(-50%);
    animation: connectionFlow 3s ease-in-out infinite;
}

@keyframes connectionFlow {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* FAQ Component */
.component--faq .faq-trigger {
    transition: background-color 0.2s ease;
}

.component--faq .faq-trigger:hover {
    background-color: rgba(249, 250, 251, 1);
}

.component--faq .faq-icon {
    transition: transform 0.2s ease;
}

.component--faq .faq-trigger[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.component--faq .faq-content {
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Testimonials Component */
.component--testimonials .testimonial-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.component--testimonials .testimonials-grid .testimonial-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.component--testimonials .testimonial-carousel .testimonial-slide {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.component--testimonials .testimonial-dot {
    transition: background-color 0.2s ease, transform 0.1s ease;
    cursor: pointer;
}

.component--testimonials .testimonial-dot:hover {
    transform: scale(1.1);
}

/* CTA Banner Component */
.component--cta-banner {
    overflow: hidden;
}

.component--cta-banner .container > div {
    animation: fadeInUp 0.8s ease-out;
}

.component--cta-banner a {
    transition: all 0.3s ease;
}

.component--cta-banner a:hover {
    transform: translateY(-2px);
}

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

/* Features Grid Component */
.component--features-grid .feature-item {
    transition: all 0.3s ease;
}

.component--features-grid .features-grid .feature-item:hover {
    transform: translateY(-4px);
}

.component--features-grid .feature-item .w-12 {
    transition: transform 0.2s ease;
}

.component--features-grid .feature-item:hover .w-12 {
    transform: scale(1.1);
}

/* Statistics Component */
.component--statistics .stat-item {
    animation: fadeInUp 0.6s ease-out;
}

.component--statistics .stat-item:nth-child(1) { animation-delay: 0.1s; }
.component--statistics .stat-item:nth-child(2) { animation-delay: 0.2s; }
.component--statistics .stat-item:nth-child(3) { animation-delay: 0.3s; }
.component--statistics .stat-item:nth-child(4) { animation-delay: 0.4s; }

.component--statistics .stat-number {
    transition: transform 0.2s ease;
}

.component--statistics .stat-item:hover .stat-number {
    transform: scale(1.05);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .component {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* FAQ responsive adjustments */
    .component--faq .faq-trigger h3 {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    /* Testimonials mobile carousel */
    .component--testimonials .testimonials-grid {
        display: block;
    }
    
    .component--testimonials .testimonials-grid .testimonial-item {
        margin-bottom: 1.5rem;
    }
    
    /* CTA Banner mobile adjustments */
    .component--cta-banner h2 {
        font-size: 1.875rem;
        line-height: 1.2;
    }
    
    .component--cta-banner .flex {
        flex-direction: column;
    }
    
    /* Features grid mobile stacking */
    .component--features-grid .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Statistics mobile layout */
    .component--statistics .stats-grid {
        flex-direction: column;
    }
    
    .component--statistics .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    /* Extra small screen adjustments */
    .component--cta-banner h2 {
        font-size: 1.5rem;
    }
    
    .component--statistics .stat-number {
        font-size: 2rem;
    }
}

/* Print styles */
@media print {
    .component {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    /* Hide interactive elements in print */
    .component--faq .faq-trigger svg,
    .component--testimonials .testimonial-dot,
    .component--testimonials .testimonial-prev,
    .component--testimonials .testimonial-next {
        display: none;
    }
    
    /* Show all FAQ content in print */
    .component--faq .faq-content {
        display: block !important;
    }
    
    /* Ensure good contrast in print */
    .component--cta-banner {
        color: black !important;
        background: white !important;
    }
    
    .component--cta-banner * {
        color: black !important;
    }
}

/* Accessibility enhancements */
.component--faq .faq-trigger:focus,
.component--testimonials .testimonial-dot:focus,
.component--testimonials .testimonial-prev:focus,
.component--testimonials .testimonial-next:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .component--faq .faq-icon,
    .component--testimonials .testimonial-item,
    .component--cta-banner a,
    .component--features-grid .feature-item,
    .component--statistics .stat-number {
        transition: none;
    }
    
    .component--cta-banner .container > div,
    .component--statistics .stat-item {
        animation: none;
    }
    
    .component--methods .connection-line::after {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .component--faq .faq-item {
        border-width: 2px;
        border-color: currentColor;
    }
    
    .component--testimonials .testimonial-item,
    .component--features-grid .feature-item {
        border-width: 2px;
        border-color: currentColor;
    }
}
