/* ============================================================
   FocusVault Maryland Ecosystem Portal — Custom Styles
   Palette: Slate Grey / Deep Charcoal / Teal Accent
   ============================================================ */

/* ---------- Base & Smooth Scrolling ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(13, 148, 136, 0.4);
    color: #fff;
}

/* ---------- Navigation Scroll Effect ---------- */
#main-nav.scrolled {
    background: rgba(15, 15, 15, 0.97);
    box-shadow: 0 1px 0 rgba(13, 148, 136, 0.1), 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* ---------- Nav Link Underline Animation ---------- */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #14b8a6;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ---------- CTA Button Glow Pulse ---------- */
.cta-primary .shadow-lg {
    animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(13, 148, 136, 0.2); }
    50% { box-shadow: 0 0 35px rgba(13, 148, 136, 0.45); }
}

/* ---------- Hero Background Animation ---------- */
#hero::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.06), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: heroGlow 6s ease-in-out infinite;
}
@keyframes heroGlow {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

/* ---------- Compliance Card Hover Effects ---------- */
.compliance-card {
    position: relative;
    overflow: hidden;
}
.compliance-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(13, 148, 136, 0.08), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.compliance-card:hover::before {
    opacity: 1;
}

/* ---------- Tab Button Active State ---------- */
.tab-btn.active {
    box-shadow: 0 0 20px rgba(13, 148, 136, 0.2);
}

/* ---------- Tab Content Transition ---------- */
.tab-content {
    animation: fadeSlideIn 0.35s ease;
}
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- CSV Upload Drag State ---------- */
#csv-upload-area.drag-over {
    border-color: #14b8a6 !important;
    background: rgba(13, 148, 136, 0.06);
}

/* ---------- Device Card ---------- */
.device-card {
    position: relative;
    overflow: hidden;
}
.device-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #14b8a6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.device-card:hover::after {
    transform: scaleX(1);
}

/* ---------- Form Input Focus Glow ---------- */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2), 0 0 0 1px #0d9488;
}

/* ---------- Success / Error Toast ---------- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    z-index: 9999;
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 360px;
    backdrop-filter: blur(12px);
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast.success {
    background: rgba(13, 148, 136, 0.9);
    border: 1px solid rgba(20, 184, 166, 0.4);
}
.toast.error {
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(248, 113, 113, 0.4);
}

/* ---------- Modal Overlay ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFade 0.2s ease;
}
@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-dialog {
    background: #1f1f1f;
    border: 1px solid #404040;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlide {
    from { transform: translateY(20px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---------- Loading Spinner ---------- */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Stats Counter Animation ---------- */
.stat-counter {
    font-variant-numeric: tabular-nums;
}

/* ---------- Mobile Responsive Tweaks ---------- */
@media (max-width: 640px) {
    .cta-primary .flex,
    .cta-secondary .flex {
        padding: 0.875rem 1.5rem;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    nav, footer, .toast { display: none !important; }
    body { background: white; color: black; }
}
