/* ===== Base & Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; background: #f8fafc; }

/* ===== Scrollbar Hide ===== */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ===== Navigation ===== */
.nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.nav-link:hover { color: #1e40af; background: #eff6ff; }
.nav-link.active { color: #1e40af; background: #dbeafe; font-weight: 600; }

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    border-radius: 0.5rem;
    transition: all 0.2s;
}
.mobile-nav-link:hover, .mobile-nav-link.active { color: #1e40af; background: #eff6ff; }

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: #fff;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(30,64,175,0.3);
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(30,64,175,0.4); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: #1e40af;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 2px solid #1e40af;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
}
.btn-secondary:hover { background: #eff6ff; }

/* ===== Cards ===== */
.glass-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}
.glass-card:hover { box-shadow: 0 4px 12px rgba(30,64,175,0.1); border-color: #cbd5e1; }

.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.stat-card:hover { box-shadow: 0 8px 25px rgba(30,64,175,0.12); transform: translateY(-2px); }

.value-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.value-card:hover { box-shadow: 0 8px 25px rgba(30,64,175,0.12); transform: translateY(-4px); border-color: #bfdbfe; }

.domain-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s;
    text-decoration: none;
}
.domain-card:hover { box-shadow: 0 8px 25px rgba(30,64,175,0.12); transform: translateY(-4px); border-color: #93c5fd; }

.partner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.partner-card:hover { box-shadow: 0 4px 12px rgba(30,64,175,0.1); transform: translateY(-2px); }

.tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.micro-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e40af;
    font-size: 0.65rem;
    border-radius: 0.25rem;
}

.cert-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.cert-card:hover { box-shadow: 0 4px 12px rgba(30,64,175,0.1); }

.service-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.service-card:hover { box-shadow: 0 8px 20px rgba(30,64,175,0.1); transform: translateY(-2px); }
.service-card.emerald { border-color: #a7f3d0; }
.service-card.emerald:hover { border-color: #6ee7b7; }
.service-card.rose { border-color: #fecdd3; }
.service-card.rose:hover { border-color: #fda4af; }
.service-card.violet { border-color: #ddd6fe; }
.service-card.violet:hover { border-color: #c4b5fd; }

.advantage-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.advantage-card:hover { box-shadow: 0 4px 12px rgba(30,64,175,0.1); }
.advantage-card.emerald { border-color: #a7f3d0; }
.advantage-card.rose { border-color: #fecdd3; }
.advantage-card.violet { border-color: #ddd6fe; }

/* ===== Sub-navigation ===== */
.subnav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    border-radius: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
}
.subnav-btn:hover { color: #1e40af; background: #eff6ff; }
.subnav-btn.active { color: #1e40af; background: #dbeafe; font-weight: 600; }

/* ===== Section Header ===== */
.section-header { margin-bottom: 1rem; margin-left: 0; }
.section-anchor { scroll-margin-top: 8rem; }

/* ===== Hero Background ===== */
.hero-bg {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 30%, #172554 70%, #0f172a 100%);
}

/* ===== Text Gradient ===== */
.text-gradient {
    background: linear-gradient(135deg, #60a5fa, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Timeline ===== */
.timeline-item { position: relative; padding-left: 2rem; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}
.timeline-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ===== ASIL Badges ===== */
.asil-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 700;
    font-size: 0.75rem;
}
.asil-a { background: #dcfce7; color: #166534; }
.asil-b { background: #dbeafe; color: #1e40af; }
.asil-c { background: #fef3c7; color: #92400e; }
.asil-d { background: #fee2e2; color: #991b1b; }

/* ===== Framework Steps ===== */
.framework-step {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.framework-step:hover { box-shadow: 0 4px 12px rgba(30,64,175,0.1); border-color: #93c5fd; }
.framework-step.emerald {
    background: #fff;
    border-color: #a7f3d0;
}
.framework-step.emerald:hover {
    border-color: #6ee7b7;
    box-shadow: 0 4px 12px rgba(5,150,105,0.1);
}

.step-number {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}
.framework-step.emerald .step-number {
    background: linear-gradient(135deg, #059669, #10b981);
}

/* ===== V-Model Diagram ===== */
.v-model-diagram {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
}
.v-left, .v-right {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.v-left { align-items: flex-end; }
.v-right { align-items: flex-start; }
.v-node {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    white-space: nowrap;
}
.v-node.bottom-node {
    background: #dbeafe;
    border-color: #2563eb;
    color: #1e3a8a;
}
.v-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 0;
}

/* ===== PCI Requirements Grid ===== */
.pci-req-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s;
}
.pci-req-card:hover { background: #dcfce7; border-color: #6ee7b7; box-shadow: 0 2px 8px rgba(5,150,105,0.12); }
.pci-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

/* ===== Security Level Rows ===== */
.sl-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    border-left: 3px solid transparent;
    transition: all 0.3s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.sl-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.sl-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    padding: 0.5rem 0.75rem;
    font-weight: 800;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    flex-shrink: 0;
}
.sl-1 { background: #dcfce7; color: #166534; border-left-color: #22c55e; }
.sl-2 { background: #dbeafe; color: #1e40af; border-left-color: #3b82f6; }
.sl-3 { background: #fef3c7; color: #92400e; border-left-color: #f59e0b; }
.sl-4 { background: #fee2e2; color: #991b1b; border-left-color: #ef4444; }

/* ===== Process Nodes ===== */
.process-node {
    background: #fff5f5;
    border: 1px solid #fecdd3;
    border-radius: 0.75rem;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s;
}
.process-node:hover { background: #fee2e2; border-color: #fda4af; box-shadow: 0 2px 8px rgba(244,63,94,0.12); }
.process-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(135deg, #be123c, #e11d48);
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    border-radius: 50%;
    margin-bottom: 0.35rem;
}

/* ===== EAL Pyramid ===== */
.eal-pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.eal-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
    border: 1px solid;
}
.eal-level:hover { filter: brightness(0.95); transform: scale(1.02); }
.eal-num { font-weight: 800; font-size: 0.9rem; min-width: 3rem; text-align: center; }
.eal-desc { font-size: 0.8rem; }
.eal-7 { background: #fee2e2; border-color: #fca5a5; color: #991b1b; width: 45%; }
.eal-6 { background: #fef3c7; border-color: #fcd34d; color: #92400e; width: 55%; }
.eal-5 { background: #ffedd5; border-color: #fdba74; color: #9a3412; width: 65%; }
.eal-4 { background: #dbeafe; border-color: #93c5fd; color: #1e40af; width: 75%; }
.eal-3 { background: #d1fae5; border-color: #6ee7b7; color: #065f46; width: 85%; }
.eal-2 { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; width: 92%; }
.eal-1 { background: #ecfeff; border-color: #a5f3fc; color: #155e75; width: 100%; }

/* ===== FIPS Badges ===== */
.fips-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
    font-weight: 700;
    font-size: 0.8rem;
}
.fips-1 { background: #dcfce7; color: #166534; }
.fips-2 { background: #dbeafe; color: #1e40af; }
.fips-3 { background: #fef3c7; color: #92400e; }
.fips-4 { background: #fee2e2; color: #991b1b; }

/* ===== Form ===== */
.form-input {
    width: 100%;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #1e293b;
    outline: none;
    transition: all 0.3s;
}
.form-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.form-input::placeholder { color: #94a3b8; }

/* ===== Nav Background ===== */
.nav-scrolled {
    background: #fff !important;
    backdrop-filter: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e2e8f0;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp 0.6s ease forwards; }

/* ===== Particles ===== */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    animation: float linear infinite;
}
@keyframes float {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}