/* ============================================
   COMPONENTS
   Reusable UI elements and building blocks
   ============================================ */

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 0.95rem 2.25rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 2px solid transparent;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-standard);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, background;
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease-out, height 0.5s ease-out;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Primary Button */
.btn-primary {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    color: #1a1a2e;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5), 0 0 60px rgba(0, 217, 255, 0.3), var(--shadow-md);
    animation: gradientShift 3s ease infinite;
    font-weight: var(--font-weight-extrabold);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.7),
                0 0 30px rgba(0, 217, 255, 0.5),
                0 15px 40px rgba(0, 0, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.02);
}

/* Secondary Button */
.btn-secondary {
    background: rgba(0, 217, 255, 0.08);
    border-color: var(--color-accent-blue);
    color: var(--color-accent-blue-light);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(0, 217, 255, 0.15);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 50px rgba(0, 217, 255, 0.5),
                0 0 25px rgba(0, 217, 255, 0.3),
                0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--color-accent-blue-light);
    color: var(--color-text-primary);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Large Button */
.btn-large {
    padding: 1.35rem 3.5rem;
    font-size: 1.05rem;
}

/* Small Button */
.btn-sm {
    padding: 0.75rem 1.75rem;
    font-size: 0.85rem;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    .btn:hover {
        transform: none;
    }

    .btn:active {
        transform: scale(0.98);
    }
}

/* ===== CARDS ===== */
.card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-smooth);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl), var(--shadow-glow-purple);
    border-color: rgba(255, 215, 0, 0.4);
}

/* ===== SERVICE CARDS ===== */
.service-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 2px solid rgba(255, 215, 0, 0.15);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.15), transparent);
    transition: left 0.6s ease;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(0, 217, 255, 0.05) 100%);
    border-radius: var(--border-radius-lg);
    opacity: 0;
    transition: opacity var(--transition-standard);
}

.service-card:hover {
    transform: translateY(-12px) rotateX(8deg) rotateY(-8deg);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.4), 0 25px 50px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover::after {
    opacity: 1;
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(0, 217, 255, 0.15));
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    transition: all var(--transition-smooth);
    animation: bounce 2.5s ease-in-out infinite;
}

.service-icon i,
.service-icon svg {
    width: 32px;
    height: 32px;
    stroke: #ffed4e !important;
    color: #ffed4e;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.service-card:hover .service-icon {
    animation: none;
    transform: scale(1.3) rotate(8deg);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(0, 217, 255, 0.35));
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.2);
}

.service-card h3 {
    color: #ffed4e;
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-lg);
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* ===== GENRE BADGES ===== */
.genre-badge {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(0, 217, 255, 0.12));
    border: 2px solid rgba(255, 215, 0, 0.3);
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent-blue-light);
    cursor: pointer;
    transition: all var(--transition-standard);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
    letter-spacing: 0.03em;
    animation: badgeBounce 3s ease-in-out infinite;
}

.genre-badge:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(0, 217, 255, 0.25));
    transform: translateY(-4px) scale(1.12) rotateZ(2deg);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.5), 0 10px 30px rgba(0, 217, 255, 0.3);
    border-color: #00d9ff;
    animation: none;
}

/* ===== SOCIAL ICONS ===== */
.social-icon-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(0, 217, 255, 0.15));
    background-size: 200% 200%;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
    animation: borderGlow 3s ease-in-out infinite;
}

.social-icon i,
.social-icon svg {
    width: 40px;
    height: 40px;
    stroke: #ffed4e !important;
    color: #ffed4e;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
}

.social-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
    animation: shimmer 3s infinite;
    opacity: 0;
}

.social-icon:hover {
    animation: none;
    transform: scale(1.2) rotate(12deg);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.6), inset 0 0 20px rgba(255, 215, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(0, 217, 255, 0.35));
    border-color: #ffed4e;
}

.social-icon:hover::before {
    opacity: 1;
}

.social-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(6, 6, 9, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 0.625rem 1.125rem;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-standard);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent-purple-light);
}

.social-tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(255, 215, 0, 0.3);
}

.social-icon-wrapper:hover .social-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== LOCATION BADGE ===== */
.location-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(255, 215, 0, 0.08);
    border: 2px solid rgba(255, 215, 0, 0.25);
    padding: 0.875rem 1.75rem;
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-sm);
    color: var(--color-accent-purple-light);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.03em;
    animation: borderGlow 2s ease-in-out infinite;
}

.location-badge::before {
    content: '📍';
    display: inline-block;
    animation: pulse 2.5s ease-in-out infinite;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    animation: bounce 2s ease-in-out infinite;
    cursor: pointer;
    transition: all var(--transition-standard);
}

.scroll-indicator:hover {
    border-color: #ffed4e;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), 0 0 60px rgba(255, 215, 0, 0.3);
}

.scroll-indicator i,
.scroll-indicator svg {
    width: 24px;
    height: 24px;
    stroke: #ffed4e;
    animation: float 2s ease-in-out infinite;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .service-card {
        padding: var(--spacing-md);
    }

    .service-icon {
        width: 56px;
        height: 56px;
    }

    .service-icon i,
    .service-icon svg {
        width: 28px;
        height: 28px;
    }

    .social-icon {
        width: 80px;
        height: 80px;
    }

    .social-icon i,
    .social-icon svg {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .btn-large {
        padding: 1rem 2.5rem;
        font-size: 0.9rem;
    }

    .genre-badge {
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
    }

    .social-icon {
        width: 70px;
        height: 70px;
    }

    .social-icon i,
    .social-icon svg {
        width: 28px;
        height: 28px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: translateY(-4px);
    }

    .service-card:active {
        transform: scale(0.98);
    }

    .genre-badge:hover {
        transform: translateY(-2px) scale(1.05);
    }

    .genre-badge:active {
        transform: scale(0.98);
    }

    .social-icon:hover {
        transform: scale(1.1);
    }

    .social-icon:active {
        transform: scale(0.95);
    }
}

/* ===== IPHONE-SPECIFIC COMPONENT OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .btn {
        padding: 0.9rem 1.8rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .btn-large {
        padding: 1.1rem 2.5rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .btn-icon {
        width: 18px;
        height: 18px;
    }

    .card {
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-md);
    }

    .service-card {
        perspective: none;
    }

    .service-card:hover {
        transform: translateY(-6px);
    }

    .service-card h3 {
        font-size: 1.05rem;
        margin-bottom: 0.5rem;
    }

    .service-card p {
        font-size: 0.85rem;
    }

    .genre-badge {
        padding: 0.65rem 1.2rem;
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .genre-badge:active {
        transform: scale(0.95);
    }

    .social-icon {
        width: 80px;
        height: 80px;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    }

    .social-icon i,
    .social-icon svg {
        width: 36px;
        height: 36px;
    }

    .social-icon:active {
        transform: scale(0.92);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    }

    .location-badge {
        font-size: 0.8rem;
        padding: 0.7rem 1.25rem;
    }

    .scroll-indicator {
        width: 36px;
        height: 36px;
        bottom: var(--spacing-md);
    }

    .scroll-indicator i,
    .scroll-indicator svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 425px) {
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
    }

    .service-icon {
        width: 48px;
        height: 48px;
        margin-bottom: var(--spacing-sm);
    }

    .service-icon i,
    .service-icon svg {
        width: 24px;
        height: 24px;
    }

    .social-icon {
        width: 72px;
        height: 72px;
    }

    .social-icon i,
    .social-icon svg {
        width: 32px;
        height: 32px;
    }

    .genre-badge {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}
