/*
 * Lectern Core Styles
 * Shared design system for all pages
 */

/* Font fallbacks: Adobe Garamond Pro → Georgia, Benton Sans → Arial */

/* Benton Sans font-face declarations (per brand style guide) */
@font-face {
    font-family: 'Benton Sans';
    src: url('../fonts/BentonSans Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Benton Sans';
    src: url('../fonts/BentonSans Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Benton Sans';
    src: url('../fonts/BentonSans Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ========== CSS VARIABLES ========== */
:root {
    /* Aquinas Primary Colors */
    --primary-color: #a21f35;
    --primary-dark: #7F1F1F;
    --secondary-color: #FFC222;
    --black: #000000;

    /* Aquinas Secondary Colors */
    --olive: #a2a569;
    --teal: #106470;
    --gray: #8A8B8C;

    /* Application Colors */
    --text-dark: #231F20;
    --text-light: #ffffff;
    --background: #f8f9fa;
    --card-background: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Benton Sans', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* ========== TYPOGRAPHY ========== */
/* Titles: Adobe Garamond Pro, uppercase, wide tracking */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Adobe Garamond Pro', Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; color: var(--text-dark); }
h4 { font-size: 1.1rem; color: var(--text-dark); }

/* ========== BUTTONS: Minimal Text → Outline on Hover ========== */
.btn-f {
    padding: 0.4rem 0.75rem;
    background: none;
    border: 2px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-f.gold { color: #b8860b; }
.btn-f.teal { color: var(--teal); }
.btn-f.olive { color: #7a7d4e; }
.btn-f.red { color: var(--primary-color); }

.btn-f.gold:hover { border-color: var(--secondary-color); }
.btn-f.teal:hover { border-color: var(--teal); }
.btn-f.olive:hover { border-color: var(--olive); }
.btn-f.red:hover { border-color: var(--primary-color); }

/* ========== HEADER ========== */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    padding: 0.5rem 2rem;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 1.25rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    height: 5rem;
    width: auto;
}

.logo h1 {
    font-size: 2.2rem;
    color: var(--text-light);
}

/* ========== USER HEADER BAR ========== */
.user-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--background);
    border-bottom: 1px solid #e9ecef;
}

.user-header .user-info {
    flex: 1;
}

.user-header .admin-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

/* ========== LAYOUT ========== */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ========== PAGE ELEMENTS ========== */
.page-title {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.breadcrumb {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.section-divider {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 3rem 0;
}

/* ========== SECTION PANELS (Outlined Style) ========== */
.section-panel {
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    position: relative;
}

.section-panel.teal-outline { border-color: var(--teal); }
.section-panel.gold-outline { border-color: var(--secondary-color); }
.section-panel.gray-outline { border-color: var(--gray); }
.section-panel.red-outline { border-color: var(--primary-color); }

.section-panel > h3 {
    position: absolute;
    top: -0.7rem;
    left: 1.5rem;
    background: var(--background);
    padding: 0 0.75rem;
    font-size: 1rem;
}

.section-panel h3.teal-title { color: var(--teal); }
.section-panel h3.gold-title { color: #b8860b; }
.section-panel h3.gray-title { color: var(--gray); }
.section-panel h3.red-title { color: var(--primary-color); }

/* ========== GRIDS ========== */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* ========== UNIFIED CARD SYSTEM ========== */
/*
 * Standard card proportions:
 * - Header: 0.75rem 1.25rem padding (compact colored section)
 * - Body: 1.25rem padding (white section with content)
 * - Border-radius: 12px on card, 0 on header/body
 * - Buttons: always bottom-right with gap 0.5rem
 */

/* Base card structure */
.card-base {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.card-base:hover {
    border-color: #d1d5db;
}

/* Standard card header (compact) */
.card-header {
    padding: 0.75rem 1.25rem;
}

/* Standard card body */
.card-body {
    padding: 1.25rem;
    background: white;
}

/* Card footer for buttons - always bottom right */
.card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Header color variants */
.card-header.teal-bg {
    background: rgba(16, 100, 112, 0.12);
}

.card-header.gold-bg {
    background: rgba(255, 194, 34, 0.15);
}

.card-header.gray-bg {
    background: rgba(138, 139, 140, 0.10);
}

.card-header.red-bg {
    background: rgba(162, 31, 53, 0.08);
}

/* Header label text */
.card-header-label {
    font-family: 'Adobe Garamond Pro', Georgia, serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
}

.card-header-label.teal { color: var(--teal); }
.card-header-label.gold { color: #8b6914; }
.card-header-label.gray { color: var(--gray); }
.card-header-label.red { color: var(--primary-color); }

/* ========== MODULE CARDS ========== */
.module-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.module-card:hover {
    border-color: #d1d5db;
}

.module-card-header {
    padding: 1rem 1.25rem;
    height: 7rem;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.module-card-header.teal-bg {
    background: rgba(16, 100, 112, 0.12);
}

.module-card-header.gold-bg {
    background: rgba(255, 194, 34, 0.15);
}

.module-card-header.gray-bg {
    background: rgba(138, 139, 140, 0.10);
}

.module-card-header.red-bg {
    background: rgba(162, 31, 53, 0.08);
}

.module-card-header h4 {
    font-size: 1rem;
    margin: 0;
}

.module-card-header .card-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

.module-card-body {
    padding: 1.25rem;
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Card actions - buttons aligned bottom right */
.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ========== CONTENT CARDS ========== */
.content-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 1rem;
}

.content-card-header {
    padding: 0.75rem 1.25rem;
}

.content-card-header.gray-bg {
    background: rgba(138, 139, 140, 0.10);
}

.content-card-header.teal-bg {
    background: rgba(16, 100, 112, 0.12);
}

.content-card-header.gold-bg {
    background: rgba(255, 194, 34, 0.15);
}

.content-card-header.red-bg {
    background: rgba(162, 31, 53, 0.08);
}

.content-card-body {
    padding: 1.25rem;
}

/* ========== LIST ITEMS ========== */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
}

.list-item:last-child {
    margin-bottom: 0;
}

.list-item:hover {
    border-color: #d1d5db;
    background: #fafafa;
}

.list-item.teal-accent {
    border-left: 3px solid var(--teal);
}

.list-item.gold-accent {
    border-left: 3px solid var(--secondary-color);
}

.list-item.red-accent {
    border-left: 3px solid var(--primary-color);
}

/* ========== RESOURCE CARDS ========== */
.resource-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.resource-card:hover {
    border-color: #d1d5db;
}

.resource-card.red-accent {
    border-left: 3px solid var(--primary-color);
}

/* ========== STATUS BADGES ========== */
.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: none;
}

.status-complete {
    background: rgba(40, 167, 69, 0.12);
    color: #1e7e34;
}

.status-incomplete {
    background: rgba(162, 31, 53, 0.12);
    color: #a21f35;
}

.status-inprogress {
    background: rgba(255, 194, 34, 0.12);
    color: #8b6914;
}

/* ========== PROGRESS BAR ========== */
.progress-bar {
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: var(--teal);
    width: 50%;
    transition: width 0.3s ease;
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: var(--text-dark);
}

.form-group textarea,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: 0.01em;
    transition: border-color 0.3s ease;
}

.form-group textarea::placeholder,
.form-group input::placeholder {
    color: #9ca3af;
    letter-spacing: 0.01em;
}

.form-group textarea:focus,
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Helper text below form fields */
.helper-text {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    letter-spacing: 0.01em;
}

/* ========== MODAL ========== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5% 1rem;
    overflow-y: auto;
}

.modal-content {
    background: white;
    max-width: 600px;
    width: 100%;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-color);
}

/* ========== DECORATIVE ========== */
.decorative-cross {
    position: fixed;
    right: -25vh;
    bottom: -25vh;
    width: 90vh;
    height: 90vh;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

/* ========== TABLES ========== */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    letter-spacing: 0.01em;
}

th {
    font-weight: 500;
    background: #f8f9fa;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6b7280;
}

td {
    font-size: 0.95rem;
}

/* ========== SECONDARY TEXT ========== */
.text-muted {
    color: #9ca3af;
}

.text-secondary {
    color: #6b7280;
}

/* ========== NOTICES & ALERTS ========== */
.notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* ========== PROGRESS TEXT ========== */
.progress-text {
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
}
