/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a3a52;
    --secondary-color: #2c5f7e;
    --accent-color: #8b7355;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.60)), 
                url('/images/site-header.jpg') center/cover no-repeat,
                white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

header.header-hidden {
    transform: translateY(-100%);
}

.header-content {
    padding: 2rem 0;
}

header h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

/* Navigation */
nav {
    margin-top: 1.5rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0;
}

.nav-menu li {
    display: inline-block;
}

.nav-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    background: var(--light-bg);
    border-radius: 8px;
    font-weight: 600;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Main Content */
main {
    background: white;
    min-height: calc(100vh - 400px);
    padding: 3rem 0;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 1200px;
}

/* Home Page */
.home-page {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.main-content-area {
    padding-right: 2rem;
}

.welcome-section h2 {
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.welcome-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.meetings-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.meetings-section h3 {
    margin-bottom: 1rem;
}

/* Sidebar */
.sidebar {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 1.25rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.quick-links,
.document-links {
    list-style: none;
}

.quick-links li,
.document-links li {
    margin-bottom: 0.75rem;
}

.quick-links a,
.document-links a {
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.quick-links a:hover,
.document-links a:hover {
    background: white;
    padding-left: 1rem;
    text-decoration: none;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* Members Page */
.members-page {
    max-width: 1100px;
    margin: 0 auto;
}

.search-form {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.filter-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.reset-btn,
.back-btn {
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover,
.back-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Members Table */
.members-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.members-table thead {
    background: var(--primary-color);
    color: white;
}

.members-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
}

.members-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.members-table tbody tr {
    transition: background-color 0.3s ease;
}

.members-table tbody tr:hover {
    background: var(--light-bg);
}

.member-button {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    text-align: left;
    padding: 0;
    transition: color 0.3s ease;
}

.member-button:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Member Detail Card */
.member-detail {
    max-width: 800px;
    margin: 0 auto;
}

.back-button-form {
    margin-bottom: 2rem;
}

.member-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.member-photo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.no-photo {
    width: 100%;
    height: 300px;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

.member-info h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.info-table {
    width: 100%;
}

.info-table td {
    padding: 0.5rem;
}

.info-table td.label {
    font-weight: 600;
    color: var(--primary-color);
    width: 150px;
}

/* Officers and Judges Page */
.officers-judges-page {
    max-width: 1100px;
    margin: 0 auto;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.officers-section h1,
.judges-section h1 {
    text-align: center;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.officer-card,
.judge-card {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.officer-card h2,
.judge-card h2 {
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.officer-content,
.judge-content {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
}

.officer-photo img,
.judge-photo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.officer-info table,
.judge-info table {
    width: 100%;
}

.officer-info td,
.judge-info td {
    padding: 0.4rem 0;
    font-size: 0.95rem;
}

.officer-info td:first-child,
.judge-info td:first-child {
    font-weight: 600;
    color: var(--primary-color);
    width: 120px;
}

/* Legal Links Page */
.legal-links-page {
    max-width: 900px;
    margin: 0 auto;
}

.legal-links-page h1 {
    text-align: center;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.link-category {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.link-category h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.link-category ul {
    list-style: none;
}

.link-category li {
    margin-bottom: 0.75rem;
}

.link-category a {
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.link-category a:hover {
    background: white;
    padding-left: 1rem;
    text-decoration: none;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

footer a {
    color: white;
    text-decoration: underline;
}

footer a:hover {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .home-page {
        grid-template-columns: 1fr;
    }
    
    .main-content-area {
        padding-right: 0;
    }
    
    .split-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Header adjustments for tablets */
    header {
        position: relative;
    }
    
    .header-content {
        padding: 0.75rem 0;
    }
    
    header h1 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    nav {
        margin-top: 0.5rem;
    }
    
    .nav-menu a {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .header-image img {
        max-width: 100%;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-menu a {
        text-align: center;
    }
    
    .container {
        padding: 0 10px;
    }
    
    main {
        margin: 0.5rem 10px;
        padding: 1.5rem 10px;
        border-radius: 8px;
    }
    
    .member-card,
    .officer-content,
    .judge-content {
        grid-template-columns: 1fr;
    }
    
    .filter-section {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    /* Header adjustments for phones - very compact */
    header {
        position: relative;
    }
    
    .header-content {
        padding: 0.5rem 0;
    }
    
    header h1 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }
    
    nav {
        margin-top: 0.4rem;
    }
    
    .nav-menu {
        gap: 0.3rem;
    }
    
    .nav-menu a {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
        border-radius: 4px;
    }
    
    .container {
        padding: 0 8px;
    }
    
    main {
        margin: 0.5rem 8px;
        padding: 1rem 8px;
        border-radius: 6px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .members-table {
        font-size: 0.9rem;
    }
    
    .members-table th,
    .members-table td {
        padding: 0.5rem;
    }
    
    .search-form,
    .member-card,
    .officer-card,
    .judge-card,
    .link-category {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    nav,
    .search-form,
    .back-button-form {
        display: none;
    }
    
    main {
        margin: 0;
        box-shadow: none;
    }
    
    body {
        background: white;
    }
}
