/* 
 * Palmeras Showcase Widget CSS v2
 * Premium UI/UX styling with horizontal desktop adaptation
 */

.palmeras-showcase-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    padding: 60px 20px;
    box-sizing: border-box;
    /* Default CSS Variables */
    --p-bg-center: rgba(0,0,0,0.4);
    --p-bg-edge: rgba(0,0,0,0.9);
    --p-accent: #1DB954;
    --p-text1: #ffffff;
    --p-text2: #aaaaaa;
}

.palmeras-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, var(--p-bg-center) 0%, var(--p-bg-edge) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Safari Support */
    z-index: 1;
}

/* Particles Container */
.palmeras-particles-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
    pointer-events: none; /* Critical: Don't block clicks */
}

/* Floating Audio Toggle Button */
.palmeras-audio-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-text1);
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.palmeras-audio-toggle:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.palmeras-container {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: row; /* Desktop horizontal adaptation */
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    padding: 60px;
    gap: 60px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Album Art Column */
.palmeras-art-col {
    flex: 0 0 400px; /* Fixed width for desktop to ensure horizontal layout */
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.palmeras-record-sleeve {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1/1;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 3;
}

.palmeras-record-sleeve:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(-5deg);
}

.palmeras-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    position: relative;
    z-index: 4;
}

/* Vinyl Record Effect */
.palmeras-vinyl {
    position: absolute;
    top: 2%;
    right: -15%;
    width: 96%;
    height: 96%;
    background: #111;
    border-radius: 50%;
    z-index: 3;
    box-shadow: inset 0 0 0 10px #000, inset 0 0 0 12px #222, inset 0 0 0 20px #111, inset 0 0 0 22px #222, inset 0 0 0 30px #111, inset 0 0 0 32px #222;
    transition: transform 0.6s ease;
}

.palmeras-record-sleeve:hover .palmeras-vinyl {
    transform: translateX(20%) rotate(45deg);
}

/* Info Column */
.palmeras-info-col {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--p-text1);
    min-width: 0; /* Prevents flex blowout */
}

.palmeras-artist {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--p-text2);
    margin: 0 0 10px 0;
}

.palmeras-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 30px 0;
    background: linear-gradient(135deg, var(--p-text1) 0%, var(--p-text2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.palmeras-listen-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.palmeras-listen-text {
    font-size: 1.1rem;
    color: var(--p-text1);
    opacity: 0.8;
    margin: 0;
}

/* Audio Wave Animation */
.palmeras-audio-wave {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 15px;
}

.palmeras-audio-wave span {
    display: block;
    width: 3px;
    height: 100%;
    background: var(--p-accent);
    border-radius: 3px;
    animation: bounce 1.2s ease-in-out infinite;
}

.palmeras-audio-wave.paused span {
    animation-play-state: paused;
    height: 30% !important;
}

.palmeras-audio-wave span:nth-child(1) { animation-delay: 0.0s; height: 30%; }
.palmeras-audio-wave span:nth-child(2) { animation-delay: 0.1s; height: 100%; }
.palmeras-audio-wave span:nth-child(3) { animation-delay: 0.2s; height: 60%; }
.palmeras-audio-wave span:nth-child(4) { animation-delay: 0.3s; height: 80%; }

@keyframes bounce {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

/* Platforms Buttons (Icon Grid) */
.palmeras-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.palmeras-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--p-text1);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.palmeras-icon-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* FIX: Icon sizes inside button */
.palmeras-icon-btn i,
.palmeras-icon-btn svg {
    width: 24px !important;
    height: 24px !important;
    font-size: 24px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Particle Items */
.palmeras-particle {
    position: absolute;
    color: var(--p-text1);
    opacity: 0.2;
    font-size: 20px;
    will-change: transform;
}

/* Responsive constraints */
@media (max-width: 992px) {
    .palmeras-container {
        flex-direction: column; /* Stack vertically on tablets and mobile */
        padding: 40px 20px;
        gap: 30px;
        text-align: center;
    }
    .palmeras-art-col {
        flex: 1 1 auto;
    }
    .palmeras-info-col {
        align-items: center;
    }
    .palmeras-artist { font-size: 1rem; }
    .palmeras-title { font-size: 3rem; margin-bottom: 20px; }
    .palmeras-platforms { justify-content: center; }
    
    .palmeras-record-sleeve {
        max-width: 300px;
        margin: 0 auto;
    }
    .palmeras-record-sleeve:hover .palmeras-vinyl {
        transform: translateY(-30px) rotate(45deg);
        right: 0;
    }
    .palmeras-audio-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .palmeras-showcase-wrapper {
        padding: 40px 10px;
    }
    .palmeras-container {
        padding: 30px 15px;
    }
    .palmeras-title { font-size: 2.2rem; }
    .palmeras-icon-btn { 
        width: 45px; 
        height: 45px; 
    }
    .palmeras-listen-header {
        justify-content: center;
    }
    .palmeras-record-sleeve {
        max-width: 250px;
    }
}

/* Initial state for GSAP animations */
/* Eliminado: No ocultar por CSS para prevenir que se queden invisibles si un plugin externo rompe el JS */
.e-anim-item {
    /* opacity: 0; */
    /* visibility: hidden; */
}
