/* Why Choose Us Carousel Section */
.why-choose-features {
    background-color: #f9f9f9;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.why-choose-features .section-header {
    margin-bottom: 60px;
    text-align: center;
}

.why-choose-features .section-header h2 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.why-choose-features .section-header h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background: #ffc107;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.why-choose-features .section-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 20px auto 0;
    line-height: 1.6;
}

/* Flip Container */
.flip-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Flip Card */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    height: 250px;
    min-height: 250px;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.flip-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Front of card */
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    display: flex;
    flex-direction: column;
}

/* Front of Card */
.flip-card-front {
    justify-content: flex-end;
    background-color: #fff;
    color: #333;
    justify-content: flex-start;
    padding-bottom: 20px;
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: rotateY(0deg);
    z-index: 2;
}

.flip-image {
    width: 100%;
    height: 190px;
    min-height: 190px;
    overflow: hidden;
    position: relative;
}

.flip-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

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

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

.flip-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    text-align: left;
    position: relative;
    z-index: 2;
    height: 40%;
    min-height: 120px;
    justify-content: space-between;
}

.flip-content h3 {
    color: #222;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.flip-content p {
    color: #666;
    margin: 0 0 8px 0;
    line-height: 1.4;
    flex-grow: 1;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flip-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #172B44; /* Text over accent pill */
    background: #F9C80E; /* Accent for visibility */
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
    margin-top: 8px;
    font-size: 0.92rem;
    width: fit-content;
}

.flip-cta i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.flip-card:hover .flip-cta {
    background: #FFD700;
    color: #172B44;
}

.flip-card:hover .flip-cta i {
    transform: translateX(5px);
}

/* Back of Card */
.flip-card-back {
    background: linear-gradient(135deg, #172B44 0%, #0D1A2E 100%);
    color: white;
    transform: rotateY(180deg);
    padding: 20px 15px 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.flip-back-content {
    width: 100%;
}

.flip-card-back p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 10px 0;
    line-height: 1.4;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 5.6em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
}

.flip-card-back .feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.flip-card-back .feature-list li {
    color: white;
    padding: 5px 0 5px 25px;
    position: relative;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

.flip-card-back .feature-list li i {
    color: #F9C80E;
    position: absolute;
    left: 0;
    top: 10px;
}

.flip-back-button {
    background: #F9C80E;
    color: #172B44 !important;
    border: none;
    padding: 8px 16px;
    margin-top: 10px;
    font-size: 0.8rem;
    width: 90%;
    max-width: 180px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
width: 90%;
    max-width: 180px;
    margin: 10px auto 0;
    display: block;
}

.flip-back-button:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 200, 14, 0.3);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .flip-container {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
    }
    
    .flip-card {
        height: 320px;
    }
}

@media (max-width: 992px) {
    .flip-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
    }
    
    .flip-card {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .why-choose-features {
        padding: 50px 0;
    }
    
    .flip-container {
        grid-template-columns: 1fr;
        max-width: 450px;
        gap: 15px;
    }
    
    .flip-card {
        height: 300px;
        pointer-events: auto !important;
    }
    
    .flip-image {
        min-height: 300px;
    }
    
    .flip-content {
        min-height: 200px;
    }
    
    .flip-card .flip-card-inner {
        transform: none !important;
    }
    
    .flip-card .flip-card-back {
        transform: rotateY(180deg);
        display: none;
    }
    
    .flip-card:hover .flip-card-back {
        display: flex;
    }
    
    .why-choose-features .section-header h2 {
        font-size: 2.2rem;
    }
    
    .why-choose-features .section-header p {
        font-size: 1rem;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .why-choose-features {
        padding: 50px 0;
    }
    
    .why-choose-features .section-header h2 {
        font-size: 1.8rem;
    }
    
    .flip-card {
        height: 350px;
    }
    
    .flip-content {
        padding: 20px 15px;
    }
    
    .flip-content h3 {
        font-size: 1.25rem;
        min-height: auto;
    }
    
    .flip-content p {
        font-size: 0.9rem;
    }
    
    .flip-card-back {
        padding: 25px 20px;
    }
    
    .flip-back-button {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

.why-choose-image, .why-choose-content {
    width: 100%;
    padding: 20px;
    position: relative;
    perspective: 1500px;
    transform-style: preserve-3d;
    transition: transform 0.8s ease-out;
}

.why-choose-image {
    transform: translateY(-100%) rotateX(90deg);
    opacity: 0;
}

.why-choose-content {
    transform: translateY(100%) rotateX(-90deg);
    opacity: 0;
}

.why-choose-image.visible {
    transform: translateY(0) rotateX(0);
    opacity: 1;
}

.why-choose-content.visible {
    transform: translateY(0) rotateX(0);
    opacity: 1;
    transition-delay: 0.3s;
}

.why-choose-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    display: block;
}

.why-choose-content h2 {
    font-size: 2.5rem;
    color: #172B44;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.why-choose-content h2:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #172B44, #F9C80E);
    bottom: -10px;
    left: 0;
    border-radius: 2px;
}

.feature-list {
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #F9C80E, #FFD700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    color: white;
    font-size: 1.5rem;
}

.feature-text h3 {
    color: #172B44;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.feature-text p {
    color: #4A5568;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (min-width: 992px) {
    .why-choose-image, .why-choose-content {
        width: 50%;
    }
}

@media (max-width: 991px) {
    .why-choose-container {
        flex-direction: column;
    }
    
    .why-choose-image, .why-choose-content {
        width: 100%;
    }
    
    .why-choose-content {
        padding-top: 40px;
    }
}

/* Animation */
@keyframes flipInY {
    from {
        transform: perspective(1500px) rotateX(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(1500px) rotateX(0);
        opacity: 1;
    }
}

.why-choose-features .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #172B44;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #172B44, #F9C80E);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-header p {
    color: #4A5568;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
}

.feature-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(23, 43, 68, 0.1);
    width: 100%;
    max-width: 360px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.feature-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F9C80E, #FFD700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(249, 200, 14, 0.3);
}

.feature-content {
    padding: 30px;
    text-align: center;
}

.flip-card-front h3 {
    color: #00325F; /* Navy blue color */
    font-size: 1.2rem;
    margin: 0;
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    background: white;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid #f0f0f0;
}

.feature-content h3 {
    color: #172B44;
    font-size: 1.5rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.feature-content h3:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background: #F9C80E;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.feature-content p {
    color: #4A5568;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .feature-item {
        max-width: 320px;
    }
}

@media (max-width: 991px) {
    .features-container {
        gap: 25px;
    }
    
    .feature-item {
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 767px) {
    .why-choose-features {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .feature-item {
        max-width: 100%;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

/* Animation delays for staggered appearance */
.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }
