/*
 * FJMU Examinations Portal - shared public styles (layouts/public.blade.php).
 * Results use maroon, notices use navy, important notices use amber.
 * Page-specific styles live in each view's @push('styles').
 */

:root {
    --results: #8b0000;
    --results-dark: #6e0000;
    --results-soft: #fdf0f0;
    --notices: #1e3a8a;
    --notices-dark: #172e6e;
    --notices-soft: #eef2fb;
    --important: #b45309;
    --important-soft: #fff7e6;
    --important-line: #f6c26b;
    --ink: #1a202c;
    --muted: #5a6474;
    --line: #e3e7ee;
    --bg: #f5f6f9;
    --card: #ffffff;
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
}

.page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
    flex: 1;
}

/* ---------- Header ---------- */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.site-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.brand img {
    width: 48px;
    height: auto;
    flex: none;
}

.brand strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--results);
    letter-spacing: 0.2px;
}

.brand small {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.main-nav a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
}

.main-nav a:hover {
    background: var(--bg);
    color: var(--ink);
}

.main-nav a.active {
    color: var(--results);
    background: var(--results-soft);
}

.main-nav a.nav-notices:hover,
.main-nav a.nav-notices.active {
    color: var(--notices);
    background: var(--notices-soft);
}

.nav-count {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    margin-left: 4px;
    border-radius: 999px;
    background: var(--notices);
    color: #fff;
    font-size: 0.7rem;
    line-height: 18px;
    text-align: center;
}

/* ---------- Important strip ---------- */

.alert-strip {
    background: var(--important-soft);
    border-bottom: 1px solid var(--important-line);
}

.alert-strip-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.alert-strip-inner + .alert-strip-inner {
    border-top: 1px dashed var(--important-line);
}

.alert-tag {
    flex: none;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    background: var(--important);
    padding: 3px 8px;
    border-radius: 6px;
}

.alert-strip p {
    flex: 1;
    min-width: 0;
    color: #5c3100;
}

.alert-strip .alert-link {
    flex: none;
    font-weight: 700;
    color: var(--important);
    text-decoration: none;
    white-space: nowrap;
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 48px;
    background: #1f2937;
    color: #cbd5e1;
    font-size: 0.88rem;
}

.site-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 16px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 24px;
}

.site-footer h2 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.site-footer a {
    color: #e2e8f0;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer ul {
    list-style: none;
}

.site-footer li {
    margin-bottom: 4px;
}

.copyright {
    border-top: 1px solid #334155;
    text-align: center;
    padding: 12px 16px;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* ---------- Shared bits ---------- */

.page-intro {
    padding: 32px 0 20px;
}

.page-intro h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.3px;
}

.page-intro p {
    color: var(--muted);
    margin-top: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    cursor: pointer;
    text-decoration: none;
}

.btn-results { background: var(--results); color: #fff; }
.btn-results:hover { background: var(--results-dark); }
.btn-notices { background: var(--notices); color: #fff; }
.btn-notices:hover { background: var(--notices-dark); }
.btn-dark { background: #1f2937; color: #fff; }
.btn-light { background: #eef1f5; color: #2d3748; }
.btn-block { width: 100%; }

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2d3748;
}

.field input,
.field select,
.input {
    width: 100%;
    font: inherit;
    font-size: 0.95rem;
    padding: 11px 12px;
    border: 1px solid #cfd6e1;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
}

.field input:focus,
.field select:focus,
.input:focus {
    outline: 2px solid var(--results);
    outline-offset: 1px;
    border-color: transparent;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.flash {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.flash-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.section-head h2 {
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-head .dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--results);
}

.section-head p {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ---------- Homepage hub panels ---------- */

.hub {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.panel {
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 24px rgba(16, 24, 40, 0.07);
    background: var(--card);
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px;
    color: #fff;
}

.panel-results .panel-head { background: linear-gradient(135deg, var(--results) 0%, #a52a2a 100%); }
.panel-notices .panel-head { background: linear-gradient(135deg, var(--notices) 0%, #2f4fae 100%); }

.panel-icon {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-icon svg {
    width: 24px;
    height: 24px;
}

.panel-head h2 {
    font-size: 1.25rem;
    font-weight: 800;
}

.panel-head p {
    font-size: 0.88rem;
    opacity: 0.88;
}

.panel-body {
    padding: 22px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.panel-foot-link {
    margin-top: auto;
    padding-top: 16px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.panel-results .panel-foot-link { color: var(--results); }
.panel-notices .panel-foot-link { color: var(--notices); }
.panel-foot-link:hover { text-decoration: underline; }

.form-hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 10px;
}

.panel-empty {
    color: var(--muted);
    font-size: 0.92rem;
    padding: 8px 0;
}

/* ---------- Notice board (dated list) ---------- */

.board {
    list-style: none;
}

.board li + li {
    border-top: 1px solid var(--line);
}

.board a {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    padding: 12px 0;
    text-decoration: none;
}

.board a:hover .board-title {
    color: var(--notices);
    text-decoration: underline;
}

.date-block {
    border: 1px solid #d5ddef;
    border-radius: 10px;
    text-align: center;
    padding: 4px 0 5px;
    background: var(--notices-soft);
    color: var(--notices);
    line-height: 1.1;
    align-self: start;
}

.date-block b {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
}

.date-block span {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.board-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 3px;
}

.board-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
}

.board-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 2px;
}

/* Category / status tags, shared by the board and notice cards */
.tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 5px;
}

.tag-date_sheet { background: #e4ebfb; color: var(--notices); }
.tag-notification { background: #eceff4; color: #3f4a5a; }
.tag-admission_form { background: #e7f5ee; color: #19734a; }
.tag-syllabus { background: #f1ebfb; color: #5b3a9a; }
.tag-general { background: #eceff4; color: #3f4a5a; }
.tag-important { background: var(--important); color: #fff; }
.tag-new { background: #fde8e8; color: var(--results); }

/* ---------- Programs ---------- */

.section {
    padding-top: 40px;
}

.program-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.group {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 18px 8px;
}

.group h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    margin-bottom: 8px;
}

.group ul {
    list-style: none;
}

.group li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
}

.group li:first-child a {
    border-top: none;
}

.group li a:hover {
    color: var(--results);
}

.code-badge {
    flex: none;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--results);
    background: var(--results-soft);
    padding: 2px 7px;
    border-radius: 5px;
}

.group-subhead {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2d3748;
    margin: 6px 0 2px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 12px;
}

.chips a {
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    background: #fafbfc;
}

.chips a:hover {
    border-color: var(--results);
    color: var(--results);
}

/* ---------- Verify band ---------- */

.verify-band {
    margin-top: 40px;
    background: #fff;
    border: 1px dashed #c7cfdb;
    border-radius: var(--radius);
    padding: 22px 24px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: center;
}

.verify-band h2 {
    font-size: 1.1rem;
    font-weight: 800;
}

.verify-band p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 2px;
}

.verify-band form {
    display: flex;
    gap: 10px;
}

.verify-band .input {
    flex: 1;
    min-width: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---------- Notice cards (notices listing, related notices) ---------- */

.notice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.notice-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--notices);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.notice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.12);
}

.notice-card.pinned {
    border-top-color: var(--important);
    background: linear-gradient(180deg, var(--important-soft) 0%, #fff 60%);
}

.notice-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.notice-meta {
    font-size: 0.82rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.notice-link {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--notices);
}

.empty-box {
    background: #fff;
    border-radius: 14px;
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
}

.empty-box h2 {
    font-size: 1.1rem;
    color: var(--ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .hub,
    .program-groups,
    .verify-band,
    .site-footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .brand img { width: 40px; }
    .brand strong { font-size: 0.95rem; }
    .main-nav { width: 100%; }
    .main-nav { gap: 2px; }
    .main-nav a { padding: 7px 8px; font-size: 0.84rem; }
    .nav-long { display: none; }
    .alert-strip-inner { flex-wrap: wrap; gap: 6px 10px; }
    .alert-strip p { flex-basis: 100%; order: 2; }
    .alert-strip .alert-link { order: 3; }
    .panel-head, .panel-body { padding-left: 18px; padding-right: 18px; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .verify-band { padding: 18px; }
    .verify-band form { flex-direction: column; }
    .notice-grid { grid-template-columns: 1fr; }
}
