/* ═══════════════════════════════════════════
   Utah Tech University - Document Upload
   Matches utahtech.edu brand styles
   ═══════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Source Sans 3', 'Source Sans Pro', Arial, Helvetica, sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: #ba1c21; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Global focus indicator for keyboard users */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid #002e5d;
    outline-offset: 2px;
}

/* Screen reader only utility */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

img { max-width: 100%; height: auto; }


/* ═══════════════════════════════════════════
   HEADER  (matches utahtech.edu)
   ═══════════════════════════════════════════ */
.header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    position: relative;
    z-index: 100;
}

.skip-button {
    position: absolute;
    top: -100px;
    left: 0;
    background: #ba1c21;
    color: #fff;
    padding: 8px 16px;
    z-index: 200;
}
.skip-button:focus { top: 0; }

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 85px; width: auto; }

/* Universal nav area */
.universal_nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: 1;
    margin: 0 20px;
}

/* Supplemental menu (Apply Online, Student Resources) */
.supplimental_menu {
    display: flex;
    gap: 20px;
}
.supplimental_menu a {
    font-size: 16px;
    color: #333;
    text-decoration: underline;
    font-weight: 600;
}
.supplimental_menu a:hover { color: #ba1c21; }

/* Desktop primary nav */
.header-nav-desktop {
    display: flex;
    gap: 32px;
}
.header-nav-desktop a {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #002e5d;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}
.header-nav-desktop a:hover {
    border-bottom-color: #ba1c21;
    text-decoration: none;
}

/* Search & My UT area */
.header-search-container {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

/* Skew button style (My UT) */
.ekr-button {
    display: inline-block;
    background: #ba1c21;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
}
.ekr-skew {
    transform: skewX(-12deg);
}
.ekr-skew-inner {
    display: inline-block;
    transform: skewX(12deg);
    padding: 12px 24px;
}
.ekr-button:hover { background: #9a0a1a; }

/* Search button */
.search {
    background: #e0e0e0;
    cursor: pointer;
}
.search .ekr-skew-inner { padding: 10px 14px; }
.search button {
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
}
.search:hover { background: #ccc; }

/* Mobile nav */
.header-nav-mobile { display: none; }
.header-nav-mobile-trigger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.header-nav-mobile-trigger span {
    display: block;
    width: 24px;
    height: 3px;
    background: #002e5d;
    border-radius: 2px;
    transition: 0.3s;
}
.header-nav-mobile-trigger.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.header-nav-mobile-trigger.is-active span:nth-child(2) { opacity: 0; }
.header-nav-mobile-trigger.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

.header-nav-mobile-menu {
    display: none;
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 16px 24px;
}
.header-nav-mobile-menu.is-open { display: block; }
.header-nav-mobile-menu ul { list-style: none; }
.header-nav-mobile-menu li { border-bottom: 1px solid #eee; }
.header-nav-mobile-menu a {
    display: block;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #002e5d;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}


/* ═══════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════ */
.breadcrumbs-inner {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
    font-size: 15px;
}
.breadcrumbs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 8px;
    color: #666;
}
.breadcrumbs-container a { color: #545454; text-decoration: none; }
.breadcrumbs-container a:hover { text-decoration: underline; }
.breadcrumbs-container .sep { color: #767676; }
.logout-link {
    margin-left: auto;
    color: #545454 !important;
    font-size: 14px;
    font-weight: 600;
}
.logout-link:hover { color: #ba1c21 !important; }


/* ═══════════════════════════════════════════
   PAGE CONTENT
   ═══════════════════════════════════════════ */
.page-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 36px;
}
.page-hero .subtitle {
    font-size: 24px;
    font-weight: 600;
    color: #002e5d;
    margin-bottom: 6px;
}
.page-hero h1 {
    font-size: 42px;
    font-weight: 700;
    color: #002e5d;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
}
.accent-bar {
    width: 40px;
    height: 4px;
    background: #ba1c21;
    margin-top: 12px;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 60px;
}


/* ═══════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════ */
.alert {
    padding: 14px 20px;
    border-radius: 4px;
    margin-bottom: 24px;
    font-size: 15px;
    font-weight: 600;
}
.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}
.alert-error {
    background: #fce4ec;
    color: #c62828;
    border-left: 4px solid #c62828;
}
.alert-warning {
    background: #fff8e1;
    color: #b35c00;
    border-left: 4px solid #b35c00;
}


/* ═══════════════════════════════════════════
   UPLOAD CARD
   ═══════════════════════════════════════════ */
.upload-card {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 36px;
    margin-bottom: 40px;
}
.upload-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #002e5d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

/* Form fields */
.form-field {
    margin-bottom: 20px;
}
.form-field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #002e5d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.form-field input[type="date"] {
    font-family: inherit;
    font-size: 15px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
}
.form-field input[type="date"]:focus {
    border-color: #002e5d;
}

/* Drop zone */
.drop-zone {
    border: 2px dashed #c0c0c0;
    border-radius: 6px;
    background: #fff;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 20px;
}
.drop-zone:hover,
.drop-zone.dragover {
    border-color: #ba1c21;
    background: #fef7f8;
}
.drop-zone-icon {
    font-size: 48px;
    color: #002e5d;
    margin-bottom: 12px;
}
.drop-zone p {
    font-size: 16px;
    color: #555;
    margin-bottom: 4px;
}
.drop-zone .hint {
    font-size: 15px;
    color: #595959;
}

/* File counter */
#fileCounter {
    display: none;
    font-size: 14px;
    color: #002e5d;
    font-weight: 600;
    margin-bottom: 12px;
}

/* File preview list */
.file-list-preview {
    list-style: none;
    margin-bottom: 20px;
}
.file-list-preview li {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 15px;
}
.file-list-preview .file-icon {
    color: #002e5d;
    margin-right: 10px;
    font-size: 16px;
    flex-shrink: 0;
}
.file-list-preview .file-name {
    color: #002e5d;
    font-weight: 600;
    word-break: break-all;
    flex: 1;
}
.file-list-preview .file-size {
    color: #595959;
    font-size: 14px;
    white-space: nowrap;
    margin-left: 12px;
}
.file-list-preview .remove-btn {
    background: none;
    border: none;
    color: #ba1c21;
    font-size: 16px;
    cursor: pointer;
    padding: 10px 12px;
    margin-left: 8px;
    border-radius: 3px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.file-list-preview .remove-btn:hover {
    background: #fce4ec;
}

/* Upload button */
.btn-upload {
    display: inline-block;
    background: #ba1c21;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 36px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-upload:hover { background: #9a0a1a; }
.btn-upload:disabled {
    background: #ccc;
    cursor: not-allowed;
}


/* ═══════════════════════════════════════════
   UPLOADED FILES GRID
   ═══════════════════════════════════════════ */
.section-heading {
    font-size: 28px;
    font-weight: 700;
    color: #ba1c21;
    margin-bottom: 20px;
}

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

.file-card {
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.file-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.file-card-header {
    background: #e8e8e8;
    padding: 14px 18px;
    font-weight: 700;
    color: #002e5d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}
.file-card-body {
    padding: 18px;
}
.file-card-body .file-meta {
    font-size: 15px;
    color: #545454;
    margin-bottom: 12px;
}
.file-card-body a.file-link {
    color: #ba1c21;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
    word-break: break-all;
}
.file-card-body a.file-link:hover { text-decoration: underline; }

.delete-form { display: inline; }
.delete-btn {
    background: none;
    border: none;
    color: #ba1c21;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    padding: 8px 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.delete-btn:hover { text-decoration: underline; }

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #595959;
    font-size: 16px;
}


/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */
.file-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    min-height: 44px;
    font-size: 15px;
    font-weight: 600;
    color: #002e5d;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s;
}
.page-link:hover {
    background: #e8e8e8;
    text-decoration: none;
}
.page-link.active {
    background: #ba1c21;
    color: #fff;
    border-color: #ba1c21;
}


/* ═══════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.filter-bar label {
    font-size: 14px;
    font-weight: 700;
    color: #002e5d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-bar select {
    font-family: inherit;
    font-size: 15px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    background: #fff;
    cursor: pointer;
}
.filter-bar select:focus {
    border-color: #002e5d;
}


/* ═══════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    padding: 24px;
}
.login-card {
    background: #fff;
    border-radius: 6px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}
.login-header {
    margin-bottom: 24px;
}
.login-card h1 {
    font-size: 22px;
    font-weight: 700;
    color: #002e5d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.login-card > p {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}
.login-field {
    text-align: left;
    margin-bottom: 20px;
}
.login-field label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #002e5d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.login-field input {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
}
.login-field input:focus {
    border-color: #002e5d;
}


/* ═══════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.is-open {
    display: flex;
}
.modal {
    background: #fff;
    border-radius: 6px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
.modal h3 {
    font-size: 20px;
    font-weight: 700;
    color: #002e5d;
    margin-bottom: 12px;
}
.modal p {
    font-size: 15px;
    color: #555;
    margin-bottom: 24px;
    line-height: 1.5;
}
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.btn-cancel {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
}
.btn-cancel:hover { background: #f5f5f5; }
.btn-confirm {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    background: #ba1c21;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}
.btn-confirm:hover { background: #9a0a1a; }


/* ═══════════════════════════════════════════
   TRUSTEES PAGE  (Agendas & Minutes layout)
   ═══════════════════════════════════════════ */
.year-heading {
    font-size: 28px;
    font-weight: 700;
    color: #ba1c21;
    margin: 40px 0 20px;
}
.year-heading:first-of-type {
    margin-top: 0;
}

.trustees-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.trustees-card {
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.trustees-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.trustees-card-date {
    background: #e8e8e8;
    padding: 16px 18px;
    font-weight: 700;
    color: #002e5d;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.trustees-card-body {
    padding: 20px 18px 24px;
}
.trustees-card-body a {
    display: flex;
    color: #ba1c21;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
}
.truncate-name {
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}
.trustees-card-body a:hover {
    text-decoration: underline;
}

@media (max-width: 960px) {
    .trustees-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .trustees-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════
   FOOTER  (matches utahtech.edu)
   ═══════════════════════════════════════════ */
footer {
    border-top: 4px solid #ba1c21;
    background: #f5f5f5;
    margin-top: 20px;
}

.footer-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 32px;
}
.footer-top-content {
    display: flex;
    justify-content: space-between;
    gap: 32px;
}
.footer-top-content > .nav {
    flex: 1;
}
.footer-top-content > .nav > ul.menu {
    list-style: none;
    display: flex;
    gap: 40px;
}
.footer-top-content > .nav > ul.menu > li {
    flex: 1;
}
.footer-top-content h2 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #002e5d;
    margin-bottom: 12px;
}
.footer-top-content .sub-menu {
    list-style: none;
}
.footer-top-content .sub-menu li {
    margin-bottom: 4px;
}
.footer-top-content .sub-menu a {
    font-size: 14px;
    color: #ba1c21;
    text-decoration: none;
}
.footer-top-content .sub-menu a:hover { text-decoration: underline; }

/* Footer social */
.footer-social {
    flex-shrink: 0;
    min-width: 180px;
}
.footer-social h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #002e5d;
    margin-bottom: 12px;
}
.social-icons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}
.social-link img { display: block; }
.footer-social ul {
    list-style: none;
}
.footer-social ul li { margin-bottom: 4px; }
.footer-social ul a {
    font-size: 14px;
    color: #ba1c21;
}
.footer-social .apply-btn {
    display: inline-block;
    padding: 8px 12px;
    background-color: #ba1c21;
    color: #fff !important;
    font-size: 14px;
    text-decoration: none !important;
}
.footer-social .apply-btn:hover { background: #9a0a1a; }

/* Footer fineprint */
.footer-fineprint {
    border-top: 1px solid #ddd;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #545454;
}
.footer-fineprint .nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.footer-fineprint ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.footer-fineprint a { color: #ba1c21; }


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 960px) {
    .header-nav-desktop { display: none; }
    .supplimental_menu { display: none; }
    .header-nav-mobile { display: block; }
    .header-nav-mobile-trigger { display: flex; }

    .header-inner {
        flex-wrap: wrap;
    }

    .universal_nav { display: none; }

    .page-hero h1 { font-size: 30px; }
    .upload-card { padding: 24px; }
    .files-grid { grid-template-columns: 1fr 1fr; }

    .footer-top-content { flex-direction: column; }
    .footer-top-content > .nav > ul.menu {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .files-grid { grid-template-columns: 1fr; }
    .logo img { height: 45px; }
    .page-hero { padding: 32px 16px 24px; }
    .main-content { padding: 0 16px 40px; }
    .page-hero h1 { font-size: 24px; }
}
