/* ============================================
   MUHAZU Global - White Gold Premium Theme
   Kalkulator Hibah Takaful
   ============================================ */

/* ===== BASE TYPOGRAPHY ===== */
html {
    font-family: 'Plus Jakarta Sans', 'Inter', 'Amiri', ui-sans-serif, system-ui, -apple-system;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(180deg, #FFFFFF 0%, #F7F7F7 50%, #FBF9F3 100%);
    min-height: 100vh;
}

.font-arabic {
    font-family: 'Amiri', serif;
}

/* ===== BRAND COLORS ===== */
:root {
    --white-base: #FFFFFF;
    --off-white: #F7F7F7;
    --cream-soft: #FBF9F3;
    --premium-gold: #D4AF37;
    --gold-light: #F4D06F;
    --gold-dark: #B8972E;
    --charcoal: #111111;
    --text-dark: #1F2937;
    --text-grey: #6B7280;
    --text-light: #9CA3AF;
    --border-light: #E5E7EB;
    --shadow-gold: rgba(212, 175, 55, 0.25);
    --shadow-soft: rgba(0, 0, 0, 0.06);
}

/* ===== GOLD GRADIENT TEXT ===== */
.gradient-text,
.gold-gradient-text {
    background: linear-gradient(135deg, #D4AF37 0%, #F4D06F 40%, #D4AF37 70%, #B8972E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== FOCUS RING ===== */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
}

/* ===== WHITE CARD STYLE ===== */
.card-white {
    background: var(--white-base);
    border-radius: 24px;
    box-shadow: 
        0 4px 6px -1px var(--shadow-soft),
        0 10px 30px -10px rgba(212, 175, 55, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-white::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--premium-gold), var(--gold-light), var(--premium-gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-white:hover::before {
    opacity: 1;
}

.card-white:hover {
    box-shadow: 
        0 10px 40px -10px rgba(212, 175, 55, 0.2),
        0 20px 50px -20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ===== GOLD BORDER ACCENT ===== */
.gold-border {
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.gold-border-strong {
    border: 2px solid var(--premium-gold);
}

.gold-border-left {
    border-left: 4px solid var(--premium-gold);
    padding-left: 1rem;
}

/* ===== SECTION SHADOWS ===== */
.section-shadow {
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.04),
        0 8px 32px rgba(212, 175, 55, 0.06);
}

.section-shadow-lg {
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.06),
        0 20px 60px rgba(212, 175, 55, 0.08);
}

/* ===== GLASS EFFECT (LIGHT VERSION) ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ===== INPUT FIELDS ===== */
.input-white {
    background: var(--white-base);
    border: 1.5px solid var(--border-light);
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 15px;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.input-white::placeholder {
    color: var(--text-light);
}

.input-white:hover {
    border-color: rgba(212, 175, 55, 0.4);
}

.input-white:focus,
.gold-focus:focus {
    outline: none;
    border-color: var(--premium-gold);
    box-shadow: 
        0 0 0 4px rgba(212, 175, 55, 0.15),
        0 4px 12px rgba(212, 175, 55, 0.1);
}

/* ===== SELECT STYLING ===== */
select.input-white {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23D4AF37'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

/* ===== BUTTON STYLES ===== */
.btn-gold {
    background: linear-gradient(135deg, var(--premium-gold) 0%, var(--gold-light) 50%, var(--premium-gold) 100%);
    background-size: 200% 200%;
    color: white;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px rgba(212, 175, 55, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-gold:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(212, 175, 55, 0.45),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.btn-secondary {
    background: var(--white-base);
    color: var(--text-dark);
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 50px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    border-color: var(--premium-gold);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(244, 208, 111, 0.08) 100%);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.15);
    transform: translateY(-1px);
}

/* ===== HOVER GLOW ===== */
.hover-glow:hover {
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.25),
        0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

/* ===== ISLAMIC SOFT PATTERN ===== */
.islamic-soft-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4AF37' fill-opacity='0.03'%3E%3Cpath d='M40 40l8-8-8-8-8 8 8 8zm0 16l8-8-8-8-8 8 8 8zm16-16l8-8-8-8-8 8 8 8zm-32 0l8-8-8-8-8 8 8 8zm16-32l8-8-8-8-8 8 8 8zm0 64l8-8-8-8-8 8 8 8zm32-32l8-8-8-8-8 8 8 8zm-64 0l8-8-8-8-8 8 8 8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
    pointer-events: none;
    opacity: 1;
}

.islamic-corner-pattern {
    position: relative;
}

.islamic-corner-pattern::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='gold' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23D4AF37;stop-opacity:0.08'/%3E%3Cstop offset='100%25' style='stop-color:%23F4D06F;stop-opacity:0.04'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23gold)' d='M120 0v120H0C0 53.7 53.7 0 120 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    pointer-events: none;
}

/* ===== PROGRESS RING ===== */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring circle {
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-ring .progress-bg {
    stroke: rgba(212, 175, 55, 0.15);
}

.progress-ring .progress-fill {
    stroke: url(#goldGradient);
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.4));
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
}

/* ===== STEP INDICATORS ===== */
.step-indicator {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-inactive {
    background: var(--off-white);
    color: var(--text-grey);
    border: 2px solid var(--border-light);
}

.step-active {
    background: linear-gradient(135deg, var(--premium-gold) 0%, var(--gold-light) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.step-completed {
    background: var(--white-base);
    color: var(--premium-gold);
    border: 2px solid var(--premium-gold);
}

/* ===== ICON CONTAINER ===== */
.icon-gold {
    background: linear-gradient(135deg, var(--premium-gold) 0%, var(--gold-light) 100%);
    box-shadow: 
        0 4px 16px rgba(212, 175, 55, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.08);
}

.icon-gold-glow {
    position: relative;
}

.icon-gold-glow::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ===== RESULT PANEL ===== */
.result-panel {
    background: linear-gradient(135deg, var(--white-base) 0%, var(--cream-soft) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
}

.result-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.08) 0%, transparent 50%);
    animation: rotate-glow 20s linear infinite;
}

.result-amount {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--premium-gold) 0%, var(--gold-dark) 30%, var(--gold-light) 60%, var(--premium-gold) 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
    text-shadow: 0 2px 20px rgba(212, 175, 55, 0.3);
}

/* ===== EXPLANATION CARDS ===== */
.explanation-card {
    background: var(--white-base);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-light);
    position: relative;
    transition: all 0.3s ease;
}

.explanation-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.1);
}

.explanation-card .title-bar {
    border-left: 4px solid var(--premium-gold);
    padding-left: 12px;
    margin-bottom: 12px;
}

/* ===== ANIMATIONS ===== */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fade-up 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-up.in {
    opacity: 1;
    transform: translateY(0);
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    animation: shimmer 2.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 0.5;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes pulse-gold {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    50% { 
        box-shadow: 0 0 30px 15px rgba(212, 175, 55, 0.1);
    }
}

.pulse-gold {
    animation: pulse-gold 2.5s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.float {
    animation: float 4s ease-in-out infinite;
}

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

@keyframes rotate-glow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== TOOLTIP STYLES ===== */
.tooltip-container {
    position: relative;
}

.tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--charcoal);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 50;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--charcoal);
}

.tooltip-container:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* ===== HEADER STYLES ===== */
.header-section {
    background: var(--white-base);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--premium-gold), var(--gold-light), var(--premium-gold), transparent) 1;
    padding-bottom: 2rem;
}

/* ===== ONBOARDING CARD ===== */
.onboarding-card {
    background: var(--white-base);
    border-radius: 24px;
    padding: 28px;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--premium-gold), var(--gold-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.onboarding-card:hover::before {
    transform: scaleX(1);
}

.onboarding-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 
        0 12px 40px rgba(212, 175, 55, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

/* ===== FORM SECTION ===== */
.form-section {
    background: var(--white-base);
    border-radius: 28px;
    border: 1px solid var(--border-light);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.03),
        0 12px 48px rgba(212, 175, 55, 0.06);
}

.form-section-inner {
    background: linear-gradient(180deg, rgba(251, 249, 243, 0.5) 0%, var(--white-base) 100%);
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

/* ===== PRESET BUTTONS ===== */
.preset-btn {
    background: var(--white-base);
    border: 1.5px solid var(--border-light);
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    border-color: var(--premium-gold);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(244, 208, 111, 0.08) 100%);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.15);
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer-card {
    background: linear-gradient(135deg, var(--white-base) 0%, var(--cream-soft) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 28px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .card-white,
    .onboarding-card,
    .form-section {
        border-radius: 20px;
    }
    
    .result-amount {
        font-size: 2.5rem;
    }
    
    .btn-gold,
    .btn-secondary {
        padding: 14px 24px;
        font-size: 14px;
    }
}

/* ===== LABEL STYLES ===== */
.label-text {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

/* ===== ERROR TEXT ===== */
.error-text {
    color: #EF4444;
    font-size: 12px;
    margin-top: 6px;
}

/* ===== SECTION TITLE ===== */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

/* ===== SCROLL REVEAL ===== */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--premium-gold), var(--gold-light));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

/* ===== UTILITY CLASSES ===== */
.text-gold { color: var(--premium-gold); }
.text-dark { color: var(--text-dark); }
.text-grey { color: var(--text-grey); }
.bg-white { background: var(--white-base); }
.bg-cream { background: var(--cream-soft); }
.rounded-xl { border-radius: 16px; }
.rounded-2xl { border-radius: 20px; }
.rounded-3xl { border-radius: 28px; }