/* ==========================================================================
   ENGG AHMAD — Company Form Submission System
   Mobile-First App Design | Premium Light Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

:root {
    --primary:       #7ac142;
    --primary-dark:  #5a9e2f;
    --primary-glow:  rgba(122,193,66,0.28);
    --accent:        #0a2463;
    --accent-2:      #1e40af;
    --bg:            #f0f4fa;
    --card:          rgba(255,255,255,0.92);
    --border:        rgba(10,36,99,0.09);
    --text:          #0f172a;
    --muted:         #64748b;
    --radius:        20px;
    --radius-sm:     12px;
    --header-h:      72px;
}

/* ─── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: transparent;
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 100px; /* space for floating btn on mobile */
}

/* ─── Particles ───────────────────────────────────────── */
#particles-js {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(145deg, #e8f0fb 0%, #dce8f7 45%, #eef5e8 100%);
    pointer-events: none;
}
#particles-js canvas { pointer-events: all; }

/* ─── HEADER (app topbar) ─────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #0a2463 0%, #1a3a7a 60%, #0d3b2e 100%);
    height: var(--header-h);
    box-shadow: 0 4px 24px rgba(10,36,99,0.3);
}
.site-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7ac142, #0a2463, #7ac142);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.header-inner {
    max-width: 900px;
    margin: 0 auto;
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.site-logo {
    max-height: 48px;
    width: auto;
    filter: brightness(1.1) drop-shadow(0 2px 6px rgba(0,0,0,0.25));
    transition: transform .3s;
}
.site-logo:hover { transform: scale(1.04); }

.header-badge {
    background: rgba(122,193,66,0.15);
    border: 1px solid rgba(122,193,66,0.4);
    color: #a3d970;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
@media (max-width: 420px) { .header-badge { display: none; } }

/* ─── PAGE WRAPPER ────────────────────────────────────── */
.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 16px 20px;
}

/* ─── SECTION LABEL (app-style pill) ─────────────────── */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10,36,99,0.07);
    color: var(--accent);
    border-radius: 50px;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

/* ─── FORM CARD ───────────────────────────────────────── */
.form-card {
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(10,36,99,0.07);
    padding: 22px 20px;
    margin-bottom: 16px;

    /* reveal animation */
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .6s ease, transform .6s cubic-bezier(.25,.8,.25,1), box-shadow .3s;
}
.form-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.form-card:hover {
    box-shadow: 0 10px 40px rgba(10,36,99,0.12);
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(122,193,66,0.2);
    display: flex;
    align-items: center;
    gap: 7px;
}
.section-title i { color: var(--primary-dark); font-size: 1rem; }

/* ─── INPUTS ──────────────────────────────────────────── */
.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 5px;
    letter-spacing: 0.15px;
}
.text-danger { color: #e53e3e !important; }

.form-control, .form-select {
    border-radius: var(--radius-sm);
    padding: 13px 14px;
    border: 1.5px solid rgba(10,36,99,0.13);
    background: rgba(255,255,255,0.95);
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.4;
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}
.form-control::placeholder { color: #b0bec5; font-size: 0.87rem; }
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: #fff;
}
textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

/* ─── COMPANY TYPE CARDS ──────────────────────────────── */
.type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media (max-width: 600px) {
    .type-grid { grid-template-columns: repeat(2, 1fr); }
}

.company-type-card {
    border: 2px solid rgba(10,36,99,0.1);
    border-radius: 16px;
    padding: 18px 10px 14px;
    text-align: center;
    cursor: pointer;
    background: rgba(255,255,255,0.97);
    transition: all .28s cubic-bezier(.34,1.56,.64,1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}
.company-type-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(122,193,66,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity .3s;
}
.company-type-card:hover::after,
.company-type-card.selected::after { opacity: 1; }

.company-type-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(122,193,66,0.22);
}
.company-type-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f2faec 0%, #eaf5e0 100%);
    box-shadow: 0 6px 20px rgba(122,193,66,0.25);
}

.company-type-card i {
    font-size: 2rem;
    color: var(--primary-dark);
    display: block;
    margin-bottom: 8px;
    transition: transform .3s ease;
}
.company-type-card:hover i,
.company-type-card.selected i { transform: scale(1.15); }

.company-type-card h5 {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0;
    line-height: 1.2;
}
.company-type-card input[type="radio"] { display: none; }

/* Selected checkmark */
.company-type-card.selected::before {
    content: '✓';
    position: absolute;
    top: 6px; right: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--primary-dark);
    background: rgba(122,193,66,0.2);
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 18px;
    text-align: center;
}

/* ─── DYNAMIC ROWS ────────────────────────────────────── */
.dynamic-row {
    background: rgba(248,250,253,0.97);
    border: 1.5px dashed rgba(10,36,99,0.13);
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    position: relative;
    animation: slideInRow .3s cubic-bezier(.25,.8,.25,1) both;
}
@keyframes slideInRow {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}

.remove-btn {
    position: absolute;
    top: 8px; right: 8px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px; height: 24px;
    font-size: 13px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.remove-btn:hover { background: #dc2626; transform: scale(1.15) rotate(90deg); }

/* ─── FILE UPLOAD ─────────────────────────────────────── */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed rgba(10,36,99,0.18);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    background: rgba(248,252,255,0.95);
    transition: all .3s;
}
.file-upload-wrapper:hover,
.file-upload-wrapper:focus-within {
    border-color: var(--primary);
    background: rgba(122,193,66,0.04);
    box-shadow: 0 0 0 4px rgba(122,193,66,0.1);
}
.file-upload-wrapper input[type="file"] {
    position: absolute; inset: 0;
    opacity: 0; width: 100%; height: 100%; cursor: pointer;
}
.file-upload-icon {
    font-size: 2.6rem;
    color: #94a3b8;
    display: block;
    margin-bottom: 8px;
    transition: color .3s, transform .3s;
}
.file-upload-wrapper:hover .file-upload-icon {
    color: var(--primary);
    transform: translateY(-4px);
}

/* ─── ADD BUTTONS ─────────────────────────────────────── */
.add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary-dark);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}
.add-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(122,193,66,0.35);
    transform: translateY(-1px);
}
.add-btn i { font-size: 1rem; }

/* ─── SUBMIT BUTTON (floating on mobile) ──────────────── */
.submit-wrap {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: 14px 16px;
    background: linear-gradient(to top, rgba(240,244,250,0.98) 80%, transparent);
    z-index: 900;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 20px;
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(135deg, #7ac142 0%, #5a9e2f 100%);
    border: none;
    box-shadow: 0 8px 28px rgba(122,193,66,0.45);
    transition: transform .25s, box-shadow .25s;
    cursor: pointer;
}
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(122,193,66,0.55);
    color: #fff;
}
.submit-btn:active { transform: translateY(0); }

/* On larger screens, normal inline button */
@media (min-width: 768px) {
    .submit-wrap {
        position: static;
        background: none;
        padding: 0;
        margin-top: 8px;
        margin-bottom: 40px;
    }
    .submit-btn {
        width: auto;
        padding: 14px 48px;
        font-size: 1.05rem;
        border-radius: 50px;
        margin: 0 auto;
        display: inline-flex;
    }
    .submit-wrap { text-align: center; }
    body { padding-bottom: 20px; }
}

/* ─── BOOTSTRAP OVERRIDES ─────────────────────────────── */
.btn-sm { font-size: 0.8rem; padding: 6px 14px; border-radius: 8px; }

/* ─── ANIMATIONS ──────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(10,36,99,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(10,36,99,0.35); }
