﻿/* =========================
   RESET & BASE
   ========================= */
html, body {
    margin: 0;
    padding: 0;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    margin: 0;
    font-family: var(--font-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* ✅ GLOBAL BACKGROUND */
    background: var(--bg-gradient);
    background-attachment: fixed;
}


/* =========================
   TYPOGRAPHY
   ========================= */

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    margin: 0 0 .6em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* =========================
   LAYOUT
   ========================= */

.container {
    max-width: 1200px;
    margin: auto;
    padding: 1.5rem;
}


/* =========================
   NAVBAR (SINGLE SOURCE)
   ========================= */

.navbar {
    background: var(--bg-dark) !important;
}

    .navbar .navbar-brand,
    .navbar .nav-link {
        color: var(--text-inverse) !important;
        font-weight: 500;
    }

        .navbar .nav-link:hover {
            color: var(--accent) !important;
        }

    /* underline effect */
    .navbar .nav-link {
        position: relative;
        padding: .5rem .75rem;
    }

        .navbar .nav-link::after {
            content: "";
            position: absolute;
            left: 15%;
            bottom: 3px;
            width: 0;
            height: 2px;
            background: var(--accent);
            transition: width .25s ease;
        }

        .navbar .nav-link:hover::after,
        .navbar .nav-link.active::after {
            width: 70%;
        }
/* MOBILE NAVBAR FIX */
@media (max-width: 991px) {
    .navbar {
        background-color: rgba(255, 255, 255, 0.95); /* or dark */
        backdrop-filter: blur(8px);
        z-index: 1050;
    }
}
@media (max-width: 991px) {
    .navbar-toggler {
        border-color: rgba(0,0,0,0.2);
    }

    .navbar-toggler-icon {
        filter: invert(1); /* use if navbar is dark */
    }
}


/* =========================
   FORMS
   ========================= */

input,
textarea,
select {
    width: 100%;
    padding: .7rem;
    border-radius: var(--radius-sm);
    border: 1px solid #d1d5db;
}

    input:focus,
    textarea:focus,
    select:focus {
        outline: none;
        border-color: var(--primary);
    }

/* =========================
   TABLES
   ========================= */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: .8rem;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: var(--bg-muted);
}

/* =========================
   ALERTS
   ========================= */

.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
}

.alert-success {
    background: rgba(34,197,94,.15);
    color: #166534;
}

.alert-danger {
    background: rgba(239,68,68,.15);
    color: var(--primary);
}


/* =========================
   SCROLL REVEAL
   ========================= */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s ease, transform .8s ease;
}

    .reveal.active {
        opacity: 1;
        transform: translateY(0);
    }

/* Center Identity pages (Login, Forgot Password, etc.) */
body:has(form#account) {
    display: flex;
    flex-direction: column;
}

    body:has(form#account) main,
    body:has(form#account) .container,
    body:has(form#account) .row {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

