/* SCCC Staff Directory - Matching sccc.edu design */

:root {
    /* SCCC Brand Colors */
    --sccc-green: #046738;
    --sccc-green-dark: #034a28;
    --sccc-green-light: #0b6d3c;
    --sccc-gold: #f9b625;
    --sccc-gold-dark: #e5a51f;
    
    /* Text Colors */
    --primary-text: #111;
    --text-dark: #1f1f1f;
    --text-light: #666;
    
    /* Table Colors (from user specs) */
    --head-bg: #d9edf7;
    --head-text: #111;
    --odd-row-bg: #fff;
    --even-row-bg: #f9f9f9;
    --hover-bg: #f3f3f3;
    --border-color: #ddd;
    --head-active-bg: #049cdb;
    --head-active-text: #111;
    --sort-arrow-color: #111;
    
    /* Layout Colors */
    --bg-light: #f5f5f5;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body { 
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
    color: var(--primary-text);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Slab', Georgia, serif;
    font-weight: 600;
}

a {
    color: var(--sccc-green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========== HEADER STYLES ========== */

.site-header {
    position: relative;
    z-index: 100;
}

/* Top Bar */
.top-bar {
    background-color: var(--text-dark);
    padding: 8px 0;
}

.top-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.top-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.top-nav ul li a {
    color: var(--white);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.top-nav ul li a:hover {
    color: var(--sccc-gold);
    text-decoration: none;
}

.mysaints-btn {
    background-color: var(--sccc-gold);
    color: var(--text-dark) !important;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.mysaints-btn:hover {
    background-color: var(--sccc-gold-dark);
    text-decoration: none;
}

/* Main Header */
.main-header {
    background: linear-gradient(135deg, var(--sccc-green) 0%, var(--sccc-green-light) 100%);
    padding: 15px 0;
}

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

.logo-link {
    display: block;
}

.site-logo {
    height: 50px;
    width: auto;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.main-nav ul li a {
    color: var(--white);
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--white);
    transition: width 0.3s;
}

.main-nav ul li a:hover {
    text-decoration: none;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

/* ========== PAGE HEADER ========== */

.page-header {
    background-color: var(--sccc-green);
    padding: 30px 20px;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin: 0;
    font-size: 2.2em;
    font-weight: 700;
}

/* ========== MAIN CONTENT ========== */

.site-main {
    min-height: calc(100vh - 400px);
}

.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ========== DIRECTORY LAYOUT ========== */

.directory-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

/* Sidebar Styling */
.filter-sidebar {
    background-color: var(--white);
    padding: 20px;
    border-radius: 4px;
    height: fit-content;
    border: 1px solid var(--border-color);
}

.filter-sidebar h2 {
    color: var(--sccc-green);
    font-size: 1.2em;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sccc-green);
}

.filter-sidebar h3 {
    color: var(--primary-text);
    font-size: 1em;
    margin: 20px 0 10px 0;
}

.search-form input, .search-form button {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
}

.search-form input { 
    border: 1px solid var(--border-color);
    color: var(--primary-text);
}

.search-form input:focus {
    outline: none;
    border-color: var(--sccc-green);
}

.search-form button {
    background-color: var(--sccc-green);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.2s;
}

.search-form button:hover { 
    background-color: var(--sccc-green-dark);
}

.clear-filters {
    display: block;
    text-align: center;
    padding: 8px 12px;
    margin-bottom: 15px;
    background-color: var(--even-row-bg);
    color: var(--primary-text);
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.clear-filters:hover {
    background-color: var(--hover-bg);
    text-decoration: none;
}

.department-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.department-list li {
    margin-bottom: 2px;
}

.department-list a {
    display: block;
    padding: 6px 10px;
    color: var(--primary-text);
    border-radius: 4px;
    font-size: 0.9em;
    transition: all 0.15s;
}

.department-list a:hover {
    background-color: var(--hover-bg);
    text-decoration: none;
}

.department-list a.active {
    background-color: var(--sccc-green);
    color: var(--white);
    font-weight: 700;
}

/* ========== TABLE STYLES ========== */

.results-main {
    padding: 0;
}

.result-count {
    font-size: 1em;
    color: var(--text-light);
    margin-bottom: 15px;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--white);
}

.directory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.directory-table thead {
    background-color: var(--head-bg);
}

.directory-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--head-text);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    font-family: 'Lato', sans-serif;
}

.directory-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.directory-table th.sortable:hover {
    background-color: var(--hover-bg);
}

.directory-table th.active {
    background-color: var(--head-active-bg);
    color: var(--head-active-text);
}

/* Sort Arrows */
.sort-arrow {
    display: inline-block;
    margin-left: 5px;
    color: var(--sort-arrow-color);
}

.directory-table th.sortable .sort-arrow::after {
    content: '\2195';
    opacity: 0.4;
}

.directory-table th.sortable.asc .sort-arrow::after {
    content: '\2191';
    opacity: 1;
}

.directory-table th.sortable.desc .sort-arrow::after {
    content: '\2193';
    opacity: 1;
}

.directory-table th.active .sort-arrow {
    color: var(--head-active-text);
}

/* Table Rows */
.directory-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-text);
}

.directory-table tbody tr:nth-child(odd) {
    background-color: var(--odd-row-bg);
}

.directory-table tbody tr:nth-child(even) {
    background-color: var(--even-row-bg);
}

.directory-table tbody tr:hover {
    background-color: var(--hover-bg);
}

.directory-table td {
    padding: 10px;
    vertical-align: middle;
}

/* Column widths */
.directory-table th:nth-child(1),
.directory-table td:nth-child(1) {
    width: 14%;
}

.directory-table th:nth-child(2),
.directory-table td:nth-child(2) {
    width: 22%;
}

.directory-table th:nth-child(3),
.directory-table td:nth-child(3) {
    width: 18%;
}

.directory-table th:nth-child(4),
.directory-table td:nth-child(4) {
    white-space: nowrap;
    width: 15%;
}

.directory-table th:nth-child(5),
.directory-table td:nth-child(5) {
    width: 8%;
}

.directory-table th:nth-child(6),
.directory-table td:nth-child(6) {
    width: 23%;
}

.directory-table .name-cell {
    font-weight: 600;
    color: var(--sccc-green);
}

/* Contact Links */
.contact-link {
    color: var(--sccc-green);
}

.contact-link:hover {
    color: var(--sccc-green-dark);
}

/* No Results */
.no-results {
    padding: 40px;
    text-align: center;
    color: var(--text-light);
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Person Name Link */
.person-name-link {
    color: var(--sccc-green);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.person-name-link:hover {
    color: var(--sccc-green-dark);
    text-decoration: underline;
}

/* ========== CONTACT CARD MODAL ========== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-card-modal {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    margin: 20px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
    overflow: hidden;
}

.modal-overlay.active .contact-card-modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--white);
    transition: background-color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.card-header-section {
    background: linear-gradient(135deg, var(--sccc-green) 0%, var(--sccc-green-light) 100%);
    padding: 30px 25px;
    text-align: center;
    color: var(--white);
}

.card-avatar {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 3px solid var(--sccc-gold);
}

.card-avatar i {
    font-size: 36px;
    color: var(--white);
}

.card-name-info h2 {
    margin: 0 0 8px 0;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--white);
}

.card-title {
    margin: 0 0 5px 0;
    font-size: 1em;
    opacity: 0.95;
}

.card-department {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.15);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 8px;
}

.card-contact-section {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    width: 20px;
    text-align: center;
    color: var(--sccc-green);
    font-size: 16px;
}

.contact-item a,
.contact-item span {
    color: var(--primary-text);
    font-size: 0.95em;
}

.contact-item a:hover {
    color: var(--sccc-green);
}

.card-actions {
    padding: 20px 25px;
    display: flex;
    gap: 12px;
    background-color: var(--bg-light);
}

.card-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.card-btn-primary {
    background-color: var(--sccc-green);
    color: var(--white);
}

.card-btn-primary:hover {
    background-color: var(--sccc-green-dark);
    text-decoration: none;
}

.card-btn-secondary {
    background-color: var(--white);
    color: var(--sccc-green);
    border: 2px solid var(--sccc-green);
}

.card-btn-secondary:hover {
    background-color: var(--sccc-green);
    color: var(--white);
    text-decoration: none;
}

/* ========== FOOTER STYLES ========== */

.site-footer {
    background-color: var(--text-dark);
    color: var(--white);
    margin-top: 40px;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-section h3 {
    color: var(--sccc-gold);
    font-size: 1.1em;
    margin: 0 0 15px 0;
    font-family: 'Roboto Slab', serif;
}

.footer-section p {
    margin: 0 0 10px 0;
    font-size: 0.95em;
    color: #ccc;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ccc;
    font-size: 0.95em;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: var(--sccc-gold);
    text-decoration: none;
}

.footer-section a {
    color: #ccc;
}

.footer-section a:hover {
    color: var(--sccc-gold);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    transition: all 0.2s;
}

.social-icons a:hover {
    background-color: var(--sccc-gold);
    color: var(--text-dark);
}

.footer-bottom {
    background-color: rgba(0,0,0,0.2);
    padding: 15px 20px;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9em;
    color: #999;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .directory-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .directory-table {
        font-size: 0.85em;
    }
    
    .directory-table th,
    .directory-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 768px) {
    .top-nav ul {
        display: none;
    }
    
    .header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .main-nav ul li a {
        font-size: 14px;
    }
    
    .page-header h1 {
        font-size: 1.8em;
    }
    
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}
