/* ==========================================================================
   THE HARD SHOULDER - CSS Variables
   Motorway service station theme colors and base styles
   ========================================================================== */

:root {
    /* Primary Colors - Motorway Blue */
    --primary-color: #1e3a5f;
    --primary-color-rgb: 30, 58, 95;
    --primary-dark: #152a45;
    --primary-hover: #2c5282;
    --secondary-color: #2c5282;

    /* Accent Color - Amber/Orange */
    --accent-color: #f39c12;

    /* Text Colors */
    --text-dark: #1a1a2e;
    --text-medium: #4a5568;
    --text-light: #718096;
    --text-muted: #a0aec0;

    /* Background Colors */
    --bg-light: #f7fafc;
    --bg-lighter: #edf2f7;
    --white: #ffffff;

    /* Border */
    --border-color: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* ==========================================================================
   Hide reCAPTCHA Badge
   ========================================================================== */

.grecaptcha-badge {
    visibility: hidden !important;
}

/* ==========================================================================
   Container - Max Width Wrapper
   ========================================================================== */

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

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0;
    margin-top: 4rem;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-sep {
    color: rgba(255, 255, 255, 0.3);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.footer-bottom p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-tagline {
    font-style: italic;
}

/* ==========================================================================
   Site Header & Navigation - Base Styles
   ========================================================================== */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 24px;
}

.site-logo {
    flex-shrink: 0;
    order: 1;
}

.site-logo a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}

.site-logo a:hover {
    color: var(--primary-color);
}

/* Menu toggle - hidden on desktop, shown on mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    order: 4;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Main Navigation - Desktop */
.main-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
    flex: 1;
}

.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    display: block;
    padding: 8px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.main-navigation a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 3;
    flex-shrink: 0;
}

/* Header Search */
.header-search {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.header-search.active {
    display: block;
}

.header-search .search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.header-search .search-field {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
}

.header-search .search-submit {
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 500;
}

/* Mobile menu extras - hidden on desktop */
.mobile-menu-extras {
    display: none;
}

.mobile-header-icons {
    display: none;
}

/* User login trigger */
.user-login-trigger {
    padding: 8px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.user-login-trigger:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* ==========================================================================
   Header Icon Buttons - Uniform Styling
   Following best practices for consistent, accessible icon buttons
   ========================================================================== */

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    position: relative;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.header-icon-btn:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.header-icon-btn:active {
    transform: scale(0.95);
}

.header-icon-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.header-icon-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Profile avatar specific adjustments */
.header-icon-btn.user-profile-avatar {
    padding: 0;
}

.header-icon-btn .header-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s ease;
}

.header-icon-btn.user-profile-avatar:hover .header-avatar-img {
    border-color: var(--primary-color);
}

/* Notification badge on icon buttons */
.header-icon-btn .icon-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #e74c3c;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ==========================================================================
   Mobile Menu Extras - Hidden on Desktop
   ========================================================================== */

.mobile-menu-extras {
    display: none;
}

/* ==========================================================================
   Generic Page Content Styles
   ========================================================================== */

.page-content-wrapper {
    padding: 3rem 0;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.entry-content {
    max-width: 800px;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.entry-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.entry-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 2rem 0 0.75rem;
}

.entry-content p {
    margin-bottom: 1.25rem;
}

.entry-content ul,
.entry-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    padding: 0;
}

.entry-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.entry-content a:hover {
    color: var(--primary-dark);
}

.entry-content strong {
    font-weight: 600;
    color: var(--text-dark);
}

.entry-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .entry-content {
        font-size: 1rem;
    }

    .entry-content h2 {
        font-size: 1.375rem;
    }

    .entry-content h3 {
        font-size: 1.125rem;
    }
}

/* ==========================================================================
   Reset Password Page
   ========================================================================== */

.reset-password-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
}

.reset-password-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.reset-password-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    max-width: 480px;
    width: 100%;
}

.reset-password-header {
    text-align: center;
    margin-bottom: 2rem;
}

.reset-password-header h1 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.reset-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.reset-message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.reset-message.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.reset-message.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

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

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

.reset-password-form input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--bg-light);
}

.reset-password-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.field-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
}

.reset-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reset-actions .btn {
    text-align: center;
    justify-content: center;
}

.reset-actions .btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.reset-actions .btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

@media (max-width: 576px) {
    .reset-password-card {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

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

/* ==========================================================================
   Profile Reviews
   ========================================================================== */

.profile-reviews-section h2 .review-count {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.875em;
}

.more-reviews-note {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 1rem;
    font-style: italic;
}

/* ==========================================================================
   Custom Logo Styling
   ========================================================================== */

.custom-logo-link {
    display: inline-block;
    line-height: 0;
}

.custom-logo {
    max-height: 32px;
    width: auto;
    height: auto;
    display: block;
    transition: var(--transition-fast);
}

.custom-logo-link:hover .custom-logo {
    opacity: 0.8;
}

/* ==========================================================================
   Course Cards (Archive & Homepage)
   ========================================================================== */

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.course-card {
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.course-card-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

.course-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .course-card-image img {
    transform: scale(1.08);
}

/* Video badge on course cards */
.video-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.course-card:hover .video-badge {
    transform: scale(1.1);
    background: rgba(255, 0, 0, 1);
}

.video-badge svg {
    width: 18px;
    height: 18px;
}

.course-card-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.course-card-title a {
    color: var(--text-dark);
    transition: var(--transition-fast);
}

.course-card-title a:hover {
    color: var(--primary-color);
}

.course-card-location {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.course-card-excerpt {
    flex-grow: 1;
    margin-bottom: 1.25rem;
    color: var(--text-medium);
    line-height: 1.5;
}

.course-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    gap: 1rem;
}

.course-card-details {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.course-card-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.course-card-detail span {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
}

/* ==========================================================================
   Single Course Styles
   ========================================================================== */

.course-hero {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    margin-bottom: 0;
}

.course-hero img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.course-header {
    margin-bottom: 3rem;
    padding: 4rem 0 2rem;
}

.course-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-edit-course {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 980px;
    transition: var(--transition-fast);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-edit-course:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.02);
}

.btn-edit-course svg {
    width: 16px;
    height: 16px;
}

/* Remove Course Button (Admin Only) */
.btn-remove-course {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    background-color: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
    border-radius: 980px;
    transition: var(--transition-fast);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-remove-course:hover {
    background-color: #dc3545;
    color: var(--white);
    transform: scale(1.02);
}

.btn-remove-course:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-remove-course svg {
    width: 16px;
    height: 16px;
}

.course-title {
    margin-bottom: 1.25rem;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.05;
}

.course-meta {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookies {
    display: inline-flex;
    gap: 3px;
}

.cookie {
    font-size: 1.375rem;
    line-height: 1;
    filter: grayscale(100%);
    opacity: 0.3;
}

.cookie.filled {
    filter: grayscale(0%);
    opacity: 1;
}

.rating-value {
    font-weight: 600;
    font-size: 1.375rem;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

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

.course-regions {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.region-tag {
    padding: 6px 14px;
    background-color: var(--bg-light);
    border-radius: 980px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition-fast);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.region-tag:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Bucket List Button */
.course-bucket-list-action {
    margin-left: auto;
}

.bucket-list-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 980px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s ease;
}

.bucket-list-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.bucket-list-btn.on-list {
    background: #fef2f2;
    border-color: #e74c3c;
    color: #e74c3c;
}

.bucket-list-btn.on-list .icon-flag {
    fill: #e74c3c;
}

.bucket-list-btn .icon-flag {
    transition: fill 0.2s ease;
}

.bucket-list-btn:hover .icon-flag {
    fill: #e74c3c;
}

.bucket-list-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.bucket-list-played {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: rgba(29, 131, 72, 0.1);
    border-radius: 980px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
}

.bucket-list-played svg {
    color: var(--primary-color);
}

.course-body {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 4rem;
    margin-top: 3rem;
    padding-bottom: 6rem;
}

.course-main {
    min-width: 0;
}

.course-description {
    font-size: 1.0625rem;
    line-height: 1.6;
    margin-bottom: 4rem;
    color: var(--text-medium);
}

/* Course Details Section */

.course-details-section {
    background-color: var(--bg-lighter);
    padding: 2.5rem;
    border-radius: 18px;
    margin-bottom: 4rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.course-details-section h2 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.detail-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

/* Gallery Section */

.course-gallery-section {
    margin-bottom: 4rem;
}

.course-gallery-section h2 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 600;
}

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

.gallery-item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.3));
    opacity: 0;
    transition: var(--transition-fast);
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

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

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

/* Gallery Item Wrapper with Admin Delete */
.gallery-item-wrapper {
    position: relative;
}

.gallery-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.gallery-item-wrapper:hover .gallery-delete-btn {
    opacity: 1;
}

.gallery-delete-btn:hover {
    background: #c82333;
}

.gallery-delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gallery-delete-btn svg {
    width: 16px;
    height: 16px;
}

/* Location Section */

.course-location-section {
    margin-bottom: 1rem;
}

.course-location-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.course-address {
    color: var(--text-medium);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 1rem;
}

.course-location-meta {
    margin-top: 1rem;
}

.course-county,
.course-country {
    color: var(--text-dark);
    margin-bottom: 0;
    font-weight: 500;
    font-size: 1.0625rem;
}

.location-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.location-link:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.location-separator {
    color: var(--text-light);
}

#course-map {
    box-shadow: var(--shadow-md);
    border-radius: 18px;
}

/* Sidebar */

.course-sidebar {
    position: sticky;
    top: 88px;
    height: fit-content;
}

.sidebar-widget {
    background-color: var(--bg-lighter);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sidebar-widget p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

.sidebar-widget p:last-child {
    margin-bottom: 0;
}

.sidebar-widget a {
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.sidebar-widget a:hover {
    opacity: 0.8;
}

.type-tags {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.type-tag {
    padding: 12px 16px;
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    text-align: center;
    transition: var(--transition-fast);
    font-weight: 500;
}

.type-tag:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: scale(1.02);
}

/* ==========================================================================
   Archive Header
   ========================================================================== */

.archive-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 5rem 0 3rem;
}

.archive-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.015em;
    line-height: 1.05;
}

.archive-description {
    font-size: 1.25rem;
    color: var(--text-medium);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ==========================================================================
   Course Filters
   ========================================================================== */

.course-filters {
    background: var(--white);
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.filter-form {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.filter-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-dark);
    transition: var(--transition-fast);
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%2386868b" d="M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.filter-select:hover {
    border-color: var(--text-light);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(29, 131, 72, 0.1);
}

.filter-btn {
    white-space: nowrap;
    padding: 0.875rem 2rem;
}

.clear-filters {
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.875rem 1rem;
    transition: var(--transition-fast);
}

.clear-filters:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   Course Archive Map Layout
   ========================================================================== */

.courses-archive-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Full width when no map */
.courses-archive-wrapper:not(.has-map) .courses-content-container {
    width: 100%;
}

/* With map: 1/3 map, 2/3 content */
.courses-archive-wrapper.has-map {
    gap: 2.5rem;
    padding-top: 2rem;
}

.courses-map-container {
    flex: 0 0 33.333%;
    position: sticky;
    top: 100px;
    height: calc(100vh - 140px);
    min-height: 600px;
}

#courses-map {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.courses-content-container {
    flex: 1;
    min-width: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .courses-archive-wrapper.has-map {
        flex-direction: column;
    }

    .courses-map-container {
        flex: 0 0 auto;
        width: 100%;
        position: relative;
        top: 0;
        height: 500px;
        min-height: 500px;
    }

    .courses-content-container {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .courses-map-container {
        height: 400px;
        min-height: 400px;
    }
}

/* Map marker custom styles */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
    margin: 1rem;
    font-family: inherit;
}

.popup-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-map-popup h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.course-map-popup .rating {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    display: block;
}

.course-map-popup a.btn,
.course-map-popup a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-color) !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.course-map-popup a.btn:hover,
.course-map-popup a:hover {
    background: #145a32 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   Single Course Map Layout
   ========================================================================== */

.single-course-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Full width when no map */
.single-course-wrapper:not(.has-map) .single-course-content-container {
    width: 100%;
}

/* With map: 1/3 map, 2/3 content */
.single-course-wrapper.has-map {
    gap: 2.5rem;
    margin-top: 4rem;
}

.single-course-map-container {
    flex: 0 0 33.333%;
    position: sticky;
    top: 100px;
    height: calc(100vh - 140px);
    min-height: 600px;
}

.single-course-map-container #course-map {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.single-course-content-container {
    flex: 1;
    min-width: 0;
}

/* Current course popup styling */
.current-course-popup h3 {
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

/* When map is present, make course body full width (single column) */
.single-course-wrapper.has-map .course-body {
    grid-template-columns: 1fr;
    gap: 3rem;
}

.single-course-wrapper.has-map .course-sidebar {
    max-width: 600px;
}

/* Responsive adjustments for single course */
@media (max-width: 1024px) {
    .single-course-wrapper.has-map {
        flex-direction: column;
    }

    .single-course-map-container {
        flex: 0 0 auto;
        width: 100%;
        position: relative;
        top: 0;
        height: 500px;
        min-height: 500px;
        margin-bottom: 2rem;
    }

    .single-course-content-container {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .single-course-map-container {
        height: 400px;
        min-height: 400px;
    }
}

/* Mobile reordering: map after location, reviews after course details */
@media (max-width: 734px) {
    /* Make single course wrapper column layout */
    .single-course-wrapper.has-map {
        flex-direction: column;
        gap: 0;
        margin-top: 0;
    }

    /* Content container takes full width */
    .single-course-content-container {
        width: 100%;
    }

    /* When map is moved to inside course-main */
    .single-course-map-container.mobile-moved {
        width: 100%;
        border-radius: 12px;
        overflow: hidden;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
        height: 300px !important;
        min-height: 300px !important;
    }

    .single-course-map-container.mobile-moved #course-map {
        border-radius: 12px;
    }

    /* Reviews section when moved inside course-main */
    .course-reviews-section.mobile-moved {
        padding: 0;
        background: none;
        margin-top: 1.5rem;
        border-bottom: none;
    }

    .course-reviews-section.mobile-moved > .container {
        padding: 0;
    }

    .course-reviews-section.mobile-moved h2 {
        font-size: 1.375rem;
        margin-bottom: 1rem;
    }
}

/* ==========================================================================
   Lightbox Styles
   ========================================================================== */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2.5rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: 300;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Mobile adjustments for lightbox */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .lightbox-counter {
        bottom: 1rem;
    }
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 1068px) {
    .course-body {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .course-sidebar {
        position: static;
    }

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

    .course-title {
        font-size: 2.75rem;
    }

    .archive-title {
        font-size: 2.75rem;
    }
}

@media (max-width: 734px) {
    .course-title {
        font-size: 2.25rem;
    }

    .archive-title {
        font-size: 2.25rem;
    }

    .course-header {
        padding: 3rem 0 1.5rem;
    }

    .course-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .course-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .course-body {
        gap: 2rem;
        padding-bottom: 4rem;
    }

    .course-card-image {
        height: 220px;
    }

    .archive-header {
        padding: 3rem 0 2rem;
    }

    .course-filters {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: auto;
    }

    .filter-btn,
    .clear-filters {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .course-title {
        font-size: 1.875rem;
    }

    .course-description {
        font-size: 1rem;
    }

    .course-details-section {
        padding: 1.75rem;
    }

    .sidebar-widget {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Auth Modal
   ========================================================================== */

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal.active {
    display: flex;
}

.auth-modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.auth-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 18px;
    max-width: 480px;
    width: 100%;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-light);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-dark);
    transition: var(--transition-fast);
    line-height: 1;
}

.auth-modal-close:hover {
    background: var(--border-color);
    transform: scale(1.1);
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition-fast);
}

.auth-tab:hover {
    color: var(--text-dark);
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
}

.auth-form-container h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.auth-subtitle {
    color: var(--text-medium);
    margin-bottom: 2rem;
    font-size: 1rem;
}

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

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

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-lighter);
    transition: var(--transition-fast);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.form-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.form-remember label {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

.form-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-password-link {
    color: var(--primary-color);
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.auth-back-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-back-link a {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.auth-back-link a:hover {
    color: var(--primary-color);
}

.form-messages {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    display: none;
}

.form-messages:not(:empty) {
    display: block;
}

.form-messages.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.form-messages.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-terms {
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    color: var(--text-light);
    text-align: center;
    line-height: 1.5;
}

.spinner {
    animation: rotate 1s linear infinite;
}

.spinner circle {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 734px) {
    .auth-modal-content {
        padding: 2rem 1.5rem;
    }

    .auth-form-container h2 {
        font-size: 1.625rem;
    }
}

/* ==========================================================================
   Custom Login Page
   Full-page login that matches site design
   ========================================================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.login-page-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    z-index: 1;
}

.login-page-card {
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 3rem;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Branding */
.login-branding {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    max-height: 48px;
    width: auto;
    margin: 0 auto;
}

.login-logo .site-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

/* Tabs */
.login-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--bg-light);
    padding: 4px;
    border-radius: 12px;
}

.login-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-medium);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.login-tab:hover {
    color: var(--text-dark);
}

.login-tab.active {
    background: var(--white);
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Panels */
.login-panel {
    display: none;
}

.login-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

.login-panel h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    text-align: center;
    color: var(--text-medium);
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

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

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

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.login-form input::placeholder {
    color: var(--text-light);
}

/* Form Options Row */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-medium);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--secondary-color);
}

/* Messages */
.login-form .form-messages {
    margin-bottom: 1rem;
}

.login-form .form-message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.login-form .form-message.success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.login-form .form-message.error {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* Submit Button */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
}

.btn-login:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 131, 72, 0.25);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-login .btn-text {
    display: inline;
}

.btn-login .btn-loading {
    display: none;
}

.btn-login .btn-loading .spinner {
    animation: spin 1s linear infinite;
}

.btn-login .btn-loading .spinner circle {
    stroke-dasharray: 80;
    stroke-dashoffset: 60;
    stroke-linecap: round;
}

/* Back Link */
.back-link {
    text-align: center;
    margin-top: 1.5rem;
}

.back-link a {
    font-size: 0.875rem;
    color: var(--text-medium);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link a:hover {
    color: var(--primary-color);
}

/* Terms Text */
.terms-text {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 1.5rem;
    line-height: 1.5;
}

.terms-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Background Decoration */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.login-bg-pattern {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: linear-gradient(135deg, rgba(29, 131, 72, 0.03) 0%, rgba(39, 174, 96, 0.05) 100%);
    border-radius: 50%;
    transform: rotate(-15deg);
}

/* Login Page Responsive */
@media (max-width: 734px) {
    .login-page {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .login-page-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-panel h1 {
        font-size: 1.5rem;
    }

    .login-subtitle {
        font-size: 0.875rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Hide header and footer on login page for cleaner look */
.page-template-page-login .site-header,
.page-template-page-login .site-footer {
    display: none;
}

.page-template-page-login #content {
    padding: 0;
}

.page-template-page-login .login-page {
    margin: 0;
}

/* ==========================================================================
   Reviews Section
   ========================================================================== */

.course-reviews-section {
    /* Styling removed - now in full-width section */
}

.course-reviews-section > h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.review-form-container {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 3rem;
}

.review-form-container h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

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

.course-review-form label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.rating-input {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rating-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-fast);
}

.rating-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

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

.course-review-form textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
    font-family: inherit;
    resize: vertical;
    transition: var(--transition-fast);
}

.course-review-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.review-form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.review-form-actions .btn {
    flex: 1;
}

.btn-delete {
    background: #dc3545;
    border-color: #dc3545;
}

.btn-delete:hover {
    background: #c82333;
    border-color: #bd2130;
}

.review-login-prompt {
    background: var(--bg-lighter);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 18px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
}

.review-login-prompt p {
    font-size: 1.0625rem;
    color: var(--text-medium);
    margin: 0;
}

.review-login-prompt a {
    color: var(--primary-color);
    font-weight: 500;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-item {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 18px;
    padding: 2rem;
    transition: var(--transition-fast), border-color 0.3s ease;
    scroll-margin-top: 100px;
}

.review-item:hover {
    box-shadow: var(--shadow-sm);
}

/* Highlight review when targeted via anchor link */
.review-item:target {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.15);
    animation: review-highlight 2s ease-out;
}

@keyframes review-highlight {
    0% {
        background: rgba(29, 131, 72, 0.1);
    }
    100% {
        background: var(--white);
    }
}

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

.review-author {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.review-author-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.review-author-info h4 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.review-author-info h4 a:hover {
    color: var(--primary-color);
}

.review-author-info time {
    font-size: 0.875rem;
    color: var(--text-light);
}

.review-rating {
    display: flex;
    align-items: baseline;
    gap: 2px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 980px;
    flex-shrink: 0;
}

.review-rating .rating-number {
    font-size: 1.25rem;
    font-weight: 700;
}

.review-rating .rating-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.review-content {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text-medium);
}

.no-reviews {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
    font-size: 1.0625rem;
}

@media (max-width: 734px) {
    .course-full-width-sections {
        padding: 3rem 0;
        margin-top: 3rem;
    }

    .course-reviews-section > h2 {
        font-size: 1.75rem;
    }

    .review-form-container {
        padding: 2rem 1.5rem;
    }

    .rating-input {
        gap: 0.375rem;
    }

    .rating-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9375rem;
    }

    .review-item {
        padding: 1.5rem;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-rating {
        align-self: flex-start;
    }
}

/* ========================================
   Header User Actions
   ======================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile,
.user-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition-fast);
    text-decoration: none;
}

.user-profile {
    color: var(--text-dark);
}

.user-profile:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.user-profile svg {
    width: 20px;
    height: 20px;
}

/* Header Profile Avatar - Now uses .header-icon-btn base class */
/* Legacy styles removed - see Header Icon Buttons section at top of file */

.user-logout {
    color: var(--text-medium);
}

.user-logout:hover {
    background: var(--bg-light);
}

/* ========================================
   Profile Page Styles
   ======================================== */

.profile-page {
    padding: 4rem 0;
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 24px;
    padding: 4rem 3rem;
    margin-bottom: 3rem;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat center;
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
}

.profile-avatar-section {
    position: relative;
    z-index: 1;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary-color);
    border: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.avatar-upload-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: var(--white);
}

.avatar-upload-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.profile-username {
    font-size: 1.125rem;
    opacity: 0.9;
    margin: 0;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.9375rem;
    opacity: 0.85;
}

.profile-info {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    opacity: 0.9;
}

.info-item svg {
    flex-shrink: 0;
}

.profile-field {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    align-items: center;
}

.profile-field:first-child {
    padding-top: 0;
}

.profile-field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.field-label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-dark);
    opacity: 0.65;
    letter-spacing: -0.01em;
}

.field-value {
    color: var(--text-dark);
    font-size: 1.0625rem;
    font-weight: 500;
}

.field-value:empty::before {
    content: 'Not set';
    color: var(--text-light);
    opacity: 0.5;
    font-style: italic;
    font-weight: 400;
}

.profile-display {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.edit-profile-form {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.edit-profile-form .form-group:last-of-type {
    margin-bottom: 0;
}

.edit-profile-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.625rem;
    color: var(--text-dark);
    opacity: 0.85;
    letter-spacing: -0.01em;
}

.edit-profile-form input[type="text"],
.edit-profile-form input[type="tel"],
.edit-profile-form input[type="email"],
.edit-profile-form input[type="url"] {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-dark);
    transition: var(--transition-fast);
}

.edit-profile-form input[type="text"]:focus,
.edit-profile-form input[type="tel"]:focus,
.edit-profile-form input[type="email"]:focus,
.edit-profile-form input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(29, 131, 72, 0.1);
}

.edit-profile-form input[type="text"]::placeholder,
.edit-profile-form input[type="tel"]::placeholder,
.edit-profile-form input[type="email"]::placeholder,
.edit-profile-form input[type="url"]::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.edit-profile-form .form-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.profile-content {
    max-width: 900px;
    margin: 0 auto;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.profile-edit-section,
.profile-bio-section {
    background: var(--white);
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.btn-link:hover {
    background: rgba(29, 131, 72, 0.1);
}

.bio-display {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text-medium);
}

.bio-display.empty {
    opacity: 0.6;
    font-style: italic;
}

.bio-empty-state {
    margin: 0;
}

.edit-bio-form {
    margin-top: 1.5rem;
}

.edit-bio-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition-fast);
}

.edit-bio-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(29, 131, 72, 0.1);
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

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

/* Course Management Section */
.profile-manage-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-lighter);
    border-radius: 18px;
    border: 1px solid var(--border-color);
}

.profile-manage-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.manage-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-course-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 24px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 980px;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.btn-course-action:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.btn-course-action svg {
    width: 20px;
    height: 20px;
}

.profile-reviews-section > h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.user-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.user-review-item {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 18px;
    padding: 2rem;
    transition: var(--transition-fast);
}

.user-review-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.review-course-info h3 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 600;
    flex: 1;
}

.review-course-info h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.review-course-info h3 a:hover {
    color: var(--primary-color);
}

.review-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.review-meta time {
    font-size: 0.875rem;
    color: var(--text-light);
}

@media (max-width: 734px) {
    .profile-page {
        padding: 2rem 0;
    }

    .profile-header {
        padding: 3rem 2rem;
        margin-bottom: 2rem;
        border-radius: 18px;
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
    }

    .profile-name {
        font-size: 2rem;
    }

    .profile-username {
        font-size: 1rem;
    }

    .profile-stats {
        gap: 2rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.875rem;
    }

    .profile-edit-section,
    .profile-bio-section {
        padding: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }

    .user-review-item {
        padding: 1.5rem;
    }

    .review-course-info {
        flex-direction: column;
        gap: 1rem;
    }

    .review-course-info h3 {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Additional Mobile Optimizations
   ========================================================================== */

/* Hero sections on mobile */
@media (max-width: 768px) {
    .course-hero {
        height: 300px;
    }

    .hero-section {
        padding: 4rem 0 3rem;
    }

    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }

    .hero-section p {
        font-size: 1.125rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .course-hero {
        height: 250px;
    }

    .hero-section {
        padding: 3rem 0 2rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

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

    /* Course cards - stack everything */
    .course-card-content {
        padding: 1.5rem;
    }

    .course-card-title {
        font-size: 1.375rem;
    }

    .course-card-location {
        font-size: 0.875rem;
    }

    .course-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .course-card-details {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .course-card-rating {
        align-self: flex-start;
    }

    /* Cookie ratings - adjust size for mobile */
    .cookies {
        gap: 2px;
    }

    .cookie {
        font-size: 1.125rem;
    }

    .course-rating .cookies .cookie {
        font-size: 1.25rem;
    }

    /* Buttons - make touch-friendly */
    .btn {
        min-height: 48px;
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }

    /* Review form actions */
    .review-form-actions {
        flex-direction: column;
    }

    .review-form-actions .btn {
        width: 100%;
    }

    /* Rating buttons */
    .rating-btn {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    /* Course details */
    .course-details-section {
        padding: 1.5rem;
    }

    .course-details-section h2 {
        font-size: 1.625rem;
        margin-bottom: 1.25rem;
    }

    .detail-item {
        padding: 0.875rem 0;
    }

    .detail-label {
        font-size: 0.875rem;
    }

    .detail-value {
        font-size: 1rem;
    }

    /* Gallery */
    .course-gallery-section h2 {
        font-size: 1.625rem;
    }

    .gallery-item {
        height: 200px;
    }

    /* Location section */
    .course-location-section h2 {
        font-size: 1.625rem;
    }

    .course-address {
        font-size: 1rem;
    }

    /* Sidebar widgets */
    .sidebar-widget {
        padding: 1.25rem;
    }

    .sidebar-widget h3 {
        font-size: 1.25rem;
    }

    /* Search form */
    .header-search input[type="search"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Form inputs */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
    }

    textarea {
        min-height: 120px;
    }

    /* Filter form */
    .filter-group label {
        font-size: 0.875rem;
    }

    .filter-select {
        font-size: 16px;
    }

    /* Archive header */
    .archive-description {
        font-size: 1rem;
    }

    /* Login/Register modals */
    .modal-content {
        margin: 1rem;
        max-width: 100%;
        padding: 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    /* Profile sections */
    .avatar-upload-btn {
        min-height: 48px;
    }

    /* Map popups on mobile */
    .popup-image {
        height: 100px;
    }

    .course-map-popup h3 {
        font-size: 1rem;
    }

    .course-map-popup .rating {
        font-size: 0.875rem;
    }

    /* Cookie icons in popups */
    .leaflet-popup-content {
        font-size: 14px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets for touch devices */
    a,
    button,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    .rating-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .search-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .course-card:hover {
        transform: none;
    }

    .course-card:hover .course-card-image img {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    /* Active states instead */
    .course-card:active {
        transform: translateY(-4px);
    }

    .btn:active {
        transform: translateY(1px);
    }
}

/* Landscape mobile adjustments */
@media (max-width: 896px) and (orientation: landscape) {
    .course-hero {
        height: 250px;
    }

    .single-course-map-container {
        height: 350px;
        min-height: 350px;
    }

    .courses-map-container {
        height: 350px;
        min-height: 350px;
    }
}

/* iPad and tablet optimizations */
@media (min-width: 735px) and (max-width: 1068px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .course-card-image {
        height: 260px;
    }

    .container {
        padding: 0 24px;
    }
}

/* Mobile header enhancements */
@media (max-width: 734px) {
    .custom-logo {
        max-height: 28px;
    }

    .search-toggle {
        padding: 8px !important;
    }

    .user-login-trigger,
    .user-profile {
        font-size: 0.8125rem !important;
        white-space: nowrap;
    }

    .header-search {
        padding: 12px 16px;
    }

    .header-search input[type="search"] {
        width: 100%;
    }
}

/* ==========================================================================
   YouTube Video Lightbox
   ========================================================================== */

.youtube-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 2rem;
}

.youtube-lightbox.active {
    opacity: 1;
}

.youtube-lightbox iframe {
    width: 100%;
    max-width: 1280px;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
}

@supports (aspect-ratio: 16 / 9) {
    .youtube-lightbox iframe {
        height: auto;
        padding-bottom: 0;
        aspect-ratio: 16 / 9;
    }
}

.youtube-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2.5rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Mobile adjustments for YouTube lightbox */
@media (max-width: 768px) {
    .youtube-lightbox {
        padding: 1rem;
    }

    .youtube-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .youtube-lightbox {
        padding: 0.5rem;
    }

    .youtube-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   Add Course Form
   ========================================================================== */

.add-course-form {
    background: var(--white);
    border-radius: 18px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.add-course-form .form-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.add-course-form .form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
    padding-bottom: 0;
}

.add-course-form .form-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

.add-course-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.add-course-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.add-course-form .required {
    color: #dc3545;
}

.add-course-form input[type="text"],
.add-course-form input[type="email"],
.add-course-form input[type="tel"],
.add-course-form input[type="url"],
.add-course-form textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
    transition: var(--transition-fast);
    font-family: inherit;
}

.add-course-form select {
    width: 100%;
    padding: 14px 18px;
    padding-right: 45px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
    transition: var(--transition-fast);
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23424245" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
}

.add-course-form input[type="text"]:focus,
.add-course-form input[type="email"]:focus,
.add-course-form input[type="tel"]:focus,
.add-course-form input[type="url"]:focus,
.add-course-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.add-course-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%231d8348" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
}

.add-course-form select:hover {
    border-color: var(--text-medium);
}

.add-course-form textarea {
    resize: vertical;
}

.add-course-form input[type="file"] {
    width: 100%;
    padding: 12px;
    font-size: 0.9375rem;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: var(--bg-lighter);
    cursor: pointer;
    transition: var(--transition-fast);
}

.add-course-form input[type="file"]:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.add-course-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    vertical-align: middle;
}

.add-course-form small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.add-course-form .image-preview,
.add-course-form .gallery-preview {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.add-course-form .preview-image {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.add-course-form .preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.add-course-form .form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 2rem;
}

.add-course-form .btn-large {
    padding: 16px 48px;
    font-size: 1.0625rem;
    min-width: 200px;
}

.add-course-form .form-messages {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    display: none;
}

.add-course-form .form-messages.success {
    display: block;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.add-course-form .form-messages.error {
    display: block;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Mobile Responsive */
@media (max-width: 734px) {
    .add-course-form {
        padding: 2rem 1.5rem;
    }

    .add-course-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .add-course-form .form-section {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }

    .add-course-form .form-section h2 {
        font-size: 1.25rem;
    }

    .add-course-form .btn-large {
        width: 100%;
        padding: 14px 32px;
    }
}

/* ==========================================================================
   Social Media Links (Profile Page)
   ========================================================================== */

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 18px;
    background-color: var(--bg-lighter);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.social-link:hover {
    background-color: var(--white);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.social-link svg {
    flex-shrink: 0;
}

.social-link.twitter:hover {
    border-color: #1DA1F2;
    color: #1DA1F2;
}

.social-link.instagram:hover {
    border-color: #E4405F;
    color: #E4405F;
}

.social-link.facebook:hover {
    border-color: #1877F2;
    color: #1877F2;
}

.social-link.linkedin:hover {
    border-color: #0A66C2;
    color: #0A66C2;
}

.social-link.website:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.social-empty-state {
    color: var(--text-medium);
    font-style: italic;
    margin: 1rem 0;
}

.social-display.empty {
    padding: 1rem 0;
}

.edit-social-form {
    margin-top: 1rem;
}

.edit-social-form .form-group {
    margin-bottom: 1.25rem;
}

.edit-social-form label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.edit-social-form input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9375rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-light);
    transition: var(--transition-fast);
    font-family: inherit;
}

.edit-social-form input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.edit-social-form .form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Mobile responsiveness for social links */
@media (max-width: 734px) {
    .social-links {
        flex-direction: column;
    }

    .social-link {
        width: 100%;
        justify-content: center;
    }

    .edit-social-form .form-actions {
        flex-direction: column;
    }

    .edit-social-form .form-actions .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Review Photo Upload & Galleries
   ========================================================================== */

/* Review photo upload */
.form-group input[type="file"] {
    display: none;
}

.file-upload-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 24px;
    background: var(--bg-lighter);
    color: var(--text-dark);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    width: 100%;
    text-align: center;
}

.file-upload-label:hover {
    background: var(--white);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.file-upload-label svg {
    flex-shrink: 0;
}

.file-upload-label.has-files {
    border-style: solid;
    background: rgba(29, 131, 72, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.review-photos-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.review-photos-preview .preview-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-lighter);
    border: 2px solid var(--border-color);
}

.review-photos-preview .preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Toggle review form button */
.btn-toggle-review {
    margin: 2rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-toggle-review:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-toggle-review svg {
    flex-shrink: 0;
}

.review-form-container {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--white);
    border-radius: 18px;
    border: 1px solid var(--border-color);
}

/* Full width sections container */
.course-full-width-sections {
    background: var(--bg-lighter);
    padding: 4rem 0;
    margin-top: 4rem;
}

/* Reviews section */
.course-reviews-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4rem;
}

/* User photos section on course page */
.user-photos-section {
    padding-top: 4rem;
}

.user-photos-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

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

.user-photo-item {
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.user-photo-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.user-photo-link {
    display: block;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-lighter);
}

.user-photo-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.user-photo-credit {
    padding: 1rem 1.25rem;
    background: var(--white);
    font-size: 0.875rem;
    color: var(--text-medium);
}

.user-photo-credit a {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.user-photo-credit a:hover {
    color: var(--primary-color);
}

/* Profile photos section */
.profile-photos-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-lighter);
    border-radius: 18px;
    border: 1px solid var(--border-color);
}

.profile-photos-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

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

.profile-photo-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.profile-photo-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.profile-photo-link {
    display: block;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-lighter);
}

.profile-photo-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.profile-photo-course {
    padding: 0.75rem 1rem;
    background: var(--white);
    font-size: 0.8125rem;
    border-top: 1px solid var(--border-color);
}

.profile-photo-course a {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.profile-photo-course a:hover {
    color: var(--primary-color);
}

/* Mobile responsiveness */
@media (max-width: 734px) {
    .user-photos-section {
        margin-bottom: 3rem;
        padding-bottom: 3rem;
    }

    .user-photos-section h2 {
        font-size: 1.75rem;
    }

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

    .profile-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .review-photos-preview {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.75rem;
    }
}

/* Admin Review Controls */
.review-admin-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-admin-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-admin-action:hover {
    background: var(--bg-lighter);
    border-color: var(--text-medium);
}

.btn-admin-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-admin-delete-review {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-admin-delete-review:hover {
    background: #dc3545;
    color: var(--white);
}

.btn-admin-block-user {
    color: #fd7e14;
    border-color: #fd7e14;
}

.btn-admin-block-user:hover {
    background: #fd7e14;
    color: var(--white);
}

.btn-admin-unblock-user {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-admin-unblock-user:hover {
    background: var(--primary-color);
    color: var(--white);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-badge.blocked {
    background: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
    border: 1px solid rgba(253, 126, 20, 0.3);
}

.btn-admin-action svg {
    flex-shrink: 0;
}

/* Forum Styles */
.forum-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 0;
}

.forum-header {
    margin-bottom: 3rem;
}

.forum-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    transition: var(--transition-fast);
}

.forum-back-link:hover {
    color: var(--primary-color);
}

.forum-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.forum-description {
    font-size: 1.125rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

.forum-login-prompt {
    background: var(--bg-lighter);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin: 2rem 0;
}

.forum-login-prompt a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.forum-login-prompt a:hover {
    text-decoration: underline;
}

/* Forum Form */
.forum-form-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.forum-form-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

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

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

.forum-form input[type="text"],
.forum-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-fast);
}

.forum-form input[type="text"]:focus,
.forum-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* Forum Form Mobile Fixes */
@media (max-width: 768px) {
    .forum-form-container {
        margin: 1rem;
        padding: 1.25rem;
        border-radius: 12px;
    }

    .forum-form-container h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .forum-form .form-group {
        margin-bottom: 1rem;
    }

    .forum-form input[type="text"],
    .forum-form textarea {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 12px;
        border-radius: 8px;
    }

    .forum-form .form-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .forum-form .form-actions .btn {
        width: 100%;
    }

    .forum-header {
        padding: 1.5rem 1rem;
        text-align: center;
    }

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

    .forum-description {
        font-size: 0.9375rem;
    }

    #forum-new-topic-btn {
        width: 100%;
        margin-top: 1rem;
    }

    .forum-search-container {
        padding: 0 1rem;
        margin: 1rem 0;
    }

    .forum-search-form input[type="text"] {
        font-size: 16px; /* Prevents iOS zoom */
    }
}

/* Photo Upload Area - Slick drag & drop style */
.photo-upload-area {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
    transition: all 0.2s ease;
    overflow: hidden;
}

.photo-upload-area:hover,
.photo-upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(29, 131, 72, 0.05);
}

.photo-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.photo-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    pointer-events: none;
}

.photo-upload-placeholder svg {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.photo-upload-area:hover .photo-upload-placeholder svg {
    color: var(--primary-color);
}

.photo-upload-placeholder .upload-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 0.25rem;
}

.photo-upload-placeholder .upload-hint {
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* Photo Preview Grid */
.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.photo-preview-grid:empty {
    display: none;
}

.photo-preview-grid:empty + .photo-upload-placeholder {
    display: flex;
}

.photo-upload-area.has-photos .photo-upload-placeholder {
    display: none;
}

.photo-upload-area.has-photos {
    border-style: solid;
    background: var(--white);
}

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

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-preview-item:hover .photo-preview-remove {
    opacity: 1;
}

.photo-preview-remove svg {
    width: 14px;
    height: 14px;
}

/* Add more button when photos exist */
.photo-add-more {
    aspect-ratio: 1;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-add-more:hover {
    border-color: var(--primary-color);
    background: rgba(29, 131, 72, 0.05);
}

.photo-add-more svg {
    width: 24px;
    height: 24px;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.photo-add-more span {
    font-size: 0.75rem;
    color: var(--text-light);
}

.form-actions {
    display: flex;
    gap: 1rem;
}

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

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

/* Forum Topics List */
.forum-topics-list {
    background: var(--white);
    border-radius: 18px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.forum-topics-header {
    display: grid;
    grid-template-columns: 1fr 100px 100px 180px;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-lighter);
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-medium);
}

.forum-topic-item {
    display: grid;
    grid-template-columns: 1fr 100px 100px 180px;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

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

.forum-topic-item:hover {
    background: rgba(29, 131, 72, 0.02);
}

.forum-topic-item.forum-topic-hot .forum-topic-icon {
    color: #dc3545;
}

.forum-topic-item.forum-topic-warm .forum-topic-icon {
    color: #fd7e14;
}

.forum-col-topic {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.forum-topic-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary-color);
}

.forum-topic-content {
    flex: 1;
    min-width: 0;
}

.forum-topic-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

.forum-topic-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.forum-topic-title a:hover {
    color: var(--primary-color);
}

.forum-topic-meta {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.forum-topic-author strong {
    color: var(--text-dark);
    font-weight: 600;
}

.forum-col-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.forum-stat-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
}

.forum-col-last-post {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.forum-last-post-time {
    font-size: 0.875rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.forum-last-post-author {
    font-size: 0.8125rem;
    color: var(--text-medium);
}

.forum-last-post-author strong {
    color: var(--text-dark);
    font-weight: 600;
}

.forum-no-topics {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-lighter);
    border-radius: 18px;
}

/* Single Topic View */
.forum-topic-post,
.forum-reply {
    background: var(--white);
    padding: 2rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.forum-topic-post {
    border: 2px solid var(--primary-color);
}

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

.forum-post-author {
    display: flex;
    gap: 1rem;
}

.forum-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.forum-avatar-link {
    display: block;
    flex-shrink: 0;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.forum-avatar-link:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.forum-avatar-link .forum-avatar {
    display: block;
}

.forum-topic-post .forum-avatar {
    width: 60px;
    height: 60px;
}

.forum-author-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.forum-author-link {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.forum-author-link:hover {
    color: var(--primary-color);
}

.forum-topic-meta .forum-author-link,
.forum-last-post-author .forum-author-link {
    color: inherit;
}

.forum-topic-meta .forum-author-link:hover,
.forum-last-post-author .forum-author-link:hover {
    color: var(--primary-color);
}

.forum-author-info time {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.forum-post-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dark);
}

/* Rich Text Content Formatting */
.forum-post-content h1,
.forum-post-content h2,
.forum-post-content h3 {
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.forum-post-content h1 {
    font-size: 2rem;
}

.forum-post-content h2 {
    font-size: 1.5rem;
}

.forum-post-content h3 {
    font-size: 1.25rem;
}

.forum-post-content p {
    margin-bottom: 1rem;
}

.forum-post-content ul,
.forum-post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.forum-post-content li {
    margin-bottom: 0.5rem;
}

.forum-post-content strong {
    font-weight: 600;
    color: var(--text-dark);
}

.forum-post-content em {
    font-style: italic;
}

.forum-post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.forum-post-content a:hover {
    color: var(--primary-hover);
}

.forum-post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-medium);
}

.forum-post-content code {
    background: var(--bg-lighter);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.forum-post-content pre {
    background: var(--bg-lighter);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.forum-post-content pre code {
    background: none;
    padding: 0;
}

/* Forum Post Photos */
.forum-post-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.forum-post-photos a {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
}

.forum-post-photos a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.forum-post-photos img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Quill Editor Styling */
.quill-editor {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-height: 200px;
}

.ql-toolbar {
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: 12px 12px 0 0 !important;
    background: var(--bg-lighter);
}

.ql-container {
    border: none !important;
    font-size: 1rem;
    font-family: inherit;
}

.ql-editor {
    min-height: 150px;
    padding: 1rem;
}

.ql-editor.ql-blank::before {
    color: var(--text-medium);
    font-style: normal;
}

/* Quill Editor Mobile Fixes */
@media (max-width: 768px) {
    .quill-editor {
        min-height: 160px;
        border-radius: 8px;
    }

    .ql-toolbar {
        padding: 8px !important;
        flex-wrap: wrap;
        border-radius: 8px 8px 0 0 !important;
    }

    .ql-toolbar .ql-formats {
        margin-right: 8px;
        margin-bottom: 4px;
    }

    .ql-toolbar button {
        width: 32px !important;
        height: 32px !important;
        padding: 4px !important;
    }

    .ql-toolbar .ql-picker {
        height: 32px !important;
    }

    .ql-container {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }

    .ql-editor {
        min-height: 120px;
        padding: 12px;
        font-size: 16px !important; /* Prevents iOS zoom */
        line-height: 1.5;
        -webkit-user-select: text;
        user-select: text;
        -webkit-touch-callout: default;
    }

    .ql-editor.ql-blank::before {
        font-size: 16px;
        left: 12px;
    }
}

/* File Input Styling */
input[type="file"] {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--white);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

input[type="file"]:hover {
    border-color: var(--primary-color);
    background: var(--bg-lighter);
}

input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-hover);
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Forum Search */
.forum-search-container {
    margin: 2rem 0;
}

.forum-search-form {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.forum-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-medium);
    pointer-events: none;
}

.forum-search-form input[type="text"] {
    width: 100%;
    padding: 1rem 3.5rem 1rem 3rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
    color: var(--text-dark);
    transition: var(--transition-fast);
}

.forum-search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.forum-search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-lighter);
    color: var(--text-medium);
    transition: var(--transition-fast);
}

.forum-search-clear:hover {
    background: var(--text-medium);
    color: var(--white);
}

.forum-search-results {
    padding: 1rem 1.5rem;
    background: rgba(29, 131, 72, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* Forum Post Actions */
.forum-post-actions {
    display: flex;
    gap: 0.5rem;
}

.forum-edit-topic,
.forum-edit-reply {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: 8px;
}

.forum-edit-topic:hover,
.forum-edit-reply:hover {
    background: var(--bg-lighter);
    color: var(--primary-color);
}

.forum-delete-topic,
.forum-delete-reply {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: 8px;
}

.forum-delete-topic:hover,
.forum-delete-reply:hover {
    background: var(--bg-lighter);
    color: #dc3545;
}

.forum-report-topic,
.forum-report-reply {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: 8px;
}

.forum-report-topic:hover,
.forum-report-reply:hover {
    background: var(--bg-lighter);
    color: #f59e0b;
}

/* Forum Edit Forms */
.forum-post-content-edit {
    margin-top: 1.5rem;
}

.forum-edit-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

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

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

/* Forum Replies Section */
.forum-replies-section {
    margin-top: 3rem;
}

.forum-replies-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.forum-replies-list {
    margin-bottom: 3rem;
}

.forum-no-replies {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-lighter);
    border-radius: 18px;
    color: var(--text-medium);
}

.forum-reply-button-container {
    margin-bottom: 2rem;
}

.forum-reply-form-container {
    background: var(--bg-lighter);
    padding: 2rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
}

.forum-reply-form-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* Forum Report Modal */
.forum-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forum-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.forum-modal-content {
    position: relative;
    z-index: 2;
    background: var(--white);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.forum-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.forum-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.forum-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: 8px;
}

.forum-modal-close:hover {
    background: var(--bg-lighter);
    color: var(--text-dark);
}

.forum-modal-body {
    padding: 2rem;
}

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

.forum-modal-body .form-group:last-of-type {
    margin-bottom: 0;
}

.forum-modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.forum-modal-body select,
.forum-modal-body textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-dark);
    transition: var(--transition-fast);
}

.forum-modal-body select:focus,
.forum-modal-body textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.forum-modal-body .form-messages {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.forum-modal-body .form-messages.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.forum-modal-body .form-messages.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.forum-modal-body .form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .forum-title {
        font-size: 2rem;
    }

    .forum-topic-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .forum-topic-stats {
        width: 100%;
    }

    .forum-topic-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .forum-post-header {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* ==========================================================================
   COMPREHENSIVE MOBILE OPTIMIZATIONS
   ========================================================================== */

/* ==========================================================================
   Mobile Header & Navigation Enhancements
   ========================================================================== */

@media (max-width: 734px) {
    /* Improved header spacing and touch targets */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .site-header .container {
        display: flex;
        flex-wrap: wrap;
        min-height: 56px;
        padding: 8px 16px;
        position: relative;
    }

    /* Logo sizing for mobile */
    .site-logo a {
        font-size: 1.125rem;
    }

    .custom-logo {
        max-height: 32px;
    }

    /* Show hamburger menu on mobile */
    .menu-toggle {
        display: flex;
        order: 3;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        padding: 10px;
        border-radius: 8px;
        -webkit-tap-highlight-color: transparent;
    }

    .menu-toggle:active {
        background: var(--bg-light);
    }

    .menu-toggle span {
        width: 22px;
        height: 2px;
        background-color: var(--text-dark);
        border-radius: 2px;
    }

    /* Better mobile navigation dropdown */
    .main-navigation {
        display: none;
        position: static;
        width: 100%;
        order: 4;
        flex-basis: 100%;
        background: var(--white);
        border-top: 1px solid var(--border-color);
        margin-top: 8px;
        padding-top: 8px;
    }

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

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

    .main-navigation a {
        padding: 12px 16px;
        border-radius: 0;
    }

    /* Header actions order */
    .header-actions {
        order: 2;
        margin-left: auto;
    }

    /* Hide desktop elements from header on mobile - show only mobile-header-icons */
    .header-actions .search-toggle,
    .header-actions .friend-activity-dropdown,
    .header-actions .user-profile,
    .header-actions .user-profile-avatar {
        display: none !important;
    }

    /* Style login trigger for mobile */
    .header-actions .user-login-trigger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 8px 16px;
        background: var(--primary-color);
        color: white !important;
        border-radius: 20px;
        font-size: 0.875rem;
        font-weight: 500;
        text-decoration: none;
    }

    .main-navigation ul {
        padding: 16px 0;
        gap: 0;
    }

    /* Mobile menu extras - only visible on mobile */
    .mobile-menu-extras {
        display: block;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        margin-top: 8px;
        padding: 16px;
    }

    /* Mobile search in menu */
    .mobile-menu-search {
        margin-bottom: 12px;
    }

    .mobile-menu-search .search-form {
        display: block;
    }

    .mobile-menu-search .search-form-inner {
        display: flex;
        align-items: center;
        gap: 0;
        background: var(--bg-lighter);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        overflow: hidden;
    }

    .mobile-menu-search .search-field {
        flex: 1;
        padding: 14px 16px;
        font-size: 16px;
        border: none;
        background: transparent;
        color: var(--text-dark);
        -webkit-appearance: none;
        min-width: 0;
    }

    .mobile-menu-search .search-field:focus {
        outline: none;
    }

    .mobile-menu-search .search-form-inner:focus-within {
        border-color: var(--primary-color);
        background: var(--white);
    }

    .mobile-menu-search .search-submit {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        padding: 0;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 0;
        cursor: pointer;
        -webkit-appearance: none;
        flex-shrink: 0;
    }

    .mobile-menu-search .search-submit:active {
        background: var(--secondary-color);
    }

    .mobile-menu-search .search-submit svg {
        width: 20px;
        height: 20px;
    }

    .mobile-menu-search .screen-reader-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Mobile friend requests in menu */
    .mobile-friend-requests {
        margin-top: 8px;
    }

    .mobile-friend-requests-toggle {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 14px 16px;
        background: var(--bg-lighter);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-dark);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        text-align: left;
    }

    .mobile-friend-requests-toggle:active {
        background: var(--bg-light);
    }

    .mobile-friend-requests-toggle svg {
        flex-shrink: 0;
        color: var(--text-medium);
    }

    .mobile-friend-requests-toggle span:first-of-type {
        flex: 1;
    }

    .mobile-friend-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        background: #e74c3c;
        color: white;
        font-size: 0.75rem;
        font-weight: 600;
        border-radius: 11px;
    }

    /* Mobile friend requests panel */
    .mobile-friend-requests-panel {
        display: none;
        margin-top: 8px;
        background: var(--white);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        overflow: hidden;
    }

    .mobile-friend-requests.active .mobile-friend-requests-panel {
        display: block;
    }

    .mobile-friend-requests-panel .panel-content {
        max-height: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-friend-requests-panel .loading-spinner {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }

    .mobile-friend-requests-panel .friend-request-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-friend-requests-panel .friend-request-item:last-child {
        border-bottom: none;
    }

    .mobile-friend-requests-panel .request-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }

    .mobile-friend-requests-panel .request-info {
        flex: 1;
        min-width: 0;
    }

    .mobile-friend-requests-panel .request-name {
        font-weight: 600;
        color: var(--text-dark);
        font-size: 0.9375rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-friend-requests-panel .request-time {
        font-size: 0.75rem;
        color: var(--text-light);
    }

    .mobile-friend-requests-panel .request-actions {
        display: flex;
        gap: 6px;
    }

    .mobile-friend-requests-panel .request-actions .btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-height: 32px;
    }

    .mobile-friend-requests-panel .no-requests {
        text-align: center;
        padding: 2rem 1rem;
        color: var(--text-medium);
        font-size: 0.9375rem;
    }

    .main-navigation li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        padding: 16px 24px;
        font-size: 1.0625rem;
        font-weight: 500;
        min-height: 52px;
        display: flex;
        align-items: center;
    }

    /* Header actions on mobile */
    .header-actions {
        gap: 8px;
    }

    .header-actions > * {
        min-width: 44px;
        min-height: 44px;
    }

    .search-toggle,
    .friend-requests-toggle {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        -webkit-tap-highlight-color: transparent;
    }

    .search-toggle:active,
    .friend-requests-toggle:active {
        background: var(--bg-light);
    }

    .user-profile,
    .user-login-trigger {
        padding: 8px 12px !important;
        font-size: 0.875rem !important;
        min-height: 44px;
        display: flex;
        align-items: center;
        border-radius: 8px;
        -webkit-tap-highlight-color: transparent;
    }

    /* Friend requests dropdown on mobile */
    .friend-requests-panel {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: calc(100vh - 56px);
        border-radius: 0;
        transform: translateY(-10px);
    }

    .friend-requests-dropdown.active .friend-requests-panel {
        transform: translateY(0);
    }

    /* Header search on mobile */
    .header-search {
        padding: 16px;
    }

    .header-search .search-field {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 14px 50px 14px 16px;
    }
}

/* ==========================================================================
   Mobile Homepage Optimizations
   ========================================================================== */

@media (max-width: 734px) {
    /* Hero section mobile */
    .hero-video-section {
        height: 65vh;
        min-height: 380px;
        max-height: 600px;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
        line-height: 1.1;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.4;
    }

    .btn-hero {
        font-size: 0.9375rem;
        padding: 14px 28px;
        min-height: 48px;
    }

    /* Featured courses section */
    .featured-courses {
        padding: 3rem 0 4rem !important;
    }

    .featured-courses > .container > p {
        font-size: 1rem !important;
        margin-bottom: 2.5rem !important;
    }

    /* Regions section */
    .regions-section {
        padding: 3rem 0 4rem !important;
    }

    .regions-section h2 {
        font-size: 2rem !important;
    }

    .regions-section > .container > p {
        font-size: 1rem !important;
        margin-bottom: 2.5rem !important;
    }

    .regions-section .card {
        border-radius: 14px;
    }

    .regions-section .card-content {
        padding: 1.5rem 1rem !important;
    }

    .regions-section .card-content h3 {
        font-size: 1.25rem !important;
    }
}

/* Small mobile (iPhone SE, etc.) */
@media (max-width: 375px) {
    .hero-video-section {
        height: 60vh;
        min-height: 350px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.9375rem;
    }

    .btn-hero {
        font-size: 0.875rem;
        padding: 12px 24px;
    }
}

/* ==========================================================================
   Mobile Course Cards & Grid
   ========================================================================== */

@media (max-width: 734px) {
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .course-card {
        border-radius: 16px;
    }

    .course-card-image {
        height: 200px;
    }

    .course-card-content {
        padding: 1.25rem;
    }

    .course-card-title {
        font-size: 1.25rem;
        margin-bottom: 0.375rem;
    }

    .course-card-location {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .course-card-excerpt {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Course rating on mobile */
    .course-rating {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .cookies {
        gap: 2px;
    }

    .cookie {
        font-size: 1.125rem;
    }

    .rating-value {
        font-size: 1.125rem;
    }

    /* Course card meta stacking */
    .course-card-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding-top: 1rem;
    }

    .course-card-details {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .course-card-detail {
        flex: 1;
        min-width: 80px;
    }

    .course-card-meta .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        min-height: 48px;
    }
}

/* ==========================================================================
   Mobile Single Course Page
   ========================================================================== */

@media (max-width: 734px) {
    .course-hero {
        max-height: none;
        height: 45vh;
        min-height: 280px;
    }

    .course-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .course-header {
        padding: 1.25rem 0 1rem;
        margin-bottom: 1.25rem;
    }

    .course-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .course-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .btn-edit-course {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .course-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* Course body layout */
    .course-body {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .course-main {
        width: 100%;
    }

    .course-sidebar {
        width: 100%;
        position: static;
    }

    /* Course description */
    .course-description {
        margin-bottom: 1.25rem;
    }

    /* Course details section */
    .course-details-section {
        padding: 1.25rem;
        border-radius: 14px;
        margin-bottom: 1.5rem;
    }

    /* Full width sections on mobile - reduce spacing */
    .course-full-width-sections {
        padding: 2rem 0;
        margin-top: 1.5rem;
    }

    .course-reviews-section {
        padding-bottom: 2rem;
    }

    .course-reviews-section h2 {
        font-size: 1.375rem;
        margin-bottom: 1.25rem;
    }

    /* User photos section on mobile */
    .user-photos-section {
        padding-top: 2rem;
    }

    .user-photos-section h2 {
        font-size: 1.375rem;
        margin-bottom: 1.25rem;
    }

    .user-photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .user-photo-item {
        border-radius: 12px;
    }

    .user-photo-credit {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    /* Reviews list on mobile */
    .reviews-list {
        gap: 1rem;
    }

    .review-item {
        padding: 1rem;
        border-radius: 12px;
    }

    /* Sidebar widgets on mobile - tighter spacing */
    .sidebar-widget {
        margin-bottom: 1rem;
    }

    .sidebar-widget:last-child {
        margin-bottom: 0;
    }

    .course-details-section h2 {
        font-size: 1.375rem;
        margin-bottom: 1.25rem;
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .detail-value {
        font-size: 1.25rem;
    }

    /* Course gallery mobile */
    .course-gallery-section {
        margin-bottom: 2rem;
    }

    .course-gallery-section h2 {
        font-size: 1.375rem;
        margin-bottom: 1.25rem;
    }

    .course-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .gallery-item {
        border-radius: 10px;
    }

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

    /* Course location section */
    .course-location-section h2 {
        font-size: 1.375rem;
    }

    /* Sidebar widgets mobile */
    .sidebar-widget {
        border-radius: 14px;
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .sidebar-widget h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    /* Map on mobile */
    #course-map {
        border-radius: 14px;
        min-height: 300px;
    }
}

/* ==========================================================================
   Mobile Course Archive Page
   ========================================================================== */

@media (max-width: 734px) {
    .archive-header {
        padding: 2.5rem 0 2rem;
        margin-bottom: 2rem;
    }

    .archive-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .archive-description {
        font-size: 1rem;
    }

    /* Course filters mobile */
    .course-filters {
        padding: 1.25rem;
        border-radius: 14px;
        margin-bottom: 1.5rem;
    }

    .filter-form {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-group label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }

    .filter-select {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 12px 40px 12px 14px;
        min-height: 48px;
    }

    .filter-btn {
        width: 100%;
        min-height: 48px;
    }

    .clear-filters {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    /* Map container on archive */
    .courses-map-container {
        height: 350px;
        min-height: 350px;
        margin-bottom: 1.5rem;
    }

    #courses-map {
        border-radius: 14px;
    }
}

/* ==========================================================================
   Mobile Profile Page
   ========================================================================== */

@media (max-width: 734px) {
    .profile-page {
        padding: 1.5rem 0;
    }

    /* Profile header mobile */
    .profile-header {
        padding: 2.5rem 1.5rem;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }

    .profile-avatar img {
        border-width: 3px;
    }

    .avatar-upload-btn {
        width: 36px;
        height: 36px;
        border-width: 2px;
    }

    .profile-name {
        font-size: 1.75rem;
    }

    .profile-username {
        font-size: 0.9375rem;
    }

    /* Profile stats mobile */
    .profile-stats {
        gap: 1.5rem;
        margin-top: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-item {
        min-width: 70px;
        padding: 8px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8125rem;
    }

    /* Profile contact info mobile */
    .profile-contact-info {
        flex-direction: column;
        gap: 0.75rem;
    }

    .profile-header .profile-contact-info .contact-item {
        padding: 10px 14px;
        border-radius: 8px;
        width: 100%;
        justify-content: center;
    }

    /* Friend action mobile */
    .profile-friend-action {
        width: 100%;
        margin-top: 1.5rem;
    }

    .profile-friend-action .btn {
        width: 100%;
        min-height: 48px;
    }

    .friend-status-badge {
        width: 100%;
        justify-content: center;
    }

    .friend-request-actions {
        width: 100%;
        flex-direction: column;
    }

    .friend-request-actions .btn {
        width: 100%;
    }

    /* Profile sections mobile */
    .profile-edit-section,
    .profile-bio-section {
        padding: 1.25rem;
        border-radius: 14px;
        margin-bottom: 1.25rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding-bottom: 1rem;
        margin-bottom: 1.25rem;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .btn-link {
        padding: 0.5rem 0;
    }

    /* Profile fields mobile */
    .profile-field {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 1rem 0;
    }

    .field-label {
        font-size: 0.8125rem;
    }

    .field-value {
        font-size: 1rem;
    }

    /* Edit form mobile */
    .edit-profile-form,
    .profile-display {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .edit-profile-form input[type="text"],
    .edit-profile-form input[type="tel"],
    .edit-profile-form input[type="email"],
    .edit-profile-form input[type="url"] {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 14px;
        min-height: 48px;
    }

    .edit-profile-form .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .edit-profile-form .form-actions button {
        width: 100%;
        min-height: 48px;
    }

    /* Privacy settings mobile */
    .privacy-preview-buttons {
        padding: 1.25rem;
    }

    .preview-btn-group {
        flex-direction: column;
    }

    .preview-btn-group .btn {
        width: 100%;
        min-height: 48px;
    }

    .privacy-item {
        padding: 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .privacy-field {
        font-size: 0.9375rem;
    }

    /* Profile reviews mobile */
    .user-review-item {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .review-course-info {
        flex-direction: column;
        gap: 0.75rem;
    }

    .review-course-info h3 {
        font-size: 1.125rem;
    }

    .review-rating {
        align-self: flex-start;
        padding: 6px 12px;
    }

    .review-rating .rating-number {
        font-size: 1.125rem;
    }

    /* Delete account section mobile */
    .delete-account-section {
        padding: 1.25rem;
    }

    .delete-modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .delete-modal-actions {
        flex-direction: column;
    }

    .delete-modal-actions .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Mobile Forum Page
   ========================================================================== */

@media (max-width: 734px) {
    .forum-container {
        padding: 1.5rem 0;
    }

    .forum-header {
        margin-bottom: 2rem;
    }

    .forum-back-link {
        font-size: 0.875rem;
    }

    .forum-title {
        font-size: 1.75rem;
    }

    .forum-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .forum-header .btn {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }

    /* Forum search mobile */
    .forum-search-container {
        margin: 1.5rem 0;
    }

    .forum-search-form input[type="text"] {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 14px 48px 14px 44px;
        min-height: 48px;
    }

    /* Forum form mobile */
    .forum-form-container {
        padding: 1.25rem;
        border-radius: 14px;
        margin-bottom: 2rem;
    }

    .forum-form-container h2 {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .forum-form input[type="text"],
    .forum-form textarea {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 14px;
    }

    /* Quill editor mobile */
    .quill-editor {
        min-height: 180px;
    }

    .ql-editor {
        min-height: 140px;
        font-size: 16px;
    }

    /* Forum topics list mobile - card style */
    .forum-topics-list {
        border-radius: 14px;
    }

    .forum-topics-header {
        display: none; /* Hide header columns on mobile */
    }

    .forum-topic-item {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
        grid-template-columns: none;
    }

    .forum-col-topic {
        width: 100%;
    }

    .forum-topic-icon {
        display: none; /* Hide icon on mobile to save space */
    }

    .forum-topic-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .forum-topic-meta {
        font-size: 0.8125rem;
    }

    /* Stats row on mobile */
    .forum-col-stats {
        display: none; /* Hide individual stats columns */
    }

    .forum-topic-item::after {
        content: attr(data-replies) " replies • " attr(data-views) " views";
        font-size: 0.8125rem;
        color: var(--text-medium);
        display: none; /* Hidden by default, would need JS to populate */
    }

    .forum-col-last-post {
        width: 100%;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
        margin-top: 0.25rem;
    }

    .forum-last-post-time,
    .forum-last-post-author {
        font-size: 0.8125rem;
    }

    /* Single topic mobile */
    .forum-topic-post,
    .forum-reply {
        padding: 1.25rem;
        border-radius: 14px;
        margin-bottom: 1.25rem;
    }

    .forum-post-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .forum-post-author {
        gap: 0.75rem;
    }

    .forum-avatar {
        width: 44px;
        height: 44px;
    }

    .forum-topic-post .forum-avatar {
        width: 50px;
        height: 50px;
    }

    .forum-author-info h4 {
        font-size: 1rem;
    }

    .forum-author-info time {
        font-size: 0.8125rem;
    }

    .forum-post-actions {
        width: 100%;
        justify-content: flex-start;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
        gap: 0.75rem;
    }

    .forum-edit-topic,
    .forum-edit-reply,
    .forum-delete-topic,
    .forum-delete-reply,
    .forum-report-topic,
    .forum-report-reply {
        padding: 8px;
        border-radius: 6px;
    }

    /* Post content mobile */
    .forum-post-content-display,
    .forum-post-content {
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    /* Post photos mobile */
    .forum-post-photos {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .forum-post-photos img {
        height: 140px;
    }

    /* Replies section mobile */
    .forum-replies-section h2 {
        font-size: 1.375rem;
        margin-bottom: 1.25rem;
    }

    .forum-reply-button-container {
        margin-bottom: 1.5rem;
    }

    .forum-reply-button-container .btn {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }

    .forum-reply-form-container {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .forum-reply-form-container h3 {
        font-size: 1.125rem;
    }

    .forum-login-prompt {
        padding: 1.25rem;
        border-radius: 12px;
    }

    /* Forum modal mobile */
    .forum-modal-content {
        width: 95%;
        max-height: 85vh;
        border-radius: 16px;
    }

    .forum-modal-header {
        padding: 1.25rem;
    }

    .forum-modal-header h3 {
        font-size: 1.25rem;
    }

    .forum-modal-body {
        padding: 1.25rem;
    }

    .forum-modal-body select,
    .forum-modal-body textarea {
        font-size: 16px; /* Prevent iOS zoom */
    }

    .forum-modal-body .form-actions {
        flex-direction: column;
    }

    .forum-modal-body .form-actions .btn {
        width: 100%;
        min-height: 48px;
    }
}

/* ==========================================================================
   Mobile Forms & Modals
   ========================================================================== */

@media (max-width: 734px) {
    /* Auth modal mobile */
    .auth-modal {
        padding: 16px;
    }

    .auth-modal-content {
        padding: 1.5rem;
        border-radius: 16px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .auth-modal-close {
        top: 1rem;
        right: 1rem;
    }

    .auth-tabs {
        gap: 0.5rem;
    }

    .auth-tab {
        padding: 0.875rem 0.5rem;
        font-size: 0.9375rem;
    }

    .auth-form-container h2 {
        font-size: 1.5rem;
    }

    .auth-subtitle {
        font-size: 0.9375rem;
    }

    .auth-form input[type="text"],
    .auth-form input[type="email"],
    .auth-form input[type="password"] {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 14px;
        min-height: 48px;
    }

    .form-remember {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .auth-form .btn-block {
        min-height: 48px;
    }

    /* Review form mobile */
    .review-form-container {
        padding: 1.25rem;
        border-radius: 14px;
        margin-bottom: 2rem;
    }

    .review-form-container h3 {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .rating-input {
        gap: 0.375rem;
        flex-wrap: wrap;
    }

    .rating-btn {
        width: 42px;
        height: 42px;
        font-size: 0.9375rem;
    }

    .course-review-form textarea {
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 120px;
    }

    .review-form-actions {
        flex-direction: column;
    }

    .review-form-actions .btn {
        width: 100%;
        min-height: 48px;
    }

    /* Reviews list mobile */
    .reviews-list {
        gap: 1.25rem;
    }

    .review-item {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .review-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .review-author {
        gap: 0.75rem;
    }

    .review-avatar {
        width: 44px;
        height: 44px;
    }

    .review-author-info h4 {
        font-size: 0.9375rem;
    }

    .review-rating {
        align-self: flex-start;
    }

    .review-content {
        font-size: 0.9375rem;
    }

    /* Add course form mobile */
    .add-course-form {
        padding: 1.5rem;
        border-radius: 14px;
    }

    .add-course-form .form-section {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }

    .add-course-form .form-section h2 {
        font-size: 1.25rem;
    }

    .add-course-form .form-row {
        grid-template-columns: 1fr;
    }

    .add-course-form input[type="text"],
    .add-course-form input[type="email"],
    .add-course-form input[type="tel"],
    .add-course-form input[type="url"],
    .add-course-form textarea,
    .add-course-form select {
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 48px;
    }

    .add-course-form .form-actions {
        flex-direction: column;
    }

    .add-course-form .btn-large {
        width: 100%;
        min-height: 52px;
    }

    /* Friends modal mobile */
    .friends-modal {
        padding: 0;
    }

    .friends-modal-content {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        animation: slideUpModal 0.3s ease;
    }

    @keyframes slideUpModal {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .friends-modal-header {
        padding: 1.25rem;
        position: relative;
    }

    /* Add drag indicator for mobile sheet */
    .friends-modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: var(--border-color);
        border-radius: 2px;
    }

    .friends-modal-search {
        padding: 0.75rem 1.25rem;
    }

    .friends-modal-search input {
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 44px;
    }

    .friend-list-item {
        padding: 0.875rem 1.25rem;
    }

    .friend-list-avatar {
        width: 44px;
        height: 44px;
    }
}

/* ==========================================================================
   Mobile Footer
   ========================================================================== */

@media (max-width: 734px) {
    .site-footer {
        padding: 2rem 0;
        margin-top: 3rem;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .footer-sep {
        display: none;
    }

    .footer-links a {
        display: block;
        padding: 8px 0;
        font-size: 0.9375rem;
    }

    .footer-bottom p {
        font-size: 0.8125rem;
    }
}

/* ==========================================================================
   Mobile Lightbox
   ========================================================================== */

@media (max-width: 734px) {
    .lightbox-overlay img {
        max-width: 95%;
        max-height: 85%;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.75rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.75rem;
    }

    .lightbox-prev {
        left: 0.75rem;
    }

    .lightbox-next {
        right: 0.75rem;
    }

    .lightbox-counter {
        bottom: 1rem;
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }
}

/* ==========================================================================
   Touch Device Optimizations
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    /* Ensure all interactive elements have adequate tap targets */
    a,
    button,
    .btn,
    input[type="submit"],
    input[type="button"],
    .rating-btn,
    .menu-toggle,
    .search-toggle,
    .friend-requests-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover transforms on touch */
    .course-card:hover,
    .card:hover,
    .gallery-item:hover,
    .user-photo-item:hover {
        transform: none;
    }

    .course-card:hover .course-card-image img,
    .user-photo-link:hover img,
    .profile-photo-link:hover img {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    /* Add active states for touch feedback */
    .course-card:active {
        transform: scale(0.98);
    }

    .btn:active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    .card:active {
        transform: scale(0.98);
    }

    /* Faster transitions for touch */
    .btn,
    .course-card,
    .card {
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    /* Disable hover effects that might stick on touch */
    .main-navigation a:hover::after {
        transform: scaleX(0);
    }

    /* Better scroll behavior */
    .main-navigation,
    .forum-modal-content,
    .auth-modal-content,
    .friends-modal-body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* ==========================================================================
   Landscape Mobile Optimizations
   ========================================================================== */

@media (max-width: 896px) and (orientation: landscape) {
    .hero-video-section {
        height: 85vh;
        min-height: 300px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
    }

    .profile-header {
        padding: 2rem 1.5rem;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    /* Two-column grid for landscape */
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .course-card-image {
        height: 160px;
    }
}

/* ==========================================================================
   Safe Area Insets (for iPhone X and newer)
   ========================================================================== */

@supports (padding: max(0px)) {
    .site-header {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .site-footer {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    .main-navigation.active {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .auth-modal,
    .forum-modal,
    .friends-modal {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .friends-modal-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ==========================================================================
   Print Styles - Hide Navigation on Print
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .main-navigation,
    .header-actions,
    .btn,
    .forum-post-actions,
    .review-form-container {
        display: none !important;
    }

    .profile-header {
        background: none !important;
        color: var(--text-dark) !important;
        padding: 1rem 0 !important;
    }

    .profile-name,
    .profile-username {
        color: var(--text-dark) !important;
    }
}

/* ==========================================================================
   Map Locate Button & User Location Marker
   ========================================================================== */

/* Locate button */
.locate-control {
    margin-top: 10px !important;
}

.locate-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    height: 34px !important;
    background: white !important;
    color: #666 !important;
    text-decoration: none !important;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.locate-btn:hover {
    background: #f4f4f4 !important;
    color: #333 !important;
}

.locate-btn.locating {
    animation: pulse-locate 1s ease-in-out infinite;
}

.locate-btn.located {
    color: #4285f4 !important;
}

.locate-btn svg {
    width: 18px;
    height: 18px;
}

@keyframes pulse-locate {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* User location marker - blue dot */
.user-location-marker {
    background: transparent !important;
    border: none !important;
}

/* Course marker styles with smooth transitions */
.course-marker-dot {
    background-color: #1d8348;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.course-marker-dot.highlighted {
    background-color: #d32f2f;
    transform: scale(1.3);
    box-shadow: 0 4px 12px rgba(211,47,47,0.4);
}

/* ==========================================================================
   Club Admin System
   ========================================================================== */

/* Club Admin Widget in Sidebar */
.club-admin-widget {
    background: linear-gradient(135deg, rgba(29, 131, 72, 0.08) 0%, rgba(29, 131, 72, 0.02) 100%);
    border: 1px solid rgba(29, 131, 72, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.club-admin-widget h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #1d8348;
}

.club-admin-widget h3 svg {
    flex-shrink: 0;
}

.club-admin-status {
    margin-bottom: 1rem;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-badge.site-admin {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
}

.admin-badge.club-admin {
    background: linear-gradient(135deg, #1d8348, #166534);
    color: white;
}

.btn-club-admin-edit,
.btn-request-club-admin {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Club Admin Modals */
.club-admin-request-modal,
.club-admin-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.club-admin-request-modal-content,
.club-admin-edit-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.club-admin-edit-modal-content {
    max-width: 600px;
}

.club-admin-request-header,
.club-admin-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.club-admin-request-header h3,
.club-admin-edit-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.club-admin-request-close,
.club-admin-edit-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.club-admin-request-close:hover,
.club-admin-edit-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

#club-admin-request-form,
#club-admin-edit-form,
.club-admin-request-form {
    padding: 1.5rem;
}

.club-admin-request-form .request-intro {
    margin-bottom: 1.25rem;
    color: var(--text-medium);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.club-admin-request-form .request-intro strong {
    color: var(--text-dark);
}

.club-admin-request-form .form-group {
    margin-bottom: 1.25rem;
}

.club-admin-request-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.club-admin-request-form label .required {
    color: #d32f2f;
}

.club-admin-request-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 90px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--white);
}

.club-admin-request-form textarea:focus {
    outline: none;
    border-color: #1d8348;
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.club-admin-request-form textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.club-admin-request-form .form-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.club-admin-edit-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.club-admin-edit-form .form-group {
    margin-bottom: 1rem;
}

.club-admin-edit-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 0.375rem;
}

.club-admin-edit-form input,
.club-admin-edit-form textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.club-admin-edit-form input:focus,
.club-admin-edit-form textarea:focus {
    outline: none;
    border-color: #1d8348;
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.club-admin-edit-form textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-actions .btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-actions .btn-secondary:hover {
    background: var(--bg-lighter);
}

/* Form Messages */
.form-success {
    background: rgba(29, 131, 72, 0.1);
    color: #166534;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.form-error {
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .club-admin-edit-form .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* ==========================================================================
   CLUB ADMIN BANNER
   Shown at top of course page for club admins
   ========================================================================== */

.club-admin-banner {
    background: linear-gradient(135deg, #1d8348 0%, #27ae60 100%);
    color: white;
    padding: 0.75rem 0;
}

.club-admin-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.club-admin-banner-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

.club-admin-banner-info svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.club-admin-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Unified button style for club admin banner */
.club-admin-banner-actions .btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.club-admin-banner-actions .btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.club-admin-banner-actions .btn svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.club-admin-banner-actions .btn .subscriber-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.125rem;
}

@media (max-width: 768px) {
    .club-admin-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .club-admin-banner-info {
        font-size: 0.8125rem;
    }

    .club-admin-banner-actions {
        width: 100%;
        justify-content: center;
    }

    .club-admin-banner-actions .btn {
        padding: 0.4375rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .club-admin-banner-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .club-admin-banner-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   CLUB ADMIN EDIT MODAL - ENHANCED
   Updated styles for featured image and gallery uploads
   ========================================================================== */

.club-admin-edit-modal-content {
    max-width: 640px;
}

.club-admin-edit-form {
    padding: 0;
}

/* Club Admin Edit Form - Input Styling */
.club-admin-edit-form .form-group {
    margin-bottom: 1rem;
}

.club-admin-edit-form .form-group:last-child {
    margin-bottom: 0;
}

.club-admin-edit-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.club-admin-edit-form input[type="text"],
.club-admin-edit-form input[type="email"],
.club-admin-edit-form input[type="url"],
.club-admin-edit-form input[type="tel"],
.club-admin-edit-form input[type="number"],
.club-admin-edit-form select,
.club-admin-edit-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.club-admin-edit-form input[type="text"]:hover,
.club-admin-edit-form input[type="email"]:hover,
.club-admin-edit-form input[type="url"]:hover,
.club-admin-edit-form input[type="tel"]:hover,
.club-admin-edit-form input[type="number"]:hover,
.club-admin-edit-form select:hover,
.club-admin-edit-form textarea:hover {
    border-color: var(--text-light);
}

.club-admin-edit-form input[type="text"]:focus,
.club-admin-edit-form input[type="email"]:focus,
.club-admin-edit-form input[type="url"]:focus,
.club-admin-edit-form input[type="tel"]:focus,
.club-admin-edit-form input[type="number"]:focus,
.club-admin-edit-form select:focus,
.club-admin-edit-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.club-admin-edit-form input::placeholder,
.club-admin-edit-form textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.club-admin-edit-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.club-admin-edit-form textarea {
    resize: vertical;
    min-height: 80px;
}

.club-admin-edit-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .club-admin-edit-form .form-row {
        grid-template-columns: 1fr;
    }
}

.form-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
}

.form-section-title svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.form-help-text {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin: -0.5rem 0 1rem 0;
    line-height: 1.4;
}

/* Featured Image Upload */
.featured-image-upload {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.featured-image-preview {
    width: 180px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-light);
    position: relative;
    flex-shrink: 0;
}

.featured-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-image-preview .no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.featured-image-preview .no-image-placeholder span {
    font-size: 0.75rem;
}

.remove-featured-image {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.remove-featured-image:hover {
    background: rgba(211, 47, 47, 0.9);
}

.featured-image-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
}

/* Gallery Upload */
.gallery-upload {
    margin-top: 0.5rem;
}

.gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: var(--bg-light);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb .remove-gallery-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.gallery-thumb:hover .remove-gallery-image {
    opacity: 1;
}

.gallery-thumb .remove-gallery-image:hover {
    background: rgba(211, 47, 47, 0.9);
}

.gallery-add-btn {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-light);
}

.gallery-add-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(29, 131, 72, 0.05);
}

/* Architect Rows */
.club-admin-edit-form .architect-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.club-admin-edit-form .architect-row:last-child {
    margin-bottom: 0;
}

.club-admin-edit-form .architect-row .architect-select {
    flex: 1;
}

.club-admin-edit-form .architect-row .remove-architect-row {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
}

#club-edit-architect-selections {
    margin-bottom: 0.5rem;
}

/* Checkbox Group */
.club-admin-edit-form .checkbox-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.club-admin-edit-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-dark);
    user-select: none;
}

.club-admin-edit-form .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
    border-radius: 4px;
}

.club-admin-edit-form .checkbox-label span {
    font-weight: 400;
}

/* Form Messages in Modal */
#club-edit-messages {
    margin: 0 1.5rem;
    padding-bottom: 0.5rem;
}

#club-edit-messages .form-success {
    background: rgba(29, 131, 72, 0.1);
    color: var(--primary-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

#club-edit-messages .form-error {
    background: rgba(211, 47, 47, 0.1);
    color: #c62828;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.club-admin-edit-form .form-actions {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--bg-light);
    margin: 0;
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 0.75rem;
}

.club-admin-edit-form .form-actions .btn {
    flex: 1;
    justify-content: center;
}

/* Secondary button styling in modal */
.club-admin-edit-form .btn-secondary {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-medium);
}

.club-admin-edit-form .btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-light);
    color: var(--text-dark);
}

/* Small button variant */
.club-admin-edit-form .btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .featured-image-upload {
        flex-direction: column;
    }

    .featured-image-preview {
        width: 100%;
        height: 160px;
    }

    .gallery-thumb,
    .gallery-add-btn {
        width: 70px;
        height: 70px;
    }

    .club-admin-edit-form .form-actions {
        flex-direction: column;
    }

    .club-admin-edit-form .checkbox-group {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Discreet Club Admin Request Footer */
.club-admin-request-footer {
    padding-top: 3rem;
    margin-top: 1rem;
}

.club-admin-footer-text,
.club-admin-footer-pending {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin: 0;
    opacity: 0.6;
}

.club-admin-footer-pending svg {
    opacity: 0.5;
}

.club-admin-footer-link {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    color: var(--text-light);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.club-admin-footer-link:hover {
    color: var(--text-medium);
    opacity: 1;
}

/* Friends Bucket List Section on Single Course */
.friends-bucket-list-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(29, 131, 72, 0.06) 0%, rgba(29, 131, 72, 0.02) 100%);
    border: 1px solid rgba(29, 131, 72, 0.12);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.friends-bucket-list-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
    font-size: 0.9rem;
    white-space: nowrap;
}

.friends-bucket-list-header svg {
    color: #1d8348;
    flex-shrink: 0;
}

.friends-bucket-list-avatars {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.friends-bucket-list-avatars .friend-avatar-link {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    margin-left: -8px;
    transition: transform 0.2s ease, z-index 0s;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.friends-bucket-list-avatars .friend-avatar-link:first-child {
    margin-left: 0;
}

.friends-bucket-list-avatars .friend-avatar-link:hover {
    transform: scale(1.15);
    z-index: 10;
}

.friends-bucket-list-avatars .friend-avatar-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .friends-bucket-list-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .friends-bucket-list-header {
        white-space: normal;
    }

    .friends-bucket-list-avatars .friend-avatar-link {
        width: 32px;
        height: 32px;
        margin-left: -6px;
    }

    .friends-bucket-list-avatars .friend-avatar-link:first-child {
        margin-left: 0;
    }
}

.user-marker-dot {
    position: relative;
    width: 20px;
    height: 20px;
}

.user-marker-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #4285f4;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.5);
    z-index: 2;
}

.user-marker-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(66, 133, 244, 0.2);
    border-radius: 50%;
    animation: user-pulse 2s ease-out infinite;
    z-index: 1;
}

@keyframes user-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* User location popup */
.user-location-popup {
    text-align: center;
    font-weight: 500;
    color: #4285f4;
    padding: 0.25rem 0.5rem;
}

/* Address link to maps */
.course-address .address-link {
    color: inherit;
    text-decoration: none;
    display: inline;
    transition: color 0.2s ease;
}

.course-address .address-link:hover {
    color: #1d8348;
}

.course-address .address-link .external-link-icon {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.course-address .address-link:hover .external-link-icon {
    opacity: 1;
}

/* ==========================================================================
   MOBILE MAP COLLAPSE
   Maps are collapsed by default on mobile with an expand button
   ========================================================================== */

@media (max-width: 768px) {
    /* Wrapper */
    .mobile-map-collapse-wrapper {
        width: 100%;
        margin: 1rem 0 0.5rem 0;
    }

    /* Hidden state */
    .mobile-map-collapse-wrapper.collapsed .mobile-map-content {
        display: none;
    }

    /* Expand/Collapse Button */
    .mobile-map-expand-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.625rem;
        width: 100%;
        padding: 1rem 1.25rem;
        background: var(--bg-light);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        color: var(--text-medium);
        font-size: 0.9375rem;
        font-weight: 500;
        cursor: pointer;
        transition: var(--transition-fast);
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-map-expand-btn:active {
        background: var(--bg-lighter);
        transform: scale(0.98);
    }

    .mobile-map-expand-btn svg {
        flex-shrink: 0;
        color: var(--primary-color);
    }

    .mobile-map-expand-btn svg.chevron {
        color: var(--text-light);
        transition: transform 0.3s ease;
    }

    /* Expanded state button */
    .mobile-map-collapse-wrapper:not(.collapsed) .mobile-map-expand-btn {
        border-radius: 12px 12px 0 0;
        border-bottom-color: transparent;
        background: var(--white);
    }

    .mobile-map-collapse-wrapper:not(.collapsed) .mobile-map-expand-btn svg.chevron {
        transform: rotate(180deg);
    }

    /* Map content area */
    .mobile-map-content {
        border: 1px solid var(--border-color);
        border-top: none;
        border-radius: 0 0 12px 12px;
        overflow: hidden;
        background: var(--white);
    }

    /* Map elements */
    .mobile-map-collapse-processed .mobile-map-content #course-map,
    .mobile-map-collapse-processed .mobile-map-content #courses-map,
    .mobile-map-collapse-processed .mobile-map-content #profile-courses-map {
        border-radius: 0;
        border: none;
    }

    /* Container resets */
    .courses-map-container.mobile-map-collapse-processed,
    .single-course-map-container.mobile-map-collapse-processed {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
    }

    .courses-map-container.mobile-map-collapse-processed {
        margin-bottom: 0;
    }

    /* Map heights */
    .mobile-map-collapse-processed .mobile-map-content #courses-map,
    .mobile-map-collapse-processed .mobile-map-content #course-map {
        height: 300px;
        min-height: 300px;
    }

    .mobile-map-collapse-processed .mobile-map-content #profile-courses-map {
        height: 280px;
        min-height: 280px;
    }

    /* Profile map spacing */
    .profile-bio-section.mobile-map-collapse-processed .mobile-map-collapse-wrapper,
    .profile-edit-section.mobile-map-collapse-processed .mobile-map-collapse-wrapper {
        margin-top: 1rem;
    }
}

/* Desktop: ensure maps display normally */
@media (min-width: 769px) {
    .mobile-map-expand-btn {
        display: none !important;
    }

    .mobile-map-collapse-wrapper.collapsed .mobile-map-content {
        display: block !important;
    }
}

/* ==========================================================================
   ARCHITECT PAGES
   ========================================================================== */

/* Architect link in course details */
.architect-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.architect-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Architect Hero Banner */
.architect-hero {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #145a32 100%);
    overflow: hidden;
    margin-bottom: 2rem;
}

.architect-hero.has-image {
    min-height: 400px;
}

.architect-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.architect-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.architect-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.architect-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 3rem 1rem;
}

.architect-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.architect-hero-subtitle {
    font-size: 1.25rem;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Architects listing grid */
.architects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.architect-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.architect-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.architect-card-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-light);
}

.architect-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.architect-card-content {
    flex: 1;
    min-width: 0;
}

.architect-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.25rem 0;
}

.architect-card:hover .architect-name {
    color: var(--primary-color);
}

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

/* Architect Portrait in Sidebar */
.architect-image-container {
    display: flex;
    flex-direction: column;
    background: transparent;
    overflow: visible;
    padding-top: 2rem;
}

/* Architect page layout - content should NOT be limited in height */
.courses-archive-wrapper.has-map .architect-image-container + .courses-content-container {
    overflow: visible;
    max-height: none;
}

/* When architect image container is used, it should not constrain height */
.courses-archive-wrapper.has-map .architect-image-container {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 140px);
    align-self: flex-start;
}

.architect-portrait {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.architect-portrait img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.architect-portrait-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
    border: 2px dashed var(--border-color);
    border-radius: 18px;
    min-height: 300px;
    padding: 2rem;
}

.architect-portrait-placeholder .placeholder-content {
    text-align: center;
    color: var(--text-light);
}

.architect-portrait-placeholder .placeholder-content svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.architect-portrait-placeholder .placeholder-content span {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-medium);
}

/* Architect Admin Controls - Sidebar Version */
.architect-admin-controls-sidebar {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--white);
    border-top: 1px solid var(--border-color);
}

.btn-admin-upload-sidebar,
.btn-admin-remove-sidebar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
    flex: 1;
}

.btn-admin-upload-sidebar {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-admin-upload-sidebar:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-admin-remove-sidebar {
    background: var(--white);
    color: #dc3545;
    border-color: #dc3545;
}

.btn-admin-remove-sidebar:hover {
    background: #dc3545;
    color: var(--white);
}

.btn-admin-upload-sidebar:disabled,
.btn-admin-remove-sidebar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-admin-upload-sidebar svg,
.btn-admin-remove-sidebar svg {
    width: 14px;
    height: 14px;
}

/* Architect portrait on tablet - show above content, not sticky */
@media (max-width: 1024px) {
    .architect-image-container {
        position: relative !important;
        top: 0 !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        padding-top: 0;
        margin-bottom: 1.5rem;
    }

    .architect-portrait {
        max-height: 400px;
    }

    .architect-portrait img {
        max-height: 400px;
        object-fit: contain;
        object-position: center;
    }
}

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

    .architect-card {
        padding: 1rem;
    }

    .architect-card-image {
        width: 50px;
        height: 50px;
    }

    /* Architect portrait on mobile - smaller with top padding */
    .architect-image-container {
        padding-top: 1rem;
    }

    .architect-portrait {
        min-height: 200px;
        max-height: 300px;
    }

    .architect-portrait img {
        max-height: 300px;
    }

    .architect-portrait-placeholder {
        min-height: 200px;
        margin: 0.75rem;
    }

    .architect-admin-controls-sidebar {
        padding: 0.75rem;
    }
}

/* ==========================================================================
   FRIEND ACTIVITY DROPDOWN
   Notification bell with activity feed and friend requests
   ========================================================================== */

.friend-activity-dropdown {
    position: relative;
}

/* Friend Activity Toggle - Now uses .header-icon-btn base class */
/* Specific overrides only - base styles in Header Icon Buttons section */

.friend-activity-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 380px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.friend-activity-dropdown.active .friend-activity-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Panel Tabs */
.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.panel-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 16px;
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.panel-tab:hover {
    color: var(--text-dark);
    background: rgba(0, 0, 0, 0.02);
}

.panel-tab.active {
    color: var(--primary-color);
    background: white;
}

.panel-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.panel-tab svg {
    flex-shrink: 0;
}

.tab-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e74c3c;
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Tab Content */
.panel-content {
    max-height: 400px;
    overflow-y: auto;
}

.friend-activity-panel .tab-content {
    display: none;
}

.friend-activity-panel .tab-content.active {
    display: block;
}

/* Activity Items */
.activity-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

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

.activity-item:hover {
    background: var(--bg-light);
}

.activity-avatar {
    flex-shrink: 0;
}

.activity-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.activity-user {
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
}

.activity-user:hover {
    color: var(--primary-color);
}

.activity-target {
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
}

.activity-target:hover {
    text-decoration: underline;
}

.activity-rating-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 6px 10px;
    margin: 6px -10px 4px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.activity-rating-link:hover {
    background: rgba(29, 131, 72, 0.08);
}

.activity-rating {
    display: flex;
    align-items: center;
}

.activity-rating .cookie {
    font-size: 0.875rem;
    margin-right: 1px;
}

.activity-rating .cookie.empty {
    filter: grayscale(100%);
    opacity: 0.3;
}

.activity-view-review {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-color);
    white-space: nowrap;
}

.activity-excerpt {
    font-size: 0.8125rem;
    color: var(--text-medium);
    font-style: italic;
    margin: 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.activity-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-medium);
}

.activity-empty svg {
    display: block;
    margin: 0 auto 1rem;
    color: var(--text-light);
    opacity: 0.5;
}

.activity-empty p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Friend Request Items (inside panel) */
.friend-activity-panel .friend-request-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.friend-activity-panel .friend-request-item:last-child {
    border-bottom: none;
}

.friend-activity-panel .request-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.friend-activity-panel .request-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.friend-activity-panel .request-name {
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-activity-panel .request-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.friend-activity-panel .request-actions .btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    min-width: auto;
    border-radius: 6px;
}

.friend-activity-panel .no-requests {
    text-align: center;
    padding: 2rem;
    color: var(--text-medium);
    font-size: 0.9375rem;
}

/* Loading Spinner */
.friend-activity-panel .loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.friend-activity-panel .loading-spinner svg {
    animation: spin 1s linear infinite;
    color: var(--text-light);
}

.friend-activity-panel .loading-spinner circle {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    stroke-linecap: round;
}

/* Hide desktop friend activity dropdown on mobile */
@media (max-width: 734px) {
    #desktop-friend-activity {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        pointer-events: none !important;
    }

    #desktop-friend-activity * {
        display: none !important;
        visibility: hidden !important;
    }
}

/* ==========================================================================
   MOBILE HEADER ICONS (Bell + Profile)
   Only visible on mobile, positioned in top right
   ========================================================================== */

/* Hide mobile header icons on desktop */
.mobile-header-icons {
    display: none;
}

/* Mobile Activity Modal - Base styles (hidden by default) */
.mobile-activity-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 99998;
    visibility: hidden;
    pointer-events: none;
    transition: background 0.3s ease, visibility 0s linear 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-activity-overlay.active {
    background: rgba(0, 0, 0, 0.5);
    visibility: visible;
    pointer-events: auto;
    transition: background 0.3s ease, visibility 0s linear 0s;
}

.mobile-activity-sheet {
    position: fixed;
    top: 70px;
    left: 16px;
    right: 16px;
    bottom: 70px;
    transform: scale(0.95);
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    z-index: 99999;
    display: none;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
    overflow: hidden;
}

.mobile-activity-sheet.active {
    display: flex;
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Sheet internal styles */
.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sheet-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.sheet-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    color: #666;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.sheet-close svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.sheet-close:active {
    transform: scale(0.92);
    background: #e0e0e0;
}

.sheet-tabs {
    display: flex;
    padding: 0 16px;
    gap: 8px;
    flex-shrink: 0;
    background: #fafafa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sheet-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #8e8e93;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.sheet-tab.active {
    color: var(--text-dark);
}

.sheet-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 1px;
}

.sheet-tab-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ff3b30;
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sheet-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.sheet-tab-content {
    display: none;
    padding: 0;
}

.sheet-tab-content.active {
    display: block;
}

/* Activity items inside the sheet */
.mobile-activity-sheet .activity-item {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.15s ease;
}

.mobile-activity-sheet .activity-item:active {
    background: rgba(0, 0, 0, 0.03);
}

.mobile-activity-sheet .activity-item:last-child {
    border-bottom: none;
}

.mobile-activity-sheet .activity-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-activity-sheet .activity-content {
    flex: 1;
    min-width: 0;
}

.mobile-activity-sheet .activity-text {
    font-size: 0.9375rem;
    line-height: 1.4;
}

@media (max-width: 734px) {
    /* Show mobile header icons - display flex with proper alignment */
    .mobile-header-icons {
        display: flex !important;
        align-items: center;
        gap: 0;
        order: -1; /* Show first in header-actions */
        position: relative;
        z-index: 1001;
    }

    .mobile-activity-btn,
    .mobile-profile-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: none;
        background: transparent;
        color: var(--text-dark);
        cursor: pointer;
        border-radius: 50%;
        position: relative;
        z-index: 100;
        transition: var(--transition-fast);
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-activity-btn:active,
    .mobile-profile-btn:active {
        background: var(--bg-light);
    }

    .mobile-activity-btn svg,
    .mobile-profile-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Mobile Profile Avatar */
    .mobile-profile-avatar {
        padding: 0 !important;
    }

    .mobile-header-avatar-img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--border-color);
        transition: border-color 0.2s ease;
    }

    .mobile-profile-avatar:active .mobile-header-avatar-img {
        border-color: var(--primary-color);
    }

    .mobile-header-badge {
        position: absolute;
        top: 2px;
        right: 2px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        background: #e74c3c;
        color: white;
        font-size: 0.5625rem;
        font-weight: 700;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
}

/* Additional mobile-activity-sheet content styles */
.mobile-activity-sheet .activity-rating-link {
    margin: 8px 0 4px;
    padding: 8px 12px;
    background: var(--bg-light);
    border-radius: 8px;
}

.mobile-activity-sheet .activity-rating .cookie {
    font-size: 1rem;
}

.mobile-activity-sheet .activity-view-review {
    font-size: 0.8125rem;
}

.mobile-activity-sheet .activity-excerpt {
    font-size: 0.875rem;
    margin: 6px 0;
}

.mobile-activity-sheet .activity-time {
    font-size: 0.8125rem;
}

.mobile-activity-sheet .activity-empty {
    padding: 3rem 2rem;
}

.mobile-activity-sheet .activity-empty svg {
    width: 56px;
    height: 56px;
}

.mobile-activity-sheet .activity-empty p {
    font-size: 1rem;
}

/* Friend request items in sheet */
.mobile-activity-sheet .friend-request-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-activity-sheet .friend-request-item:last-child {
    border-bottom: none;
}

.mobile-activity-sheet .request-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
}

.mobile-activity-sheet .request-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mobile-activity-sheet .request-name {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-dark);
}

.mobile-activity-sheet .request-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-activity-sheet .request-actions .btn {
    padding: 8px 14px;
    font-size: 0.8125rem;
    min-height: 36px;
    border-radius: 8px;
}

.mobile-activity-sheet .no-requests {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-medium);
    font-size: 1rem;
}

/* Message items in mobile sheet */
.mobile-activity-sheet .message-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mobile-activity-sheet .message-item:active {
    background: var(--bg-light);
}

.mobile-activity-sheet .message-item:last-child {
    border-bottom: none;
}

.mobile-activity-sheet .messages-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-medium);
    font-size: 1rem;
}

.mobile-activity-sheet .messages-empty svg {
    display: block;
    margin: 0 auto 1rem;
    color: #c7c7cc;
}

.mobile-activity-sheet .loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: 200px;
}

.mobile-activity-sheet .loading-spinner svg {
    color: #c7c7cc;
}

/* Prevent body scroll when sheet is open */
body.sheet-open {
    overflow: hidden;
    touch-action: none;
}

/* ==========================================================================
   Profile Bucket List Section
   ========================================================================== */

.bucket-list-courses {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bucket-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bucket-list-item:hover {
    border-color: #e74c3c;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.1);
}

.bucket-list-course-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.bucket-course-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.bucket-course-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bucket-course-thumb-placeholder svg {
    color: #e74c3c;
}

.bucket-course-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.bucket-course-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bucket-course-location {
    font-size: 0.8125rem;
    color: var(--text-medium);
}

.bucket-list-remove-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.bucket-list-remove-btn:hover {
    background: #fef2f2;
    color: #e74c3c;
}

.bucket-list-empty {
    text-align: center;
    color: var(--text-medium);
    padding: 2rem;
    font-size: 0.9375rem;
}

/* Map Popup Bucket Badge */
.course-map-popup .bucket-badge {
    display: inline-block;
    background: #fef2f2;
    color: #e74c3c;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Page Hero Banners
   ========================================================================== */

.page-hero-banner {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.page-hero-banner img.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-hero-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.5));
    z-index: 1;
}

.page-hero-banner .hero-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 800px;
}

.page-hero-banner .hero-overlay h1 {
    color: #fff;
    font-size: 3rem;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
}

.page-hero-banner .hero-overlay p {
    color: rgba(255,255,255,0.95);
    font-size: 1.25rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.page-hero-banner .hero-admin-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.page-hero-banner .hero-admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.page-hero-banner .hero-admin-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.page-hero-banner .hero-admin-btn svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .page-hero-banner {
        height: 280px;
    }

    .page-hero-banner .hero-overlay h1 {
        font-size: 2rem;
    }

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

    .page-hero-banner .hero-admin-controls {
        bottom: 10px;
        right: 10px;
    }

    .page-hero-banner .hero-admin-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Map Filter Toggles */
.map-filter-toggles {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.map-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.map-toggle input[type="checkbox"] {
    display: none;
}

.toggle-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: opacity 0.2s ease;
}

.toggle-marker.played {
    background-color: #1d8348;
}

.toggle-marker.bucket {
    background-color: #e74c3c;
}

.map-toggle input[type="checkbox"]:not(:checked) + .toggle-marker {
    opacity: 0.3;
}

.toggle-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    transition: color 0.2s ease;
}

.map-toggle input[type="checkbox"]:not(:checked) ~ .toggle-label {
    color: var(--text-light);
}

.map-toggle:hover .toggle-label {
    color: var(--text-dark);
}

/* ==========================================================================
   HOMEPAGE FRIENDS ACTIVITY FEED - Apple-Inspired Design
   ========================================================================== */

.friends-activity-feed {
    padding: 60px 0;
    background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%);
}

.activity-feed-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.activity-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.activity-feed-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-feed-title svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.activity-feed-title h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #1d1d1f;
    margin: 0;
}

.activity-feed-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 17px;
    font-weight: 400;
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.activity-feed-link:hover {
    opacity: 0.7;
}

.activity-feed-scroll {
    overflow-x: auto;
    overflow-y: visible;
    margin: 0 -24px;
    padding: 0 24px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.activity-feed-scroll::-webkit-scrollbar {
    display: none;
}

.activity-feed-cards {
    display: flex;
    gap: 20px;
    padding-bottom: 10px;
}

/* Activity Card */
.activity-card {
    flex: 0 0 300px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.activity-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f5f5f7;
}

.activity-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.activity-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.activity-card:hover .activity-card-image img {
    transform: scale(1.05);
}

.activity-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
    color: #86868b;
}

.friends-activity-feed .activity-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}

.activity-card-content {
    padding: 20px;
}

.friends-activity-feed .activity-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.friends-activity-feed .activity-avatar {
    flex-shrink: 0;
}

.friends-activity-feed .activity-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.friends-activity-feed .activity-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.activity-user-name {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
}

.activity-user-name:hover {
    color: var(--primary-color);
}

.activity-action {
    font-size: 15px;
    color: #86868b;
}

.activity-course-name {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.activity-course-name a {
    color: #1d1d1f;
    text-decoration: none;
}

.activity-course-name a:hover {
    color: var(--primary-color);
}

.activity-review-text {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #6e6e73;
    font-style: italic;
}

.friends-activity-feed .activity-time {
    display: block;
    font-size: 13px;
    color: #86868b;
}

/* Empty State */
.activity-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    background: #ffffff;
    border-radius: 20px;
    min-width: 100%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.activity-empty-state svg {
    color: #86868b;
    margin-bottom: 16px;
}

.activity-empty-state p {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 500;
    color: #1d1d1f;
}

.activity-empty-state span {
    font-size: 15px;
    color: #86868b;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .friends-activity-feed {
        padding: 40px 0;
    }

    .activity-feed-container {
        padding: 0 16px;
    }

    .activity-feed-header {
        margin-bottom: 24px;
    }

    .activity-feed-title h2 {
        font-size: 22px;
    }

    .activity-feed-link {
        font-size: 15px;
    }

    .activity-feed-scroll {
        margin: 0 -16px;
        padding: 0 16px 16px;
    }

    .activity-feed-cards {
        gap: 16px;
    }

    .activity-card {
        flex: 0 0 260px;
        border-radius: 16px;
    }

    .activity-card-content {
        padding: 16px;
    }

    .activity-avatar img {
        width: 36px;
        height: 36px;
    }

    .activity-user-name,
    .activity-action {
        font-size: 14px;
    }

    .activity-course-name {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .activity-card {
        flex: 0 0 240px;
    }

    .activity-feed-title svg {
        width: 20px;
        height: 20px;
    }

    .activity-feed-title h2 {
        font-size: 20px;
    }

    .activity-empty-state {
        padding: 40px 24px;
    }
}

/* Smooth scrolling for touch devices */
@supports (-webkit-touch-callout: none) {
    .activity-feed-scroll {
        scroll-snap-type: x proximity;
    }

    .activity-card {
        scroll-snap-align: start;
    }
}

/* ==========================================================================
   ACTIVITY FEED SCROLL NAVIGATION
   ========================================================================== */

.activity-scroll-nav {
    display: flex;
    gap: 8px;
}

.scroll-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.scroll-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(29, 131, 72, 0.3), 0 2px 6px rgba(29, 131, 72, 0.2);
    transform: scale(1.05);
}

.scroll-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.scroll-btn svg {
    transition: transform 0.2s ease;
}

.scroll-btn:hover:not(:disabled) svg {
    transform: scale(1.1);
}

/* Scroll fade indicators on edges - DISABLED to prevent white line artifacts */
/* These pseudo-elements were causing a visible white line issue */
.activity-feed-scroll {
    position: relative;
}

.activity-feed-scroll::before,
.activity-feed-scroll::after {
    display: none;
}

/* Hide scroll nav on mobile (touch scroll is intuitive) */
@media (max-width: 768px) {
    .activity-scroll-nav {
        display: none;
    }
}

/* Larger screens - bigger buttons */
@media (min-width: 1024px) {
    .scroll-btn {
        width: 48px;
        height: 48px;
    }
    
    .scroll-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* ==========================================================================
   FORUM MOBILE - Better separation between topic and last post
   ========================================================================== */


/* ==========================================================================
   FORUM MOBILE - Last post avatar and separation
   ========================================================================== */

/* Hide avatar on desktop */
.forum-last-post-avatar {
    display: none;
}

@media (max-width: 768px) {
    .forum-topic-item .forum-col-last-post {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        background: rgba(0, 0, 0, 0.02);
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
        margin-top: 0.5rem;
    }

    .forum-last-post-avatar {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        pointer-events: none;
    }

    .forum-last-post-avatar img {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
        display: block;
    }

    .forum-last-post-text {
        display: inline;
        line-height: 1.4;
    }

    .forum-topic-item .forum-last-post-time,
    .forum-topic-item .forum-last-post-author {
        display: inline;
    }
}

/* ==========================================================================
   COURSE RANKING BADGE
   ========================================================================== */

.course-card-image {
    position: relative;
}

.course-rank-badge {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 36px;
    height: 36px;
    background: #ffffff;
    color: #d32f2f;
    font-size: 15px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    border-radius: 0 0 12px 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.12);
    z-index: 2;
    transition: all 0.2s ease;
}

.course-card:hover .course-rank-badge {
    background: #d32f2f;
    color: #ffffff;
}

@media (min-width: 768px) {
    .course-rank-badge {
        min-width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* ==========================================================================
   SINGLE COURSE PAGE - FOOTER SPACING FIX
   Remove the white dead space between full-width sections and footer
   ========================================================================== */

.single-course .site-footer {
    margin-top: 0;
}

/* ==========================================================================
   COURSE MAILING LIST - Join Mailing List Section
   ========================================================================== */

.course-mailing-list {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.mailing-list-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mailing-list-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mailing-list-info > svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.mailing-list-text {
    display: flex;
    flex-direction: column;
}

.mailing-list-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-dark);
}

.mailing-list-desc {
    font-size: 0.8125rem;
    color: var(--text-medium);
}

.btn-mailing-list {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    background: transparent;
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-mailing-list:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-mailing-list:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-mailing-list.btn-subscribed {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-mailing-list.btn-subscribed:hover {
    background: rgba(211, 47, 47, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-mailing-list svg {
    flex-shrink: 0;
}

.mailing-list-count {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border-color);
}

.mailing-list-login {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
}

.mailing-list-login:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .mailing-list-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .mailing-list-info {
        flex-direction: column;
        text-align: center;
    }

    .btn-mailing-list {
        justify-content: center;
    }
}

/* ==========================================================================
   NOTIFICATION PANEL - Messages Tab Styling
   ========================================================================== */

.message-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.message-item:hover {
    background: var(--bg-light);
}

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

.message-item.unread {
    background: rgba(var(--primary-color-rgb), 0.05);
}

.message-item.unread .message-subject {
    font-weight: 600;
}

.message-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    color: var(--text-medium);
}

.message-item.unread .message-icon {
    background: var(--primary-color);
    color: #fff;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.message-course {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.message-course:hover {
    text-decoration: underline;
}

.message-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
}

.message-subject {
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-preview {
    font-size: 0.8125rem;
    color: var(--text-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.message-meta {
    margin-top: 0.375rem;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ==========================================================================
   CLUB ADMIN MODAL - Notification Section Styling
   ========================================================================== */

.notification-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.notification-empty-state {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.notification-empty-state svg {
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.notification-empty-state p {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0 0.25rem;
}

.notification-empty-state span {
    font-size: 0.8125rem;
    color: var(--text-medium);
}

.notification-form-messages {
    margin-top: 1rem;
}

/* Panel tabs with 3 tabs adjustment */
.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.panel-tab {
    flex: 1;
    padding: 0.75rem 0.5rem;
    font-size: 0.8125rem;
    text-align: center;
}

/* ==========================================================================
   CLUB MESSAGE MODAL - Send Messages to Subscribers
   ========================================================================== */

.club-message-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.club-message-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.club-message-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.25s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.club-message-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.club-message-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.club-message-modal-header h3 svg {
    color: var(--primary-color);
}

.club-message-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.15s ease;
}

.club-message-modal-close:hover {
    background: var(--bg-lighter);
    color: var(--text-dark);
}

.club-message-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.club-message-form .form-group {
    margin-bottom: 1.25rem;
}

.club-message-form .form-group:last-child {
    margin-bottom: 0;
}

.club-message-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.club-message-form input[type="text"],
.club-message-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-dark);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.club-message-form input[type="text"]:focus,
.club-message-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 131, 72, 0.1);
}

.club-message-form textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

/* Image Upload Area */
.message-image-upload {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.15s ease;
    cursor: pointer;
    background: var(--bg-light);
}

.message-image-upload:hover {
    border-color: var(--primary-color);
    background: rgba(29, 131, 72, 0.03);
}

.message-image-upload.dragover {
    border-color: var(--primary-color);
    background: rgba(29, 131, 72, 0.08);
}

.message-image-upload svg {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.message-image-upload p {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin: 0 0 0.25rem;
}

.message-image-upload span {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.message-image-upload input[type="file"] {
    display: none;
}

/* Image Preview */
.message-image-preview {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-light);
}

.message-image-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.message-image-preview .remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
}

.message-image-preview .remove-image:hover {
    background: rgba(220, 53, 69, 0.9);
}

/* Modal Footer */
.club-message-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.message-recipient-info {
    font-size: 0.8125rem;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.message-recipient-info svg {
    color: var(--text-light);
}

.message-recipient-info strong {
    color: var(--text-dark);
    font-weight: 600;
}

.club-message-modal-footer .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* Empty State in Modal */
.message-empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.message-empty-state svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.message-empty-state h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
}

.message-empty-state p {
    font-size: 0.9375rem;
    color: var(--text-medium);
    margin: 0;
    line-height: 1.5;
}

/* Message Form Messages (Success/Error) */
.message-form-feedback {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-form-feedback.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.message-form-feedback.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .club-message-modal {
        padding: 0;
        align-items: flex-end;
    }

    .club-message-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        animation: modalSlideUp 0.25s ease-out;
    }

    @keyframes modalSlideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .club-message-modal-header {
        padding: 1rem 1.25rem;
    }

    .club-message-modal-body {
        padding: 1.25rem;
    }

    .club-message-modal-footer {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
    }

    .club-message-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   MESSAGE ITEM - Image Support
   ========================================================================== */

.message-image {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-light);
}

.message-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-item.has-image {
    align-items: flex-start;
}

/* ==========================================================================
   MESSAGE VIEW MODAL - Full Message Display
   ========================================================================== */

.message-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.message-view-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.message-view-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.25s ease-out;
}

.message-view-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.message-view-modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-view-modal-header h3 svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.message-view-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.15s ease;
}

.message-view-modal-close:hover {
    background: var(--bg-lighter);
    color: var(--text-dark);
}

.message-view-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.message-view-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-light);
}

.message-view-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-view-subject {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

.message-view-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-medium);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.message-view-sender {
    font-weight: 500;
    color: var(--text-dark);
}

.message-view-sender::after {
    content: "•";
    margin-left: 0.75rem;
    color: var(--text-light);
}

.message-view-date {
    color: var(--text-light);
}

.message-view-image-container {
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
}

.message-view-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.message-view-body {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.message-view-body p {
    margin: 0 0 1rem;
}

.message-view-body p:last-child {
    margin-bottom: 0;
}

.message-view-error {
    text-align: center;
    padding: 2rem;
    color: var(--text-medium);
}

.message-view-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.message-view-modal-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.message-view-modal-footer .btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.message-view-modal-footer .btn-outline:hover {
    background: var(--bg-lighter);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.message-view-modal-footer .btn-danger {
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
}

.message-view-modal-footer .btn-danger:hover {
    background: #dc3545;
    color: white;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .message-view-modal {
        padding: 0;
        align-items: flex-end;
    }

    .message-view-modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        animation: modalSlideUp 0.25s ease-out;
    }

    .message-view-modal-header {
        padding: 1rem;
    }

    .message-view-modal-body {
        padding: 1.25rem;
    }

    .message-view-modal-footer {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .message-view-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}
