/* Testimonials Section - Frontend Mentor Grid Structure */
/* Adapted for HASEENO KI DUNYA dark theme */

/* Section Wrapper */
.testimonials-section {
    display: none;
    /* Hidden by default, shown by JS */
}

.testimonials-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px;
}

/* Header */
.testimonials-header {
    text-align: center;
    margin-bottom: 60px;
}

.testimonials-subtitle {
    font-size: 0.75rem;
    color: var(--primary, #DFC27D);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.testimonials-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #fff;
    font-weight: 600;
    margin: 0;
}

/* Grid Container */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 2rem;
    margin-bottom: 60px;
    padding-top: 3rem;
    /* Space for floating avatars */
}

/* Each Testimonial Card - with space for floating avatar */
.testimonial-card {
    padding: 3.5rem 2rem 2rem;
    /* Extra top padding for avatar */
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.3);
    color: white;
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
    /* Center all content */
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: rgba(223, 194, 125, 0.25);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.testimonial-card.featured {
    border-color: rgba(223, 194, 125, 0.3);
    box-shadow: 0 10px 30px rgba(223, 194, 125, 0.15);
}

/* User Details - Now centered and vertical */
.userdetails {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

/* Image Box - Floating at top center */
.imgbox {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* Avatar - Larger for the floating effect */
.testimonial-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    border: 3px solid var(--primary, #DFC27D);
    overflow: hidden;
    padding: 3px;
    background: linear-gradient(135deg, #0a0908, #1a1714);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold, linear-gradient(135deg, #DFC27D, #B8956B));
    color: #000;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
}


.detbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.detbox p {
    margin: 0;
}

.detbox .name {
    color: var(--primary, #DFC27D);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.detbox .designation {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stars */
.testimonial-stars {
    color: var(--primary, #DFC27D);
    font-size: 1rem;
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 1.2rem;
}

/* Review Content */
.review h4 {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 0.8rem 0;
}

.review p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

/* Footer with Date and Verified */
.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.testimonial-date {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
}

.testimonial-status {
    font-size: 0.65rem;
    color: #66bb6a;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.testimonial-status i {
    font-size: 0.75rem;
}

/* Edit Button - Top Right */
.testimonial-edit-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary, #DFC27D);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.testimonial-edit-btn:hover {
    background: var(--primary, #DFC27D);
    color: #000;
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 0 20px rgba(223, 194, 125, 0.5);
}

/* CTA Section */
.testimonials-cta {
    text-align: center;
    margin-top: 50px;
}

.testimonials-cta-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Loading State */
.testimonials-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.testimonials-loading i {
    color: var(--primary, #DFC27D);
    margin-bottom: 20px;
}

.testimonials-loading p {
    margin-top: 15px;
    font-size: 0.95rem;
}

/* Empty State */
.testimonials-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.testimonials-empty i {
    color: var(--primary, #DFC27D);
    margin-bottom: 20px;
}

.testimonials-empty h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.testimonials-empty p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 2rem;
    }
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        grid-gap: 3rem;
        padding-top: 2.5rem;
    }

    .testimonial-card {
        padding: 3rem 1.5rem 1.5rem;
    }

    .testimonial-avatar {
        width: 4rem;
        height: 4rem;
    }

    .testimonial-avatar-initials {
        font-size: 1.25rem;
    }

    .testimonials-container {
        padding: 60px 15px;
    }

    .testimonials-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .testimonial-avatar {
        width: 3.5rem;
        height: 3.5rem;
    }

    .testimonial-avatar-initials {
        font-size: 1rem;
    }

    .review h4 {
        font-size: 1.1rem;
    }

    .review p {
        font-size: 0.9rem;
    }

    .detbox .name {
        font-size: 1rem;
    }
}