/* Root CSS Variables - Light Mode (Default) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent: #0066cc;
    --accent-light: #e6f0ff;
    --border: #e0e0e0;
    --drawer-bg: #f9f9f9;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: 0.3s ease;
}

/* Dark Mode */
html.dark-mode {
    background-color: #1e1e1e;
}

body.dark-mode {
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d2d;
    --text-primary: #e8e8e8;
    --text-secondary: #b0b0b0;
    --accent: #4da3ff;
    --accent-light: #1a3d66;
    --border: #404040;
    --drawer-bg: #252525;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 4px 16px rgba(0, 0, 0, 0.4);
    background-color: #1e1e1e;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color var(--transition), color var(--transition);
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
}

/* Container */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--accent) 0%, #005bb3 100%);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-heavy);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-btn, .theme-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn:hover, .theme-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.header-title {
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: opacity var(--transition);
}

.header-title:hover {
    opacity: 0.85;
}

.header-logo {
    height: 50px;
    width: auto;
    margin-right: 1rem;
    vertical-align: middle;
}

.header-title h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.header-title .tagline {
    font-size: 0.75rem;
    opacity: 0.9;
    margin: 0.25rem 0 0 0;
}

#theme-icon {
    display: inline-block;
}

/* Navigation Drawer */
.drawer {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--drawer-bg);
    box-shadow: var(--shadow-heavy);
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 200;
    overflow-y: auto;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    background: var(--accent);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
}

.drawer-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: background var(--transition);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Drawer Navigation */
.drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.drawer-nav a {
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.drawer-nav a:hover {
    background-color: var(--accent-light);
    color: var(--accent);
    border-left-color: var(--accent);
    padding-left: 1.75rem;
}

.nav-divider {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* Overlay */
.overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Main Content */
.content {
    flex: 1;
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.25rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.content p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent);
    transition: all var(--transition);
}

.content a:hover {
    border-bottom-style: solid;
}

/* Lists */
.content ul, .content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    background-color: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
}

.content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-heavy);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent) !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 0.5rem;
    border: none !important;
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
    font-size: 1rem;
}

.btn:hover {
    background: #005bb3 !important;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Photo Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-item {
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg-secondary);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    box-shadow: var(--shadow-heavy);
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-item-title {
    padding: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

table th {
    background: var(--accent);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background var(--transition);
}

table th.sortable:hover {
    background: linear-gradient(135deg, var(--accent) 0%, #005bb3 100%);
}

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

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

table tr:hover {
    background: var(--accent-light);
}

table td:nth-child(5) {
    white-space: nowrap;
    min-width: 120px;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: auto;
}

.footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.footer-small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    border: 4px solid var(--bg-secondary);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-title h1 {
        font-size: 1.25rem;
    }

    .header-title .tagline {
        font-size: 0.65rem;
    }

    .menu-btn, .theme-btn {
        font-size: 1.25rem;
        padding: 0.4rem 0.6rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .content {
        padding: 1rem;
    }

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

    table {
        font-size: 0.9rem;
    }

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

@media (max-width: 480px) {
    .header {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .header-title h1 {
        font-size: 1rem;
    }

    .header-title .tagline {
        font-size: 0.6rem;
    }

    .drawer {
        width: 75vw;
        max-width: 250px;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .content {
        padding: 0.75rem;
    }

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

    .gallery-item img {
        height: 120px;
    }

    .card {
        padding: 1rem;
    }

    table {
        font-size: 0.8rem;
    }

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

/* Print Styles */
@media print {
    .header, .drawer, .overlay, .theme-btn, .menu-btn {
        display: none;
    }

    .content {
        max-width: 100%;
    }

    .footer {
        border-top: 2px solid #000;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
button:focus, a:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Responsive Map Container */
.map-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    margin-top: 1rem;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Map Link Button Style */
.map-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #ffffff !important; /* !important to override content a */
    text-decoration: none;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 1rem; /* Add some space above the button */
    border-bottom: none !important; /* Remove dotted underline from content a */
}

.map-link:hover {
    background: #005bb3;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.facebook-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

/* Photo Collage */
.photo-collage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.photo-item {
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    cursor: pointer;
}

.photo-item:hover {
    box-shadow: var(--shadow-heavy);
    transform: translateY(-5px);
}

.photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.photo-caption {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}


/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}
