/**
 * Artist Circle Widget Styles
 * Circular artist photos with flip animation revealing statement
 */

/* Grid container - responsive: 4 per row (desktop), 2 (tablet), 1 (mobile) */
.artist-circle-grid {
    display: grid !important; /* Override Section widget's flex */
    grid-template-columns: repeat(4, 1fr);
    gap: 48px 32px;
    padding: 40px 0;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 1024px) {
    .artist-circle-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px 24px;
    }
}

@media (max-width: 768px) {
    .artist-circle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 16px;
    }
}

@media (max-width: 480px) {
    .artist-circle-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Individual artist item */
.artist-circle-item {
    text-align: center;
    max-width: 280px;
}

/* Flip container - handles 3D perspective */
.artist-circle-flip-container {
    position: relative;
    width: 256px;
    height: 256px;
    perspective: 1000px;
    display: block;
    margin: 0 auto 16px;
    text-decoration: none;
    cursor: pointer;
}

/* Flip inner - rotates on hover */
.artist-circle-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}

.artist-circle-flip-container:hover .artist-circle-flip-inner {
    transform: rotateY(180deg);
}

/* Front and back sides */
.artist-circle-front,
.artist-circle-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    overflow: hidden;

    /* Drop shadow as specified */
    filter: drop-shadow(0px 0px 25px rgba(255, 255, 255, 0.25));
}

/* Front: circular photo */
.artist-circle-front {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 45, 115, 1) 0%, rgba(0, 9, 47, 1) 100%);
    z-index: 2;
}

.artist-circle-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Subtle zoom on hover (front side) */
.artist-circle-flip-container:hover .artist-circle-photo {
    transform: scale(1.05);
}

/* Back: statement text */
.artist-circle-back {
    transform: rotateY(180deg);
    background: radial-gradient(circle, rgba(0, 45, 115, 1) 0%, rgba(0, 9, 47, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    box-sizing: border-box;
}

.artist-circle-statement {
    color: #FFFFFF;
    font-family: 'Alegreya', serif;
    font-size: 15px;
    line-height: 1.5;
    font-style: italic;
    text-align: center;
    margin: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Info below circle */
.artist-circle-info {
    margin-top: 12px;
}

.artist-circle-name {
    font-family: 'Megrim', cursive;
    font-size: 22px;
    font-weight: 400;
    color: #00092F; /* Default: dark for light backgrounds */
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.artist-circle-specialty {
    font-family: 'Alegreya', serif;
    font-size: 14px;
    color: #002D73; /* Default: dark blue for light backgrounds */
    margin: 0;
    line-height: 1.4;
    font-style: italic;
}

/* Gold glow effect on hover */
.artist-circle-flip-container:hover {
    filter: drop-shadow(0px 0px 30px rgba(255, 177, 23, 0.4));
}

/* Accessibility: focus state */
.artist-circle-flip-container:focus {
    outline: 2px solid #FFB117;
    outline-offset: 4px;
}

/* Animation: entrance effect (optional, can be added via Animate.css classes) */
.artist-circle-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.artist-circle-item:nth-child(1) { animation-delay: 0.1s; }
.artist-circle-item:nth-child(2) { animation-delay: 0.2s; }
.artist-circle-item:nth-child(3) { animation-delay: 0.3s; }
.artist-circle-item:nth-child(4) { animation-delay: 0.4s; }
.artist-circle-item:nth-child(5) { animation-delay: 0.5s; }
.artist-circle-item:nth-child(6) { animation-delay: 0.6s; }
.artist-circle-item:nth-child(7) { animation-delay: 0.7s; }
.artist-circle-item:nth-child(8) { animation-delay: 0.8s; }

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

/* Background-specific text colors for better visibility */

/* Dark backgrounds: white text */
.section-bg-gradient-cosmic .artist-circle-name,
.section-bg-cosmic .artist-circle-name,
.section-bg-dark .artist-circle-name,
section[class*="gradient-cosmic"] .artist-circle-name {
    color: #FFFFFF !important;
}

.section-bg-gradient-cosmic .artist-circle-specialty,
.section-bg-cosmic .artist-circle-specialty,
.section-bg-dark .artist-circle-specialty,
section[class*="gradient-cosmic"] .artist-circle-specialty {
    color: #CFE0EA !important;
}

/* Light backgrounds: dark text */
.section-bg-gradient-light .artist-circle-name,
.section-bg-white .artist-circle-name,
section[class*="gradient-light"] .artist-circle-name {
    color: #00092F !important;
}

.section-bg-gradient-light .artist-circle-specialty,
.section-bg-white .artist-circle-specialty,
section[class*="gradient-light"] .artist-circle-specialty {
    color: #002D73 !important;
}

/* Mobile-friendly mode: disable hover effects on mobile */
@media (max-width: 768px) {
    .mobile-friendly .artist-circle-flip-container:hover .artist-circle-flip-inner {
        transform: none; /* No flip on mobile */
    }

    .mobile-friendly .artist-circle-flip-container:hover .artist-circle-photo {
        transform: none; /* No zoom on mobile */
    }

    .mobile-friendly .artist-circle-flip-container:hover {
        filter: none; /* No gold glow on mobile */
    }

    /* Reset drop shadow to default on mobile */
    .mobile-friendly .artist-circle-front,
    .mobile-friendly .artist-circle-back {
        filter: drop-shadow(0px 0px 25px rgba(255, 255, 255, 0.25));
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .artist-circle-flip-container {
        width: 200px;
        height: 200px;
    }

    .artist-circle-name {
        font-size: 18px;
    }

    .artist-circle-specialty {
        font-size: 13px;
    }

    .artist-circle-statement {
        font-size: 13px;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .artist-circle-flip-container {
        width: 220px;
        height: 220px;
    }
}
