/* --- FINANCEFARE GLASS UI V18 (Responsive Fix) --- */

:root {
    --primary: #0056b3; 
    --primary-dark: #004494;
    --accent: #f59e0b;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-body: #f0f4f8;
    
    /* GLASS VARIABLES */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0,0,0,0.05);
    --blur: blur(20px);
}

* { box-sizing: border-box; }
body { font-family: 'Manrope', sans-serif; background: var(--bg-body); color: var(--text-dark); margin: 0; padding: 0; line-height: 1.6; overflow-x: hidden; }

/* HEADER */
header { background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 1000; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.5); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 42px; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.secure-badge { font-size: 0.85rem; color: #059669; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.nav-btn { background: #6465EF; color: white; padding: 10px 25px; border-radius: 50px; text-decoration: none; font-weight: 700; transition: 0.3s; font-size: 0.9rem; }
.nav-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 86, 179, 0.2); }

/* HERO */
.hero-section { padding: 60px 0; position: relative; overflow: hidden; }
.glass-blob { position: absolute; border-radius: 50%; filter: blur(80px); z-index: -1; animation: float 10s infinite ease-in-out; }
.blob-1 { top: -100px; right: -50px; width: 500px; height: 500px; background: rgba(0, 86, 179, 0.2); }
.blob-2 { bottom: 0px; left: -100px; width: 400px; height: 400px; background: rgba(255, 71, 87, 0.15); animation-delay: 5s; }
@keyframes float { 0% { transform: translate(0,0); } 50% { transform: translate(20px, 40px); } 100% { transform: translate(0,0); } }

.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: flex-start; }
.hero-text { padding-top: 40px; }
.hero-text h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; font-weight: 800; color: var(--primary-dark); letter-spacing: -1px; }
.hero-text span { color: #6465EF; }
.badge-pill { background: #6465EF; color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 50px; display: inline-block; margin-bottom: 20px; font-size: 0.8rem; }

/* GLASS FORM (Responsive Height) */
.form-wrapper { 
    background: var(--glass-bg); 
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: var(--glass-border); 
    box-shadow: var(--glass-shadow);
    border-radius: 24px; padding: 30px; 
    
    /* Dynamic Sizing Logic */
    height: auto; 
    min-height: 200px; /* Allows shrinking for small steps */
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
}
.progress-bar-wrapper { height: 6px; background: rgba(0,0,0,0.05); border-radius: 10px; margin-bottom: 30px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); width: 4%; transition: width 0.4s ease; }

/* SLIDES */
.question-slide { display: none; animation: fadeIn 0.5s ease; }
.question-slide.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.slide-label { font-size: 1.6rem; font-weight: 800; color: var(--text-dark); margin-bottom: 25px; display: block; line-height: 1.2; }
.slide-label span { color: var(--primary); }

/* INPUTS */
.big-input, .big-select { 
    width: 100%; padding: 18px; font-size: 1.1rem; 
    border: 1px solid rgba(255,255,255,0.6); 
    border-radius: 14px; margin-bottom: 12px; 
    background: rgba(255,255,255,0.7); 
    transition: 0.2s; color: var(--text-dark); font-family: inherit;
}
.big-input:focus, .big-select:focus { border-color: var(--primary); outline: none; background: white; box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1); }

/* BUTTONS */
.btn-main, .btn-continue, .btn-submit { 
    width: 100%; padding: 18px; font-size: 1.15rem; font-weight: 700; border: none; 
    border-radius: 14px; cursor: pointer; transition: 0.2s; background: #6465EF; 
    color: white; margin-top: 15px; box-shadow: 0 10px 20px -5px rgba(0, 86, 179, 0.3);
}
.btn-main:hover, .btn-continue:hover, .btn-submit:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-back { background: transparent; border: none; color: #94a3b8; font-weight: 700; cursor: pointer; margin-top: 15px; display: block; width: 100%; text-align: center; transition: 0.2s; }
.btn-back:hover { color: var(--primary); transform: translateX(-3px); }

/* GRIDS */
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.brand-card { 
    border: 1px solid rgba(255,255,255,0.5); border-radius: 14px; padding: 15px 5px; 
    text-align: center; cursor: pointer; background: rgba(255,255,255,0.6); 
    transition: 0.2s; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.brand-card img { height: 35px; width: auto; object-fit: contain; }
.brand-card span { font-size: 0.8rem; font-weight: 700; color: var(--text-dark); }
.brand-card:hover { border-color: var(--primary); background: white; transform: translateY(-3px); }
.brand-card.selected { border-color: var(--primary); background: #e0e7ff; box-shadow: 0 0 0 2px var(--primary); }

.option-grid { display: grid; gap: 12px; }
.opt-btn { 
    padding: 18px; border: 1px solid rgba(255,255,255,0.5); border-radius: 14px; 
    font-weight: 600; cursor: pointer; text-align: center; transition: 0.2s; 
    background: rgba(255,255,255,0.6); color: var(--text-dark); font-size: 1.05rem;
}
.opt-btn:hover { border-color: var(--primary); background: white; }
.opt-btn.selected { border-color: var(--primary); background: #e0e7ff; color: var(--primary); font-weight: 800; }

/* DOB */
.dob-wrapper { display: flex; gap: 10px; }
.dob-select { flex: 1; padding: 15px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.7); text-align: center; }

/* UTILS */
.hidden-input { display: none; margin-top: 15px; }
.error-msg { color: #b45309; background: #fffbeb; font-weight: 700; font-size: 0.85rem; margin-top: 10px; display: none; align-items: center; gap: 8px; padding: 12px; border-radius: 10px; border: 1px solid #fcd34d; }
.input-error { border-color: #f59e0b !important; background: #fffbeb !important; }
.hp-field { opacity: 0; position: absolute; z-index: -1; }

/* SECTIONS */
.section-white { background: white; padding: 100px 0; }
.section-gray { background: #f8fafc; padding: 100px 0; border-top: 1px solid #e2e8f0; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 50px; }
.feature-card { padding: 40px 30px; border-radius: 24px; text-align: center; background: white; border: 1px solid #e2e8f0; transition: 0.3s; }
.feature-card img { height: 50px; width: auto; margin-bottom: 20px; }
.feature-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.cta-section { background: #6465EF; color: white; padding: 30px 0px 70px 0px; text-align: center; }
.cta-btn { background: white; color: var(--primary); padding: 20px 50px; border-radius: 50px; font-weight: 800; text-decoration: none; font-size: 1.1rem; display: inline-block; margin-top: 30px; }

/* FOOTER */
.disclaimer-bar { background: #f1f5f9; padding: 40px 0; font-size: 0.8rem; color: #94a3b8; border-top: 1px solid #e2e8f0; }
footer { background: #6465EF; color: white; padding: 50px 0; }
.footer-wrapper { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 50px; }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px 40px; }
.footer-links a { color: #fff; text-decoration: none; transition: 0.2s; }
.footer-links a:hover { color: white; }
.footer-copy { text-align: center; margin-top: 60px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); color: #fff; font-size: 0.9rem; }
.footer-logo { height: 80px; width: 200px;}

@media(max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; }
    .brand-grid { grid-template-columns: repeat(3, 1fr); }
    .cards-grid { grid-template-columns: 1fr; }
    .form-wrapper { padding: 25px; min-height: auto; }
}

/* --- HOSTINGER-STYLE LOADER --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff; /* Clean white background */
    z-index: 99999; /* Always on top */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease-out, visibility 0.6s;
}

/* Hide state (JS will add this) */
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preloader-logo {
    height: 60px; /* Adjust based on your logo */
    width: auto;
    animation: logoPulse 2s infinite ease-in-out;
}

.loader-track {
    width: 180px;
    height: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: var(--primary); /* Uses your Royal Blue */
    border-radius: 10px;
    animation: loaderSlide 1.5s infinite ease-in-out;
}

/* Animations */
@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes loaderSlide {
    0% { left: -30%; width: 30%; }
    50% { width: 60%; }
    100% { left: 100%; width: 30%; }
}