/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #003366;
    --secondary-color: #006699;
    --accent-color: #0099CC;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
}

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

main {
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    padding-top: 2rem;
    padding-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
    overflow: visible;
    margin: 0;
    margin-bottom: 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    position: relative;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 20;
}

.logo {
    height: 120px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.2s;
    position: absolute;
    top: -20px;
    bottom: -40px;
    left: 0;
    z-index: 15;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.logo:hover {
    transform: scale(1.05);
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

header h1 {
    font-size: 1.75rem;
    margin: 0;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 30;
    position: relative;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    position: relative;
    z-index: 25;
    margin-top: 0.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin-top: 0;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding-top: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    color: white;
    text-align: center;
    padding: 3rem 0;
    padding-top: 100px;
}

.hero-overlay .container {
    position: relative;
    z-index: 3;
}

.hero-overlay h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    color: white;
}

.hero-overlay p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    opacity: 0.95;
    color: white;
}

.hero-overlay .slogan {
    font-size: 1.5rem;
    font-weight: 600;
    font-style: italic;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: white;
    letter-spacing: 0.5px;
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section:nth-child(even) {
    background-color: var(--light-bg);
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* Section Images */
.section-image {
    margin-bottom: 2rem;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.decorative-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: cover;
}

/* Who Are We Section */
.who-are-we-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.who-are-we-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.who-are-we-content p:last-child {
    margin-bottom: 0;
}

.who-are-we-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Board Members Grid */
.board-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.board-member-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.board-member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.board-member-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-color);
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.board-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.board-member-card .role {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.board-member-card .name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.board-member-card .contact {
    font-size: 0.95rem;
    color: #666;
}

.board-member-card .contact a {
    color: var(--accent-color);
    text-decoration: none;
    display: block;
    margin-top: 0.25rem;
}

.board-member-card .contact a:hover {
    text-decoration: underline;
}

/* Resources Section */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.resource-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.resource-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.resource-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.resource-card h3 a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.resource-card p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
}

/* Find A Footer Section */
.search-sort-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem 0;
    align-items: flex-end;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box label,
.sort-controls label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.search-box input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.1);
}

.sort-controls {
    min-width: 150px;
}

.sort-controls select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-controls select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.1);
}

.footer-count {
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
    justify-content: center;
}

.view-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.view-btn:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.view-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Map Container */
.map-container {
    margin: 1.5rem 0;
    width: 100%;
}

.map-container #map {
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

.footers-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.footers-table thead {
    background-color: var(--primary-color);
    color: white;
}

.footers-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.footers-table th:hover {
    background-color: var(--secondary-color);
}

.footers-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.footers-table tbody tr:hover {
    background-color: rgba(0, 153, 204, 0.05);
}

.footers-table tbody tr:last-child {
    border-bottom: none;
}

.footers-table td {
    padding: 1rem;
    color: var(--text-color);
}

.footers-table td a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.footers-table td a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Tournament Table */
.tournaments-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: var(--primary-color);
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:nth-child(even) {
    background-color: var(--light-bg);
}

tbody tr:hover {
    background-color: rgba(0, 153, 204, 0.05);
}

table a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

table a:hover {
    text-decoration: underline;
}

.date-cell {
    white-space: nowrap;
    font-weight: 500;
}

/* Mailing List Form */
#mailing-list-form {
    max-width: 500px;
    margin-top: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

/* reCAPTCHA v3 is invisible - no styling needed */

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
    cursor: pointer;
}

.footers-list-fields {
    margin-top: 1rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.required {
    color: var(--error-color);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.1);
}

.btn-submit {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.btn-submit:hover {
    background-color: var(--secondary-color);
}

.btn-submit:active {
    transform: scale(0.98);
}

/* Loading and Error States */
.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

.error {
    text-align: center;
    color: var(--error-color);
    padding: 2rem;
    background-color: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 8px;
}

.empty {
    text-align: center;
    color: #666;
    padding: 2rem;
    font-style: italic;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer p {
    margin: 0;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .header-brand {
        justify-content: flex-start;
        margin-bottom: 0;
        width: auto;
    }

    .logo {
        height: 100px;
        top: -15px;
        bottom: -35px;
    }

    header {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    .hero-overlay {
        padding-top: 80px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 4rem 2rem 2rem;
        margin-top: 0;
        gap: 0;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        z-index: 20;
        overflow-y: auto;
    }

    nav.active {
        right: 0;
    }

    nav a {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 1.1rem;
    }

    nav a:last-child {
        border-bottom: none;
    }

    nav a:hover {
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.1);
        padding-left: 1rem;
    }

    /* Overlay when menu is open */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 15;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    .hero-image-wrapper,
    .hero-overlay {
        min-height: 400px;
    }

    .hero-overlay h2 {
        font-size: 1.75rem;
    }

    .hero-overlay p {
        font-size: 1rem;
    }

    .hero-overlay .slogan {
        font-size: 1.25rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .board-members-grid {
        grid-template-columns: 1fr;
    }

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

    .search-sort-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .view-toggle {
        flex-direction: column;
    }
    
    .view-btn {
        width: 100%;
    }
    
    .map-container #map {
        height: 400px !important;
    }

    .search-box,
    .sort-controls {
        width: 100%;
    }

    table,
    .footers-table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    #mailing-list-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        height: 80px;
        top: -10px;
        bottom: -30px;
    }

    header {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .hero-overlay {
        padding-top: 60px;
    }

    nav {
        width: 100%;
        right: -100%;
    }

    .hero-image-wrapper,
    .hero-overlay {
        min-height: 300px;
    }

    .hero-overlay {
        padding: 2rem 0;
    }

    .hero-overlay h2 {
        font-size: 1.5rem;
    }

    .hero-overlay p {
        font-size: 0.95rem;
    }

    .hero-overlay .slogan {
        font-size: 1.1rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .section {
        padding: 2rem 0;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

/* Gallery Page Styles */
.gallery-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.gallery-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.gallery-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.gallery-section {
    padding: 3rem 0;
    background-color: var(--light-bg);
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: white;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 4 / 3;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-title {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Navigation Active State */
nav a.active {
    opacity: 1;
    font-weight: 600;
    border-bottom: 2px solid white;
    padding-bottom: 2px;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: opacity 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    max-width: 80%;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    padding: 16px;
    user-select: none;
    transition: opacity 0.2s;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    text-decoration: none;
    z-index: 1001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.7);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Gallery Responsive Styles */
@media (max-width: 768px) {
    .gallery-hero h2 {
        font-size: 2rem;
    }

    .gallery-hero p {
        font-size: 1rem;
    }

    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 85%;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 35px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 24px;
        padding: 12px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption {
        font-size: 1rem;
        bottom: 10px;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .photo-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-hero {
        padding: 2rem 0;
    }

    .gallery-hero h2 {
        font-size: 1.75rem;
    }
}

