/* ============================================
   LaLa Group - 3-Panel Expandable Hero
   ============================================ */

/* --- Hero Container --- */
.hero-panels {
    display: flex;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    background: #0a0a0a;
}

/* --- Individual Panel --- */
.hero-panel {
    position: relative;
    flex: 0.6;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default state - all panels start equal, JavaScript adds classes */
.hero-panel {
    flex: 0.6;
}

/* Collapsed state - grayscale and zoomed in */
.hero-panel.panel-collapsed .panel-bg {
    filter: grayscale(100%);
    transform: scale(1.25);
}

/* Expanded state - full color and normal scale */
.hero-panel.panel-expanded {
    flex: 2.5;
}

.hero-panel.panel-expanded .panel-bg {
    filter: grayscale(0);
    transform: scale(1);
}

.hero-panel.panel-expanded .panel-overlay {
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.2) 50%,
            transparent 100%);
}

/* Show details for expanded panel */
.hero-panel.panel-expanded .panel-details {
    max-height: 200px;
    opacity: 1;
}

/* Hide details for collapsed panel */
.hero-panel.panel-collapsed .panel-details {
    max-height: 0;
    opacity: 0;
}

/* Panel Background Image */
.panel-bg {
    position: absolute;
    inset: 0;
    transition: filter 0.7s ease-out, transform 0.7s ease-out;
}

.panel-bg picture,
.panel-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Panel Overlay */
.panel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.3) 40%,
            rgba(0, 0, 0, 0.1) 100%);
    transition: background 0.6s ease;
}

/* --- Panel Content --- */
.panel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem;
    z-index: 10;
    color: #ffffff;
}

/* Panel Icon */
.panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #c8e600;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: transform 0.4s ease, background 0.3s ease;
}

.panel-icon svg {
    width: 24px;
    height: 24px;
    stroke: #1a1a1a;
    stroke-width: 2;
}

/* Panel Title */
.panel-title {
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0 0 0.25rem 0;
    transition: transform 0.4s ease;
}

/* Panel Subtitle */
.panel-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    transition: transform 0.4s ease;
}

/* Panel Details (hidden by default) */
.panel-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 1rem;
    transition: max-height 0.5s ease, opacity 0.4s ease 0.1s;
}

.panel-description {
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1rem 0;
    max-width: 400px;
}

/* Panel Services Tags */
.panel-services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.panel-services span {
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #ffffff;
    transition: background 0.3s ease, transform 0.3s ease;
}

.panel-services span:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* ============================================
   Bounce Animation Keyframes
   ============================================ */

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    20% {
        transform: translateY(-12px);
    }

    40% {
        transform: translateY(-6px);
    }

    60% {
        transform: translateY(-3px);
    }

    80% {
        transform: translateY(-1px);
    }
}

@keyframes bounceIcon {

    0%,
    100% {
        transform: scale(1.1) translateY(0);
    }

    20% {
        transform: scale(1.15) translateY(-14px);
    }

    40% {
        transform: scale(1.12) translateY(-7px);
    }

    60% {
        transform: scale(1.11) translateY(-4px);
    }

    80% {
        transform: scale(1.1) translateY(-2px);
    }
}

/* ============================================
   Class-Based States (managed by JavaScript)
   ============================================ */

/* Animate icon on expanded panel */
.hero-panel.panel-expanded .panel-icon {
    transform: scale(1.1) translateY(-4px);
    background: #d4f500;
    animation: bounceIcon 0.6s ease-out;
}

/* Animate title on expanded panel */
.hero-panel.panel-expanded .panel-title {
    animation: bounce 0.6s ease-out;
}

/* Animate subtitle on expanded panel with slight delay */
.hero-panel.panel-expanded .panel-subtitle {
    animation: bounce 0.6s ease-out 0.05s;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .panel-content {
        padding: 2rem 1.5rem;
    }

    .panel-title {
        font-size: 1.5rem;
    }

    .panel-icon {
        width: 40px;
        height: 40px;
    }

    .panel-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 768px) {
    .hero-panels {
        flex-direction: column;
    }

    .hero-panel {
        flex: 1;
        min-height: 33.33vh;
    }

    /* Mobile: tap to expand, not hover */
    .hero-panels:hover .hero-panel {
        flex: 1;
    }

    .hero-panels:hover .hero-panel .panel-bg {
        filter: grayscale(0);
    }

    .hero-panels:hover .hero-panel:hover {
        flex: 1.5;
    }

    .panel-content {
        padding: 1.5rem 1rem;
    }

    .panel-title {
        font-size: 1.25rem;
    }

    .panel-subtitle {
        font-size: 0.75rem;
    }

    .panel-details {
        display: none;
    }

    .panel-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .panel-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   Mobile Touch Active State
   ============================================ */

.hero-panel.panel-active {
    flex: 1.8 !important;
}

.hero-panel.panel-active .panel-bg {
    filter: grayscale(0) !important;
    transform: scale(1.02);
}

.hero-panel.panel-active .panel-details {
    max-height: 150px;
    opacity: 1;
}

/* ============================================
   Animation on Page Load
   ============================================ */

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.hero-panel {
    animation: panelFadeIn 0.8s ease-out forwards;
}

.hero-panel:nth-child(1) {
    animation-delay: 0.1s;
}

.hero-panel:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-panel:nth-child(3) {
    animation-delay: 0.3s;
}

/* Initial state before animation */
.hero-panel {
    opacity: 0;
}

/* ============================================
   Legacy Styles (hidden)
   ============================================ */

.hero-universe,
.hero-particles,
.hero-gradient-bg,
.hero-noise,
.hero-orb,
.hero-content,
.hero-cards-grid,
.hero-bg-wrapper,
.hero-overlay,
.hero-category,
.hero-nav-arrows,
.hero-preview-cards,
.hero-scroll-indicator {
    display: none !important;
}