/* =============================================================
   NACTE Public Website — Design System Stylesheet
   National Accreditation Council for Teacher Education, Pakistan
   ============================================================= */

/* ===== CSS Custom Properties ===== */
:root {
    --nacte-primary: #1a3c5e;
    --nacte-dark: #0d2137;
    --nacte-green: #2d8653;
    --nacte-gold: #c9a227;
    --nacte-light: #f0f4f8;
    --nacte-gold-light: #f5e6b3;
    --nacte-ink: #26364a;
    --transition: all 0.3s ease;
}

/* ===== Typography ===== */
body {
    font-family: 'Inter', sans-serif;
    color: var(--nacte-ink);
    background-color: var(--nacte-light);
    line-height: 1.6;
}

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', serif;
    color: var(--nacte-dark);
    font-weight: 700;
    line-height: 1.25;
}

a {
    transition: var(--transition);
}

/* ===== Top Bar ===== */
.top-bar {
    background: var(--nacte-dark);
    color: #dce6ef;
    font-size: 0.85rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}

.top-bar a {
    color: #dce6ef;
    text-decoration: none;
}

.top-bar a:hover {
    color: var(--nacte-gold);
}

.top-bar .top-bar-divider {
    color: rgba(255, 255, 255, 0.25);
    margin: 0 0.6rem;
}

/* ===== Navbar ===== */
.navbar-nacte {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(13, 33, 55, 0.08);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

html {
    scroll-padding-top: var(--navbar-offset, 96px);
}

.navbar-nacte .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--nacte-primary);
}

.navbar-nacte .navbar-brand span {
    color: var(--nacte-green);
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--nacte-ink) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--nacte-primary) !important;
}

.nav-link.active {
    color: var(--nacte-green) !important;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.15rem;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--nacte-green), var(--nacte-gold));
}

/* ===== Hero ===== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--nacte-dark) 0%, var(--nacte-primary) 55%, var(--nacte-green) 100%);
    color: #ffffff;
    padding: 6rem 0 7rem;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
    opacity: 0.5;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(201, 162, 39, 0.18);
    border: 1px solid rgba(201, 162, 39, 0.55);
    color: var(--nacte-gold-light);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 3.25rem;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.hero-title em,
.hero-title .accent {
    font-style: normal;
    color: var(--nacte-gold);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 640px;
    margin-bottom: 2rem;
}

/* ===== Stats Bar ===== */
.stats-section {
    background: var(--nacte-dark);
    padding: 2.5rem 0;
}

.stat-card {
    text-align: center;
    padding: 0.5rem 1.5rem;
    position: relative;
    color: #ffffff;
}

.stat-card:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 10%;
    bottom: 10%;
    right: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.18);
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2.75rem;
    color: var(--nacte-gold);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.35rem;
}

/* ===== Section Titles ===== */
.section-title {
    position: relative;
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2.1rem;
    color: var(--nacte-dark);
    padding-bottom: 0.9rem;
    margin-bottom: 2.5rem;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 70px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--nacte-green), var(--nacte-gold));
}

.section-title.text-center {
    display: block;
    text-align: center;
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    color: #5c7086;
    max-width: 620px;
    margin-bottom: 2.5rem;
}

/* ===== Process Cards ===== */
.process-card {
    background: #ffffff;
    border: 1px solid rgba(13, 33, 55, 0.06);
    border-top: 4px solid var(--nacte-green);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    height: 100%;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(13, 33, 55, 0.05);
}

.process-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(13, 33, 55, 0.14);
}

.process-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--nacte-light);
    color: var(--nacte-primary);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* ===== Level Cards (W / X / Y / Z accreditation levels) ===== */
.level-card {
    border-radius: 10px;
    padding: 2rem 1.5rem;
    color: #ffffff;
    height: 100%;
    transition: var(--transition);
    box-shadow: 0 6px 18px rgba(13, 33, 55, 0.12);
}

.level-card:hover {
    transform: translateY(-4px);
}

.level-card h3,
.level-card h4,
.level-card h5 {
    color: #ffffff;
}

.level-w {
    background: linear-gradient(135deg, #1c5d99 0%, #2f7cc9 100%);
}

.level-x {
    background: linear-gradient(135deg, #1f6b45 0%, #2d8653 100%);
}

.level-y {
    background: linear-gradient(135deg, #a9791d 0%, #c9a227 100%);
}

.level-z {
    background: linear-gradient(135deg, #5b3a8e 0%, #7d4fb8 100%);
}

/* ===== Feature Cards ===== */
.feature-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.75rem;
    height: 100%;
    box-shadow: 0 2px 10px rgba(13, 33, 55, 0.05);
    transition: var(--transition);
}

.feature-card:hover {
    box-shadow: 0 12px 24px rgba(13, 33, 55, 0.1);
    transform: translateY(-4px);
}

/* height:100% above is for cards laid out side-by-side in the same .row (equal-height
   siblings) — stacked/vertical usage must size to its own content instead. */
.feature-card-stacked {
    height: auto;
}

.feature-card .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 10px;
    background: var(--nacte-light);
    color: var(--nacte-green);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ===== Announcement Cards ===== */
.announcement-card {
    background: #ffffff;
    border-left: 4px solid var(--nacte-primary);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(13, 33, 55, 0.05);
    transition: var(--transition);
}

.announcement-card:hover {
    box-shadow: 0 8px 18px rgba(13, 33, 55, 0.1);
}

.announcement-card.priority-important {
    border-left-color: var(--nacte-gold);
}

.announcement-card.priority-urgent {
    border-left-color: #c0392b;
}

.announcement-date {
    font-size: 0.8rem;
    color: #5c7086;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--nacte-dark) 0%, var(--nacte-primary) 100%);
    color: #ffffff;
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2,
.cta-section h3 {
    color: #ffffff;
}

.btn-nacte-gold {
    background: var(--nacte-gold);
    border-color: var(--nacte-gold);
    color: var(--nacte-dark);
    font-weight: 600;
}

.btn-nacte-gold:hover {
    background: #b3921f;
    border-color: #b3921f;
}

.btn.nacte-btn-primary {
    background: var(--nacte-primary);
    border-color: var(--nacte-primary);
    color: #ffffff;
}

.btn.nacte-btn-primary:hover {
    background: var(--nacte-dark);
    border-color: var(--nacte-dark);
    color: #ffffff;
}

/* ===== Urgent Banner ===== */
.urgent-banner {
    background-color: #c0392b;
    color: #ffffff;
    text-align: center;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

.urgent-banner a {
    color: #ffffff;
    text-decoration: underline;
}

@keyframes pulse {
    0% {
        background-color: #c0392b;
        box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.55);
    }
    50% {
        background-color: #d9463a;
        box-shadow: 0 0 0 6px rgba(192, 57, 43, 0);
    }
    100% {
        background-color: #c0392b;
        box-shadow: 0 0 0 0 rgba(192, 57, 43, 0);
    }
}

/* ===== AI Chat Widget ===== */
.chat-toggle-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nacte-primary), var(--nacte-green));
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 22px rgba(13, 33, 55, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1040;
    cursor: pointer;
    transition: var(--transition);
}

.chat-toggle-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 26px rgba(13, 33, 55, 0.45);
}

.back-to-top-btn {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nacte-primary), var(--nacte-green));
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 22px rgba(13, 33, 55, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1040;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 26px rgba(13, 33, 55, 0.45);
}

.chat-window {
    position: fixed;
    right: 24px;
    bottom: 100px;
    width: 380px;
    height: 500px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(13, 33, 55, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1040;
}

.chat-header {
    background: linear-gradient(135deg, var(--nacte-primary), var(--nacte-green));
    color: #ffffff;
    padding: 1rem 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--nacte-light);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chat-bubble {
    max-width: 80%;
    padding: 0.6rem 0.9rem;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--nacte-primary);
    color: #ffffff;
    border-bottom-right-radius: 3px;
}

.chat-bubble.bot {
    align-self: flex-start;
    background: #ffffff;
    color: var(--nacte-ink);
    border: 1px solid rgba(13, 33, 55, 0.08);
    border-bottom-left-radius: 3px;
}

/* ===== Footer ===== */
.footer-main {
    background: var(--nacte-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3.5rem 0 2rem;
}

.footer-main h5,
.footer-main h6 {
    color: #ffffff;
}

.footer-main a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.footer-main a:hover {
    color: var(--nacte-gold);
}

.footer-bottom {
    background: #071626;
    color: rgba(255, 255, 255, 0.55);
    padding: 1rem 0;
    font-size: 0.85rem;
    text-align: center;
}

/* ===== Inner-page Hero ===== */
.page-hero {
    background: linear-gradient(135deg, var(--nacte-dark) 0%, var(--nacte-primary) 100%);
    color: #ffffff;
    padding: 3rem 0;
}

.page-hero h1 {
    color: #ffffff;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.page-hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.75);
}

.page-hero .breadcrumb-item.active {
    color: var(--nacte-gold-light);
}

/* ===== Tables ===== */
.nacte-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.nacte-table th {
    background: var(--nacte-primary);
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
}

.nacte-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(13, 33, 55, 0.08);
}

.nacte-table tbody tr:nth-child(even) {
    background: var(--nacte-light);
}

.nacte-table tbody tr:hover {
    background: var(--nacte-gold-light);
    transition: var(--transition);
}

/* ===== Level Badges =====
   One swatch per AccreditationLevels row (15 rows) plus the CheckStatus page's synthetic
   "Under Review" (no level assigned yet — AccreditationLevelId is null). Grouped by meaning:
   W/X/Y/Z/Zero are the actual awarded levels (unchanged, brand colors); teal/sky/slate are
   active in-progress states; red/maroon/rose are refused/rejected outcomes; the two grays are
   closed/withdrawn, administratively over rather than refused. */
.badge-level-w,
.badge-level-x,
.badge-level-y,
.badge-level-z,
.badge-level-zero,
.badge-level-underprocess,
.badge-level-underreview,
.badge-level-pilot,
.badge-level-appeal,
.badge-level-deferred,
.badge-level-notaccredited,
.badge-level-notallowed,
.badge-level-refused,
.badge-level-refusedzero,
.badge-level-closed,
.badge-level-withdraw {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.badge-level-w {
    background: #2f7cc9;
}

.badge-level-x {
    background: var(--nacte-green);
}

.badge-level-y {
    background: var(--nacte-gold);
    color: var(--nacte-dark);
}

.badge-level-z {
    background: #7d4fb8;
}

.badge-level-zero {
    background: #c9701f;
}

/* Active / in-progress states */
.badge-level-underprocess {
    background: #0d9488;
}

.badge-level-underreview {
    background: #64748b;
}

.badge-level-pilot {
    background: #0ea5e9;
}

.badge-level-appeal {
    background: #a16207;
}

/* Postponed, not yet a refusal */
.badge-level-deferred {
    background: #94a3b8;
    color: var(--nacte-dark);
}

/* Refused / rejected outcomes */
.badge-level-notaccredited {
    background: #dc2626;
}

.badge-level-notallowed {
    background: #991b1b;
}

.badge-level-refused {
    background: #7f1d1d;
}

.badge-level-refusedzero {
    background: #be123c;
}

/* Administratively over — closed or withdrawn, not refused */
.badge-level-closed {
    background: #44403c;
}

.badge-level-withdraw {
    background: #78716c;
}

/* ===== Validation ===== */
.validation-summary-valid {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-card:not(:last-child)::after {
        display: none;
    }

    .chat-window {
        width: 320px;
        right: 12px;
        bottom: 88px;
    }

    .chat-toggle-btn {
        right: 16px;
        bottom: 16px;
    }

    .back-to-top-btn {
        right: 16px;
        bottom: 88px;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .urgent-banner {
        animation: none;
    }

    .process-card,
    .feature-card,
    .level-card,
    .chat-toggle-btn,
    .back-to-top-btn {
        transition: none;
    }

    .process-card:hover,
    .feature-card:hover,
    .level-card:hover {
        transform: none;
    }
}
