/**
 * UK FAQ Block Styles
 * Flip Card Effect for FAQ Items
 */

/* Block Container */
.uk-faq-block {
    padding: 60px 0;
    width: 100%;
}

.uk-faq-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Full Width Support */
.uk-faq-block.alignfull .uk-faq-container {
    max-width: 100%;
    padding: 0 40px;
}

/* Header Section */
.uk-faq-header {
    text-align: center;
    margin-bottom: 50px;
}

.uk-faq-title {
    font-size: 48px;
    font-weight: 900;
    text-transform: uppercase;
    color: #1B365D;
    margin-bottom: 15px;
    line-height: 1.2;
}

.uk-faq-description {
    font-size: 18px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* FAQ Grid Layout */
.uk-faq-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Column Variations */
.faq-columns-2 .uk-faq-grid {
    grid-template-columns: repeat(2, 1fr);
}

.faq-columns-3 .uk-faq-grid {
    grid-template-columns: repeat(3, 1fr);
}

.faq-columns-4 .uk-faq-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* FAQ Card - Flip Container */
.uk-faq-card {
    perspective: 1000px;
    height: 350px;
    cursor: pointer;
    position: relative;
}

.uk-faq-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* Flipped State */
.uk-faq-card.is-flipped .uk-faq-card-inner {
    transform: rotateY(180deg);
}

/* Front and Back Faces */
.uk-faq-card-front,
.uk-faq-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
    border: 10px solid #0033A0;
    clip-path: polygon(
    /* top-left corner - 2 steps */
    0 15px, 5px 15px, 5px 5px, 15px 5px, 15px 0,
    /* top-right corner - 2 steps */
    calc(100% - 15px) 0, calc(100% - 15px) 5px, calc(100% - 5px) 5px, calc(100% - 5px) 15px, 100% 15px,
    /* bottom-right corner - 2 steps */
    100% calc(100% - 15px), calc(100% - 5px) calc(100% - 15px), calc(100% - 5px) calc(100% - 5px), calc(100% - 15px) calc(100% - 5px), calc(100% - 15px) 100%,
    /* bottom-left corner - 2 steps */
    15px 100%, 15px calc(100% - 5px), 5px calc(100% - 5px), 5px calc(100% - 15px), 0 calc(100% - 15px)
  );
}

/* Add inner border effect with clip-path */
.uk-faq-card-front::before,
.uk-faq-card-back::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border: 1px solid #FFF07A;
    clip-path: polygon(
    /* top-left corner - 2 steps */
    0 15px, 5px 15px, 5px 5px, 15px 5px, 15px 0,
    /* top-right corner - 2 steps */
    calc(100% - 15px) 0, calc(100% - 15px) 5px, calc(100% - 5px) 5px, calc(100% - 5px) 15px, 100% 15px,
    /* bottom-right corner - 2 steps */
    100% calc(100% - 15px), calc(100% - 5px) calc(100% - 15px), calc(100% - 5px) calc(100% - 5px), calc(100% - 15px) calc(100% - 5px), calc(100% - 15px) 100%,
    /* bottom-left corner - 2 steps */
    15px 100%, 15px calc(100% - 5px), 5px calc(100% - 5px), 5px calc(100% - 15px), 0 calc(100% - 15px)
  );
    pointer-events: none;
}

/* Front Face (Question) */
.uk-faq-card-front {
    background-color: #FFDC00;
    color: #1B365D;
    z-index: 2;
}

.uk-faq-question-wrapper {
    text-align: center;
    width: 100%;
}

.uk-faq-question {
    font-size: 36px;
    font-weight: 900;
    margin: 0 0 20px 0;
    line-height: 100%; /* 36px */
    color: #1B365D;
    font-style: normal;
    text-transform: none;

}

.uk-faq-icon {
    margin-top: 20px;
    color: #1B365D;
    transition: transform 0.3s ease;
}
.uk-faq-icon img{
	display: block;
	margin: auto;
}
.uk-faq-card:hover .uk-faq-icon {
    transform: scale(1.1);
}

/* Back Face (Answer) */
.uk-faq-card-back {
    background-color: #1B365D;
    color: #FFFFFF;
    transform: rotateY(180deg);
    z-index: 1;
}

.uk-faq-answer-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.uk-faq-close-icon {
    position: absolute;
    top: 0;
    right: 0;
    color: #000 !important;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.uk-faq-close-icon:hover {
    transform: rotate(90deg);
}

.uk-faq-answer {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 0;
}

.uk-faq-answer p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    color: #333333;
    text-align: left;
}

/* Read More Link */
.uk-faq-read-more {
    text-align: left;
    margin-top: 15px;
}

.uk-faq-link {
    color: #1B365D;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: left;
}

.uk-faq-link:hover {
    color: #333333;
    transform: translateX(5px);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .faq-columns-4 .uk-faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .faq-columns-3 .uk-faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .uk-faq-block {
        padding: 40px 0;
    }
    
    .uk-faq-container {
        padding: 0 15px;
    }
    
    .uk-faq-title {
        font-size: 36px;
    }
    
    .uk-faq-description {
        font-size: 16px;
    }
    
    .uk-faq-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .uk-faq-card {
        height: 300px;
    }
    
    .uk-faq-question {
        font-size: 20px;
    }
    
    .uk-faq-answer p {
        font-size: 14px;
    }
    
    .uk-faq-card-front,
    .uk-faq-card-back {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .uk-faq-title {
        font-size: 28px;
    }
    
    .uk-faq-card {
        height: 280px;
    }
    
    .uk-faq-question {
        font-size: 18px;
    }
}

/* Accessibility: Focus states for interactive elements */
.uk-faq-question-wrapper:focus-visible,
.uk-faq-close-icon:focus-visible,
.uk-faq-link:focus-visible {
    outline: 3px solid #FFDC00; /* High contrast yellow */
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(255, 220, 0, 0.5), 0 0 0 5px rgba(0, 51, 160, 0.3); /* Blue shadow for depth */
}
.uk-faq-question-wrapper:focus:not(:focus-visible),
.uk-faq-close-icon:focus:not(:focus-visible),
.uk-faq-link:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* Accessibility: Screen reader only class */
.uk-faq-block .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
    clip-path: inset(50%);
}

/* Accessibility: Button reset for question wrapper */
.uk-faq-question-wrapper {
    background: none;
    border: none;
    padding: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: center;
}

/* Accessibility: Button reset for close icon */
.uk-faq-close-icon {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    font: inherit;
    color: inherit;
}
/* Animation for smooth entrance */
.uk-faq-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

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

/* Stagger animation for multiple cards */
.uk-faq-card:nth-child(1) { animation-delay: 0.1s; }
.uk-faq-card:nth-child(2) { animation-delay: 0.2s; }
.uk-faq-card:nth-child(3) { animation-delay: 0.3s; }
.uk-faq-card:nth-child(4) { animation-delay: 0.4s; }
.uk-faq-card:nth-child(5) { animation-delay: 0.5s; }
.uk-faq-card:nth-child(6) { animation-delay: 0.6s; }
.uk-faq-card:nth-child(7) { animation-delay: 0.7s; }
.uk-faq-card:nth-child(8) { animation-delay: 0.8s; }
.uk-faq-card:nth-child(9) { animation-delay: 0.9s; }

/* Accessibility: Reduced motion support (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
    .uk-faq-card,
    .uk-faq-card-inner,
    .uk-faq-icon,
    .uk-faq-close-icon,
    .uk-faq-link {
        transition: none !important;
        animation: none !important;
    }
    .uk-faq-card {
        opacity: 1 !important;
        transform: none !important;
    }
    .uk-faq-card.is-flipped .uk-faq-card-inner {
        transform: rotateY(180deg) !important; /* Keep flip but remove animation */
    }
}

/* Accessibility: High contrast mode support (WCAG 1.4.11) */
@media (prefers-contrast: high) {
    .uk-faq-block {
        border: 2px solid currentColor;
    }
    .uk-faq-title,
    .uk-faq-description,
    .uk-faq-question,
    .uk-faq-answer p,
    .uk-faq-link {
        color: CanvasText !important;
    }
    .uk-faq-card-front,
    .uk-faq-card-back {
        border: 2px solid CanvasText !important;
    }
    .uk-faq-question-wrapper:focus-visible,
    .uk-faq-close-icon:focus-visible,
    .uk-faq-link:focus-visible {
        outline: 3px solid Highlight;
        box-shadow: none;
    }
}

