/* Stromness Sailing Club - Main Stylesheet */

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

:root {
    --primary-color: #1a5276;
    --primary-dark: #0e3a53;
    --secondary-color: #2e86ab;
    --accent-color: #f39c12;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --max-width: 1200px;
    --header-height: 70px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
}

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

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--primary-color);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.site-header .logo {
    color: #fff;
    text-decoration: none;
}

.site-header .logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    transition: 0.3s;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    border-bottom-color: var(--accent-color);
    text-decoration: none;
}

/* Main Content */
.site-main {
    flex: 1;
    padding: 2rem 0;
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

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

.footer-section a:hover {
    color: #fff;
}

/* Social Links */
.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.social-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 0.9rem;
}

/* Flash Messages */
.flash {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Page Headers */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
}

.page-header p {
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Articles / News */
.articles-grid {
    display: grid;
    gap: 2rem;
}

.article-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.article-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-content {
    padding: 1.5rem;
}

.article-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.article-card h2 a {
    color: var(--text-color);
}

.article-card h2 a:hover {
    color: var(--primary-color);
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Single Article */
.article-full {
    max-width: 800px;
    margin: 0 auto;
}

.article-full h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.article-full .article-meta {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.article-full-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Calendar */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-nav a {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
}

.calendar-nav a:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-header {
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
}

.calendar-day {
    background: var(--bg-color);
    min-height: 100px;
    padding: 0.5rem;
}

.calendar-day.other-month {
    background: var(--bg-light);
    color: var(--text-light);
}

.calendar-day.today {
    background: #e3f2fd;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.calendar-event {
    font-size: 0.8rem;
    background: var(--secondary-color);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event a {
    color: #fff;
}

.calendar-subscribe {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.calendar-subscribe h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.calendar-subscribe code {
    display: block;
    background: var(--bg-color);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    word-break: break-all;
    margin-top: 0.5rem;
}

/* Events List */
.events-list {
    margin-top: 2rem;
}

.event-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.event-date {
    text-align: center;
    min-width: 80px;
}

.event-date-day {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.event-date-month {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.event-details h3 {
    margin-bottom: 0.5rem;
}

.event-details p {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.1);
}

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

.form-group .error {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
    box-sizing: border-box;
    line-height: 1.2;
    vertical-align: middle;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

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

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

.btn-secondary:hover {
    background: var(--border-color);
    text-decoration: none;
}

.btn-danger {
    background: var(--error-color);
    color: #fff;
    border: 1px solid var(--error-color);
}

.btn-danger:hover {
    background: #c82333;
    text-decoration: none;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* About Page */
.about-content {
    max-width: 800px;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.boats-section {
    margin-top: 3rem;
}

.boats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.boat-card {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
}

.boat-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.boat-card p {
    color: var(--text-light);
}

/* Member Boats */
.member-boats-section {
    margin-top: 3rem;
}

.member-boats-section h2 {
    margin-bottom: 0.5rem;
}

.member-boats-section > p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.member-boats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.member-boat-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.member-boat-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.member-boat-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: var(--bg-light);
}

@media (max-width: 768px) {
    .member-boats-grid {
        grid-template-columns: 1fr;
    }
}

.member-boat-content {
    padding: 1.5rem;
}

.member-boat-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.member-boat-class {
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.member-boat-owner {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.member-boat-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* External Boats Section */
.external-boats-section {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.external-boats-section h2 {
    margin-bottom: 0.75rem;
}

.external-boats-section p {
    color: var(--text-light);
    margin: 0;
}

/* Featured Members */
.featured-members-section {
    margin-top: 3rem;
}

.featured-members-section h2 {
    margin-bottom: 1.5rem;
}

.featured-members-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.featured-member-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.featured-member-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.featured-member-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: var(--bg-light);
}

.featured-member-content {
    padding: 1.5rem;
}

.featured-member-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.featured-member-role {
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.featured-member-bio {
    color: var(--text-light);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .featured-members-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Form */
.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Admin Styles */
.admin-header {
    background: var(--primary-color);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.admin-header h1 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-header nav {
    color: #fff;
}

.admin-header a {
    color: #fff;
}

.admin-header a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.admin-nav {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.admin-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.admin-nav a {
    color: var(--text-color);
    font-weight: 500;
}

.admin-nav a.active {
    color: var(--primary-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.admin-table tr:hover {
    background: var(--bg-light);
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.inline-form {
    display: inline;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #cce5ff;
    color: #004085;
}

/* Login Page */
.login-wrapper {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.login-wrapper h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
}

.pagination a:hover {
    background: var(--bg-light);
    text-decoration: none;
}

.pagination .current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Race Results */
.results-section {
    margin-top: 1rem;
}

.series-list h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.series-card {
    padding: 1.25rem 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.series-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.results-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.results-error {
    padding: 1rem;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.results-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.results-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.results-table-wrapper {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.results-table th,
.results-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.results-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--primary-color);
}

.results-table tbody tr:hover {
    background: var(--bg-light);
}

.results-table .results-pos {
    font-weight: 700;
    color: var(--primary-color);
}

.results-table .results-race {
    text-align: center;
    min-width: 40px;
}

.results-table .results-total {
    font-weight: 600;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--primary-color);
        padding: 1rem;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav a {
        display: block;
        padding: 1rem;
    }

    .calendar-grid {
        font-size: 0.8rem;
    }

    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .event-item {
        flex-direction: column;
        gap: 1rem;
    }

    .admin-nav ul {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .site-header .logo h1 {
        font-size: 1.2rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .article-full h1 {
        font-size: 1.8rem;
    }
}

/* ======================
   Gallery Styles
   ====================== */

/* Public Gallery - Albums Grid */
.gallery-section {
    margin-top: 1rem;
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.album-card {
    display: block;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.2s;
    text-decoration: none;
}

.album-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
}

.album-cover {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-light);
}

.album-cover img,
.album-cover video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.album-info {
    padding: 1rem 1.25rem;
}

.album-info h3 {
    color: var(--text-color);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.album-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Public Gallery - Album View */
.album-gallery {
    margin-top: 1rem;
}

.breadcrumb {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--secondary-color);
}

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

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-light);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

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

.gallery-video {
    object-fit: contain;
    background: #000;
}

/* Admin Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.media-grid-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
}

.media-grid-item img,
.media-grid-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-grid-item .media-type-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.media-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.media-grid-item:hover .media-item-overlay {
    opacity: 1;
}

.media-item-info {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
}

/* Media Selection Checkbox */
.media-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    cursor: pointer;
}

.media-checkbox input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.media-grid-item.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.bulk-actions {
    display: flex;
}

/* Upload Progress */
.upload-progress {
    margin-top: 1.5rem;
    display: none;
}

.upload-progress-item {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.upload-file-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.2s;
}

.upload-status {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Badge secondary */
.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* Gallery Responsive */
@media (max-width: 768px) {
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

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

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

/* ==========================================
   Utility Classes
   ========================================== */

/* Text utilities */
.text-muted {
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

/* Spacing utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* Layout utilities */
.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Admin page header with title and action button */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Form layouts */
.form-container {
    max-width: 600px;
}

.form-container-wide {
    max-width: 800px;
}

/* Button group for form actions */
.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Form help text */
.form-help {
    color: var(--text-light);
    display: block;
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

/* Error list in forms */
.error-list {
    margin: 0;
    padding-left: 1.5rem;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Thumbnail images in tables */
.table-thumbnail {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

/* Image preview in forms */
.image-preview {
    max-width: 300px;
    border-radius: 4px;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-light);
    font-size: 1.2rem;
}

/* Message view card */
.message-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
}

.message-card h2 {
    margin-bottom: 0.5rem;
}

.message-body {
    background: #fff;
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Inline checkbox label */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Number input with limited width */
.input-small {
    max-width: 100px;
}
