/* =============================================
   RUMAH BERKILAU - Premium CSS
   ============================================= */

/* --- Base --- */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }

.htmx-swapping { opacity: 0; transition: opacity 0.2s ease-out; }

/* --- Animated Hero Gradient --- */
.hero-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 25%, #2563eb 50%, #1e40af 75%, #1e3a8a 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Floating Orbs / Shapes --- */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.25;
    pointer-events: none;
}
.hero-orb-1 { width: 400px; height: 400px; background: rgba(96,165,250,0.5); top: -80px; left: -100px; animation: orbFloat1 7s ease-in-out infinite; }
.hero-orb-2 { width: 300px; height: 300px; background: rgba(251,146,60,0.4); bottom: -60px; right: -50px; animation: orbFloat2 9s ease-in-out infinite; }
.hero-orb-3 { width: 200px; height: 200px; background: rgba(52,211,153,0.35); top: 40%; left: 60%; animation: orbFloat3 6s ease-in-out infinite; }
.hero-orb-4 { width: 150px; height: 150px; background: rgba(251,191,36,0.3); top: 20%; right: 20%; animation: orbFloat1 11s ease-in-out infinite reverse; }

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}
@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, -30px) scale(1.08); }
}
@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -25px); }
}

/* --- Glassmorphism Navbar --- */
.navbar-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}
.navbar-glass.scrolled {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}

/* --- Logo Gradient --- */
.logo-icon {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 4px 15px rgba(37,99,235,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}
.logo-icon:hover {
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

/* --- Keyframe Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.5; }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(37,99,235,0.3); }
    50% { box-shadow: 0 0 20px rgba(37,99,235,0.5); }
}

.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }
.animate-slide-left { animation: slideInLeft 0.6s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.5s ease-out forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* --- Stagger Children --- */
.stagger-children > * { opacity: 0; animation: fadeInUp 0.5s ease-out forwards; }
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(11) { animation-delay: 0.55s; }
.stagger-children > *:nth-child(12) { animation-delay: 0.6s; }

/* --- Card Hover --- */
.card-hover {
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);
}

/* --- Premium Cards with Colored Top Border --- */
.card-accent {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: white;
    border: 1px solid #f1f5f9;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.card-accent::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    border-radius: 1rem 1rem 0 0;
}
.card-accent:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.card-accent-blue::before { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.card-accent-green::before { background: linear-gradient(135deg, #059669, #10b981); }
.card-accent-orange::before { background: linear-gradient(135deg, #ea580c, #f97316); }
.card-accent-purple::before { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.card-accent-amber::before { background: linear-gradient(135deg, #d97706, #f59e0b); }
.card-accent-pink::before { background: linear-gradient(135deg, #db2777, #ec4899); }

/* --- Icon Circle Gradient --- */
.icon-circle {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}
.icon-circle:hover { transform: scale(1.1) rotate(-5deg); }
.icon-circle-blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.icon-circle-green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.icon-circle-orange { background: linear-gradient(135deg, #ffedd5, #fed7aa); color: #9a3412; }
.icon-circle-purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #5b21b6; }

/* --- Scroll Indicator (Mouse) --- */
.scroll-indicator {
    width: 28px; height: 44px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 14px;
    position: relative;
    margin: 0 auto;
}
.scroll-indicator::before {
    content: '';
    width: 4px; height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 1.8s ease-in-out infinite;
}

/* --- Floating Side Buttons --- */
.floating-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.floating-btn {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    border: none; cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}
.floating-btn:hover { transform: scale(1.12); }
.floating-btn-primary { background: rgba(37,99,235,0.9); color: white; }
.floating-btn-primary:hover { box-shadow: 0 6px 25px rgba(37,99,235,0.4); }
.floating-btn-secondary { background: rgba(255,255,255,0.9); color: #374151; border: 1px solid rgba(0,0,0,0.08); }
.floating-btn-secondary:hover { box-shadow: 0 6px 25px rgba(0,0,0,0.15); }

/* --- Scroll to Top --- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    z-index: 40;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(37,99,235,0.3);
}
.scroll-top-btn.visible { opacity: 1; transform: translateY(0); }
.scroll-top-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 30px rgba(37,99,235,0.5); }

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}
.gradient-text-orange {
    background: linear-gradient(135deg, #ea580c, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* --- Badges --- */
.badge {
    display: inline-flex; align-items: center;
    padding: 0.25rem 0.75rem; border-radius: 9999px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.025em;
}
.badge-gradient-blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}
.badge-gradient-green {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}
.badge-gradient-orange {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: #9a3412;
}

/* --- Section Reveal (Intersection Observer) --- */
.reveal-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Kotak Saran / Feedback Form --- */
.feedback-card {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border: 1px solid #fed7aa;
    border-radius: 1.5rem;
    transition: box-shadow 0.3s;
}
.feedback-card:hover {
    box-shadow: 0 10px 40px rgba(251,146,60,0.15);
}
.feedback-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: white;
}
.feedback-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}
.feedback-textarea {
    resize: vertical;
    min-height: 100px;
}
.feedback-btn {
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(249,115,22,0.3);
}
.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249,115,22,0.4);
}

/* Topic tag pills */
.topic-pill {
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: #374151;
}
.topic-pill:hover, .topic-pill.active {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

/* --- Premium Stats Card --- */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.15);
}
.stat-card::after {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* --- Premium Footer --- */
.footer-gradient {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}
.footer-link {
    color: #94a3b8;
    transition: color 0.2s, padding-left 0.2s;
}
.footer-link:hover {
    color: #60a5fa;
    padding-left: 4px;
}
.footer-divider {
    background: linear-gradient(90deg, transparent, #334155, transparent);
    height: 1px;
    border: none;
}

/* --- Team Card Premium --- */
.team-card-banner {
    height: 120px;
    position: relative;
    overflow: hidden;
}
.team-card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.1));
}

/* --- Progress Bar Gradient --- */
.progress-gradient-green {
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 9999px;
}
.progress-gradient-orange {
    background: linear-gradient(90deg, #f97316, #fbbf24);
    border-radius: 9999px;
}
.progress-gradient-gray {
    background: linear-gradient(90deg, #9ca3af, #d1d5db);
    border-radius: 9999px;
}

/* --- BERAKHLAK Value Cards --- */
.value-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.value-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, transparent 30%, rgba(37,99,235,0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}
.value-card:hover::before { opacity: 1; }
.value-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

/* --- Hero Subpage Pattern --- */
.hero-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #2563eb, #7c3aed); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #1d4ed8, #6d28d9); }
::selection { background: rgba(37, 99, 235, 0.2); color: #172554; }

/* --- Media Queries --- */
@media (max-width: 768px) {
    .floating-sidebar { display: none; }
    .hero-orb { opacity: 0.15; }
    .hero-orb-1 { width: 200px; height: 200px; }
    .hero-orb-2 { width: 150px; height: 150px; }
    .hero-orb-3, .hero-orb-4 { display: none; }
}
