/**
 * Public Pages Stylesheet - Church Management App
 * Styles pour les pages publiques (accueil, contact, à propos)
 * Support complet Dark/Light mode
 */

/* ============================================
   VARIABLES CSS - Charte Graphique
   ============================================ */
:root {
    /* Couleurs principales CPD */
    --cpd-primary: #6366f1;
    --cpd-primary-dark: #4f46e5;
    --cpd-secondary: #a855f7;
    --cpd-accent: #ec4899;
    
    /* Couleurs de statut */
    --cpd-success: #10b981;
    --cpd-warning: #f59e0b;
    --cpd-danger: #ef4444;
    --cpd-info: #3b82f6;
    
    /* Espacements */
    --cpd-spacing-xs: 0.25rem;
    --cpd-spacing-sm: 0.5rem;
    --cpd-spacing-md: 1rem;
    --cpd-spacing-lg: 1.5rem;
    --cpd-spacing-xl: 2rem;
    --cpd-spacing-2xl: 3rem;
    
    /* Bordures */
    --cpd-border-radius-sm: 0.5rem;
    --cpd-border-radius: 0.75rem;
    --cpd-border-radius-lg: 1rem;
    --cpd-border-radius-xl: 1.5rem;
    
    /* Ombres */
    --cpd-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --cpd-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --cpd-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --cpd-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --cpd-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ============================================
   MODE CLAIR (par défaut)
   ============================================ */
[data-bs-theme="light"] {
    /* Fonds */
    --cpd-bg-primary: #ffffff;
    --cpd-bg-secondary: #f8fafc;
    --cpd-bg-tertiary: #f1f5f9;
    --cpd-bg-elevated: #ffffff;
    
    /* Textes */
    --cpd-text-primary: #0f172a;
    --cpd-text-secondary: #475569;
    --cpd-text-tertiary: #64748b;
    --cpd-text-muted: #94a3b8;
    --cpd-text-inverse: #ffffff;
    
    /* Bordures */
    --cpd-border-color: #e2e8f0;
    --cpd-border-color-light: #f1f5f9;
    
    /* Couleurs de surface */
    --cpd-surface: #ffffff;
    --cpd-surface-elevated: #ffffff;
    --cpd-surface-hover: #f8fafc;
    
    /* Navbar */
    --cpd-navbar-bg: rgba(255, 255, 255, 0.9);
    --cpd-navbar-border: #e2e8f0;
    
    /* Cards */
    --cpd-card-bg: #ffffff;
    --cpd-card-border: #e2e8f0;
    --cpd-card-shadow: var(--cpd-shadow);
    
    /* Footer */
    --cpd-footer-bg: #0f172a;
    --cpd-footer-text: #94a3b8;
    --cpd-footer-text-hover: #ffffff;
}

/* ============================================
   MODE SOMBRE
   ============================================ */
[data-bs-theme="dark"] {
    /* Fonds */
    --cpd-bg-primary: #0f172a;
    --cpd-bg-secondary: #1e293b;
    --cpd-bg-tertiary: #334155;
    --cpd-bg-elevated: #1e293b;
    
    /* Textes */
    --cpd-text-primary: #f8fafc;
    --cpd-text-secondary: #e2e8f0;
    --cpd-text-tertiary: #cbd5e1;
    --cpd-text-muted: #64748b;
    --cpd-text-inverse: #0f172a;
    
    /* Bordures */
    --cpd-border-color: #334155;
    --cpd-border-color-light: #1e293b;
    
    /* Couleurs de surface */
    --cpd-surface: #1e293b;
    --cpd-surface-elevated: #334155;
    --cpd-surface-hover: #475569;
    
    /* Navbar */
    --cpd-navbar-bg: rgba(15, 23, 42, 0.95);
    --cpd-navbar-border: #334155;
    
    /* Cards */
    --cpd-card-bg: #1e293b;
    --cpd-card-border: #334155;
    --cpd-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    
    /* Footer */
    --cpd-footer-bg: #020617;
    --cpd-footer-text: #64748b;
    --cpd-footer-text-hover: #e2e8f0;
}

/* ============================================
   BASE & RESET
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--cpd-text-primary);
    background-color: var(--cpd-bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--cpd-text-primary);
    font-weight: 600;
}

p {
    color: var(--cpd-text-secondary);
}

a {
    color: var(--cpd-primary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--cpd-primary-dark);
}

/* ============================================
   NAVIGATION PUBLIQUE
   ============================================ */
.cpd-navbar {
    background: var(--cpd-navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cpd-navbar-border);
    box-shadow: var(--cpd-shadow-sm);
    transition: all 0.3s ease;
}

.cpd-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--cpd-text-primary);
    flex-shrink: 1;
    min-width: 0;
    margin-right: auto;
}

.cpd-navbar-brand:hover {
    color: var(--cpd-text-primary);
}

.cpd-navbar-brand .logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cpd-primary), var(--cpd-secondary));
    border-radius: var(--cpd-border-radius);
    color: white;
    flex-shrink: 0;
}

.cpd-navbar-brand .logo-text {
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile: Allow text to wrap and show full title */
@media (max-width: 575.98px) {
    .cpd-navbar-brand .logo-text {
        white-space: normal;
        overflow: visible;
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .cpd-navbar-brand {
        max-width: calc(100% - 60px);
    }
}

/* Navigation items */
.cpd-nav-container {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cpd-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--cpd-border-radius);
    color: var(--cpd-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cpd-nav-link:hover,
.cpd-nav-link.active {
    color: var(--cpd-primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Theme Toggle Button */
.cpd-theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--cpd-border-radius);
    background: transparent;
    border: 1px solid var(--cpd-border-color);
    color: var(--cpd-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cpd-theme-toggle:hover {
    background: var(--cpd-surface-hover);
    color: var(--cpd-text-primary);
}

/* Navbar toggler button - ensure visibility in both modes */
.navbar-toggler {
    border-color: var(--cpd-border-color);
    padding: 0.5rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.15rem rgba(99, 102, 241, 0.25);
}

/* Fix navbar-toggler-icon colors for both modes */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%236366f1' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-bs-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Fix Mon Espace button in light mode */
[data-bs-theme="light"] .btn-primary {
    background-color: var(--cpd-primary);
    border-color: var(--cpd-primary);
    color: white;
}

[data-bs-theme="light"] .btn-primary:hover {
    background-color: var(--cpd-primary-dark);
    border-color: var(--cpd-primary-dark);
    color: white;
}

[data-bs-theme="light"] .btn-outline-primary {
    color: var(--cpd-primary);
    border-color: var(--cpd-primary);
}

[data-bs-theme="light"] .btn-outline-primary:hover {
    background-color: var(--cpd-primary);
    border-color: var(--cpd-primary);
    color: white;
}

/* Light mode specific fixes for visibility */
[data-bs-theme="light"] .cpd-section-alt {
    background-color: #f8fafc;
    border-top: 1px solid var(--cpd-border-color);
    border-bottom: 1px solid var(--cpd-border-color);
}

[data-bs-theme="light"] .cpd-feature-card {
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .cpd-service-item {
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .cpd-event-date {
    background: #f1f5f9;
    border: 1px solid var(--cpd-border-color);
}

[data-bs-theme="light"] .cpd-contact-card {
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .cpd-value-card {
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .cpd-form-control-custom {
    background-color: #ffffff;
}

[data-bs-theme="light"] .cpd-form-control-custom:focus {
    background-color: #ffffff;
}

[data-bs-theme="light"] .cpd-about-image {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Ensure text is always visible */
[data-bs-theme="light"] .cpd-feature-text {
    color: #475569;
}

[data-bs-theme="light"] .cpd-mission-content p {
    color: #64748b;
}

[data-bs-theme="light"] .cpd-contact-info-content p {
    color: #64748b;
}

/* ============================================
   HERO SECTION
   ============================================ */
.cpd-hero {
    position: relative;
    padding: 140px 0 100px;
    background: linear-gradient(135deg, var(--cpd-primary) 0%, var(--cpd-secondary) 100%);
    overflow: hidden;
}

.cpd-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    border-radius: 50%;
}

.cpd-hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50%;
    height: 80%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    border-radius: 50%;
}

.cpd-hero-content {
    position: relative;
    z-index: 1;
}

.cpd-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--cpd-primary);
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--cpd-shadow);
}

.cpd-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.cpd-hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-bottom: 2rem;
}

/* Buttons hero */
.cpd-btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--cpd-border-radius);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.cpd-btn-hero-light {
    background: white;
    color: var(--cpd-primary);
    box-shadow: var(--cpd-shadow-md);
}

.cpd-btn-hero-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--cpd-shadow-lg);
    color: var(--cpd-primary);
}

.cpd-btn-hero-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.cpd-btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

/* ============================================
   SECTIONS
   ============================================ */
.cpd-section {
    padding: 80px 0;
}

.cpd-section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--cpd-text-primary);
}

.cpd-section-subtitle {
    text-align: center;
    color: var(--cpd-text-tertiary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

.cpd-section-alt {
    background: var(--cpd-bg-secondary);
}

/* ============================================
   CARDS / FEATURE BOXES
   ============================================ */
.cpd-feature-card {
    background: var(--cpd-card-bg);
    border: 1px solid var(--cpd-card-border);
    border-radius: var(--cpd-border-radius-lg);
    padding: 2rem;
    box-shadow: var(--cpd-card-shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.cpd-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--cpd-shadow-lg);
}

.cpd-feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--cpd-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
}

.cpd-feature-icon.primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--cpd-primary);
}

.cpd-feature-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--cpd-success);
}

.cpd-feature-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--cpd-warning);
}

.cpd-feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--cpd-text-primary);
}

.cpd-feature-text {
    color: var(--cpd-text-secondary);
    margin: 0;
}

/* ============================================
   SERVICE TIMES
   ============================================ */
.cpd-service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--cpd-surface);
    border: 1px solid var(--cpd-border-color);
    border-radius: var(--cpd-border-radius);
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.cpd-service-item:hover {
    border-color: var(--cpd-primary);
    box-shadow: var(--cpd-shadow-sm);
}

.cpd-service-info h6 {
    margin: 0;
    font-weight: 600;
    color: var(--cpd-text-primary);
}

.cpd-service-info small {
    color: var(--cpd-text-muted);
}

.cpd-service-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.cpd-service-badge.primary {
    background: var(--cpd-primary);
    color: white;
}

.cpd-service-badge.success {
    background: var(--cpd-success);
    color: white;
}

.cpd-service-badge.warning {
    background: var(--cpd-warning);
    color: #1a1a1a;
}

.cpd-service-badge.info {
    background: var(--cpd-info);
    color: white;
}

.cpd-service-badge.danger {
    background: var(--cpd-danger);
    color: white;
}

.cpd-service-badge.dark {
    background: #0f172a;
    color: white;
}

.cpd-service-badge.secondary {
    background: #64748b;
    color: white;
}

.cpd-service-badge.light {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid var(--cpd-border-color);
}

/* ============================================
   EVENTS LIST - Modern Cards
   ============================================ */
.cpd-event-card {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
    background: var(--cpd-surface);
    border: 1px solid var(--cpd-border-color);
    border-radius: var(--cpd-border-radius-lg);
    transition: all 0.3s ease;
    box-shadow: var(--cpd-shadow-sm);
}

.cpd-event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--cpd-shadow-md);
    border-color: var(--cpd-primary);
}

.cpd-event-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--cpd-primary) 0%, var(--cpd-secondary) 100%);
    border-radius: var(--cpd-border-radius);
    color: white;
}

.cpd-event-day {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.cpd-event-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.cpd-event-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.cpd-event-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--cpd-text-primary);
}

.cpd-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--cpd-text-secondary);
    margin-top: 0.25rem;
}

.cpd-event-meta i {
    margin-right: 0.25rem;
    color: var(--cpd-primary);
}

.cpd-event-time {
    display: inline-flex;
    align-items: center;
}

.cpd-event-location {
    display: inline-flex;
    align-items: center;
}

.cpd-event-type {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem;
}

.cpd-event-desc {
    font-size: 0.875rem;
    color: var(--cpd-text-tertiary);
    margin: 0.5rem 0 0;
    line-height: 1.4;
}

.cpd-event-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cpd-bg-tertiary);
    color: var(--cpd-text-secondary);
    transition: all 0.2s ease;
    align-self: center;
}

.cpd-event-link:hover {
    background: var(--cpd-primary);
    color: white;
}

/* Empty state */
.cpd-empty-state {
    padding: 3rem 1.5rem;
    background: var(--cpd-bg-secondary);
    border-radius: var(--cpd-border-radius-lg);
    border: 2px dashed var(--cpd-border-color);
}

.cpd-empty-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cpd-surface);
    border-radius: 50%;
    margin: 0 auto 1rem;
}

.cpd-empty-icon i {
    font-size: 2rem;
    color: var(--cpd-primary);
}

/* Legacy styles - kept for compatibility */
.cpd-event-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--cpd-border-color);
}

.cpd-event-item:last-child {
    border-bottom: none;
}

.cpd-event-date {
    min-width: 60px;
    text-align: center;
    padding: 0.75rem;
    background: var(--cpd-surface);
    border-radius: var(--cpd-border-radius);
}

.cpd-event-date .day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cpd-primary);
    line-height: 1;
}

.cpd-event-date .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--cpd-text-muted);
    letter-spacing: 0.05em;
}

.cpd-event-content h6 {
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.cpd-event-content p {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    color: var(--cpd-text-tertiary);
}

.cpd-event-content small {
    color: var(--cpd-text-muted);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cpd-cta {
    background: linear-gradient(135deg, var(--cpd-primary) 0%, var(--cpd-secondary) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.cpd-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cpd-cta-content {
    position: relative;
    z-index: 1;
}

.cpd-cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.cpd-cta-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.cpd-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: white;
    color: var(--cpd-primary);
    border-radius: var(--cpd-border-radius);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: var(--cpd-shadow-lg);
    transition: all 0.2s ease;
}

.cpd-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    color: var(--cpd-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.cpd-footer {
    background: var(--cpd-footer-bg);
    padding: 60px 0 30px;
}

.cpd-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cpd-footer-brand .logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.2);
    border-radius: var(--cpd-border-radius);
    color: var(--cpd-primary);
}

.cpd-footer-brand .logo-text {
    font-weight: 700;
    font-size: 1.125rem;
    color: white;
}

.cpd-footer-text {
    color: var(--cpd-footer-text);
    margin-bottom: 1.5rem;
}

.cpd-footer-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    margin-bottom: 1rem;
}

.cpd-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.cpd-footer-links a {
    color: var(--cpd-footer-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cpd-footer-links a:hover {
    color: var(--cpd-footer-text-hover);
}

.cpd-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cpd-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--cpd-footer-text);
    margin-bottom: 0.75rem;
}

.cpd-footer-contact i {
    color: var(--cpd-primary);
    margin-top: 0.25rem;
}

.cpd-social-links {
    display: flex;
    gap: 0.75rem;
}

.cpd-social-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cpd-border-color);
    border-radius: 50%;
    color: var(--cpd-footer-text);
    text-decoration: none;
    transition: all 0.2s ease;
}

.cpd-social-btn:hover {
    background: var(--cpd-primary);
    border-color: var(--cpd-primary);
    color: white;
}

.cpd-footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cpd-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.cpd-footer-copyright {
    color: var(--cpd-footer-text);
    font-size: 0.875rem;
    margin: 0;
}

/* ============================================
   PAGE HEADER (Contact, About)
   ============================================ */
.cpd-page-header {
    position: relative;
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--cpd-primary) 0%, var(--cpd-secondary) 100%);
    color: white;
}

.cpd-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cpd-page-header-content {
    position: relative;
    z-index: 1;
}

.cpd-page-header h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.cpd-page-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.cpd-contact-card {
    background: var(--cpd-card-bg);
    border: 1px solid var(--cpd-card-border);
    border-radius: var(--cpd-border-radius-lg);
    padding: 2rem;
    box-shadow: var(--cpd-card-shadow);
}

.cpd-contact-info-item {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.cpd-contact-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--cpd-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.cpd-contact-icon.primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--cpd-primary);
}

.cpd-contact-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--cpd-success);
}

.cpd-contact-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--cpd-warning);
}

.cpd-contact-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--cpd-danger);
}

.cpd-contact-info-content h6 {
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.cpd-contact-info-content p {
    margin: 0;
    color: var(--cpd-text-tertiary);
}

.cpd-form-control-custom {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--cpd-text-primary);
    background-color: var(--cpd-surface);
    border: 1px solid var(--cpd-border-color);
    border-radius: var(--cpd-border-radius);
    transition: all 0.2s ease;
}

.cpd-form-control-custom:focus {
    outline: none;
    border-color: var(--cpd-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cpd-form-control-custom::placeholder {
    color: var(--cpd-text-muted);
}

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

.cpd-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--cpd-primary), var(--cpd-secondary));
    color: white;
    border: none;
    border-radius: var(--cpd-border-radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.cpd-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--cpd-shadow-md);
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.cpd-about-image {
    border-radius: var(--cpd-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--cpd-shadow-lg);
}

.cpd-about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.cpd-value-card {
    background: var(--cpd-card-bg);
    border: 1px solid var(--cpd-card-border);
    border-radius: var(--cpd-border-radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.cpd-value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--cpd-shadow-lg);
}

.cpd-value-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--cpd-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
}

.cpd-stats-row {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.cpd-stat-item {
    text-align: center;
}

.cpd-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cpd-primary);
    line-height: 1;
}

.cpd-stat-label {
    font-size: 0.875rem;
    color: var(--cpd-text-muted);
    margin-top: 0.25rem;
}

/* ============================================
   MISSION LIST
   ============================================ */
.cpd-mission-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cpd-mission-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cpd-mission-check {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cpd-mission-check.primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--cpd-primary);
}

.cpd-mission-check.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--cpd-success);
}

.cpd-mission-check.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--cpd-warning);
}

.cpd-mission-content h6 {
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.cpd-mission-content p {
    margin: 0;
    color: var(--cpd-text-tertiary);
    font-size: 0.9375rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
    .cpd-hero {
        padding: 120px 0 80px;
    }
    
    .cpd-hero-title {
        font-size: 2.5rem;
    }
    
    .cpd-page-header {
        padding: 120px 0 60px;
    }
    
    .cpd-page-header h1 {
        font-size: 2.25rem;
    }
    
    .cpd-section {
        padding: 60px 0;
    }
    
    .cpd-cta-title {
        font-size: 2rem;
    }
    
    .cpd-stats-row {
        gap: 1rem;
    }
}

/* ============================================
   AUTH BUTTON STYLES
   ============================================ */
/* Desktop/Tablet styles for auth button */
#authButton .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--cpd-radius-md);
    transition: all var(--cpd-transition-fast);
    white-space: nowrap;
}

#authButton .btn-primary {
    background: linear-gradient(135deg, var(--cpd-primary) 0%, var(--cpd-primary-light) 100%);
    border: none;
    box-shadow: var(--cpd-shadow-sm);
}

#authButton .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--cpd-shadow-md);
    filter: brightness(1.1);
}

/* Tablet specific */
@media (max-width: 991.98px) and (min-width: 768px) {
    #authButton .btn {
        padding: 0.4375rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .navbar-collapse .d-flex.align-items-center.gap-2 {
        flex-direction: row;
        align-items: center !important;
        gap: 0.5rem !important;
        margin-top: 0;
        margin-left: 0.5rem !important;
    }
}

/* ============================================
   MOBILE NAVIGATION FIXES
   ============================================ */
@media (max-width: 991.98px) {
    /* Left-align nav items on mobile */
    .navbar-nav {
        align-items: flex-start !important;
        text-align: left;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        text-align: left;
        padding-left: 0.5rem;
        width: 100%;
    }
    
    /* Fix auth button on mobile */
    #authButton {
        width: 100%;
        margin-top: 0.75rem;
    }
    
    #authButton .btn {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
    }
    
    /* Fix theme toggle and auth container on mobile */
    .navbar-collapse .d-flex.align-items-center.gap-2 {
        flex-direction: column;
        align-items: flex-start !important;
        width: 100%;
        margin-left: 0 !important;
        margin-top: 1rem;
        gap: 0.5rem !important;
    }
    
    /* Theme toggle alignment */
    .cpd-theme-toggle {
        margin-left: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .cpd-hero-title {
        font-size: 2rem;
    }
    
    .cpd-hero-description {
        font-size: 1.125rem;
    }
    
    .cpd-section-title {
        font-size: 1.75rem;
    }
    
    .cpd-page-header h1 {
        font-size: 1.875rem;
    }
    
    .cpd-cta-title {
        font-size: 1.75rem;
    }
    
    .cpd-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cpd-animate {
    animation: fadeInUp 0.6s ease forwards;
}

.cpd-animate-delay-1 {
    animation-delay: 0.1s;
}

.cpd-animate-delay-2 {
    animation-delay: 0.2s;
}

.cpd-animate-delay-3 {
    animation-delay: 0.3s;
}

/* ============================================
   EVENT CARDS & FILTER STYLES
   ============================================ */
/* Public events page */
.cpd-events-hero {
    overflow: hidden;
}

.cpd-events-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
    font-weight: 700;
}

.cpd-events-filter-section {
    position: sticky;
    top: 72px;
    z-index: 10;
    padding: 1rem 0;
    background: rgba(15, 23, 42, 0.88);
    border-bottom: 1px solid var(--cpd-border-color);
    backdrop-filter: blur(14px);
}

[data-bs-theme="light"] .cpd-events-filter-section {
    background: rgba(255, 255, 255, 0.9);
}

.cpd-events-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    overflow-x: visible;
    padding: 0.25rem 0.1rem;
    scrollbar-width: thin;
}

.cpd-events-filter-bar .cpd-filter-btn {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0.6rem 0.9rem;
    color: var(--cpd-text-secondary);
    background: var(--cpd-surface);
    border: 1px solid var(--cpd-border-color);
    border-radius: 999px;
    box-shadow: var(--cpd-shadow-sm);
}

.cpd-events-filter-bar .cpd-filter-btn:hover {
    color: var(--cpd-text-primary);
    border-color: var(--cpd-primary);
    transform: translateY(-1px);
}

.cpd-events-filter-bar .cpd-filter-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--cpd-primary), var(--cpd-secondary));
    border-color: transparent;
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.26);
}

.cpd-events-section {
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 34rem),
        var(--cpd-bg-primary);
}

.cpd-section-alt.cpd-events-section {
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 30rem),
        var(--cpd-bg-secondary);
}

.cpd-events-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.cpd-events-heading h2 {
    margin: 0;
    color: var(--cpd-text-primary);
    font-size: 2rem;
    font-weight: 800;
}

.cpd-events-heading p {
    margin: 0.25rem 0 0;
    color: var(--cpd-text-tertiary);
}

.cpd-events-heading-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.5rem;
}

.cpd-events-heading-icon.upcoming {
    color: var(--cpd-success);
    background: rgba(16, 185, 129, 0.12);
}

.cpd-events-heading-icon.past {
    color: var(--cpd-text-tertiary);
    background: var(--cpd-surface);
    border: 1px solid var(--cpd-border-color);
}

.cpd-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.4rem;
}

.cpd-public-event-card {
    position: relative;
    overflow: hidden;
    min-height: 100%;
    background: var(--cpd-card-bg);
    border: 1px solid var(--cpd-card-border);
    border-radius: 18px;
    box-shadow: var(--cpd-card-shadow);
    animation: fadeInUp 0.55s ease both;
    animation-delay: calc(var(--event-index, 0) * 70ms);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cpd-public-event-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 24px 55px rgba(2, 6, 23, 0.2);
}

.cpd-public-event-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 36%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cpd-public-event-card:hover::after {
    opacity: 1;
}

.cpd-public-event-media {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(16, 185, 129, 0.16));
}

.cpd-public-event-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.cpd-public-event-card:hover .cpd-public-event-media img {
    transform: scale(1.06);
}

.cpd-public-event-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.78);
    background:
        linear-gradient(135deg, rgba(99, 102, 241, 0.86), rgba(16, 185, 129, 0.72)),
        repeating-linear-gradient(45deg, transparent 0 12px, rgba(255, 255, 255, 0.08) 12px 24px);
    font-size: 3.2rem;
}

.cpd-public-event-date {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    width: 74px;
    min-height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: white;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.28);
    backdrop-filter: blur(10px);
}

.cpd-public-event-date strong {
    font-size: 1.75rem;
    line-height: 1;
}

.cpd-public-event-date span {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cpd-public-event-body {
    padding: 1.2rem;
}

.cpd-public-event-topline,
.cpd-public-event-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.cpd-public-event-type {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    color: var(--cpd-primary);
    background: rgba(99, 102, 241, 0.12);
    font-size: 0.75rem;
    font-weight: 800;
}

.cpd-public-event-time,
.cpd-public-event-footer {
    color: var(--cpd-text-tertiary);
    font-size: 0.875rem;
}

.cpd-public-event-card h3 {
    margin: 0.85rem 0 0.45rem;
    color: var(--cpd-text-primary);
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.25;
}

.cpd-public-event-card p {
    margin: 0;
    color: var(--cpd-text-secondary);
    font-size: 0.92rem;
}

.cpd-public-event-footer {
    margin-top: 1rem;
}

.cpd-public-event-alert {
    color: var(--cpd-warning);
    font-weight: 700;
}

.cpd-public-event-card-past {
    opacity: 0.86;
}

.cpd-public-event-card-past .cpd-public-event-media img,
.cpd-public-event-card-past .cpd-public-event-placeholder {
    filter: saturate(0.65);
}

.cpd-events-empty {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.cpd-events-empty i {
    display: block;
    margin-bottom: 1rem;
    color: var(--cpd-text-tertiary);
    font-size: 3rem;
}

.cpd-events-empty p {
    margin: 0;
    color: var(--cpd-text-tertiary);
}

/* Filter buttons */
.cpd-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cpd-text-secondary);
    background: var(--cpd-surface-1);
    border: 1px solid var(--cpd-border);
    border-radius: var(--cpd-radius-full);
    text-decoration: none;
    transition: all var(--cpd-transition-fast);
}

.cpd-filter-btn:hover {
    background: var(--cpd-surface-3);
    color: var(--cpd-text-primary);
    border-color: var(--cpd-border-hover);
}

.cpd-filter-btn.active {
    background: linear-gradient(135deg, var(--cpd-primary) 0%, var(--cpd-primary-light) 100%);
    color: white;
    border-color: var(--cpd-primary);
}

.cpd-filter-btn i {
    font-size: 1rem;
}

/* Event cards */
.cpd-event-card {
    display: flex;
    background: var(--cpd-surface-1);
    border: 1px solid var(--cpd-border);
    border-radius: var(--cpd-radius-lg);
    overflow: hidden;
    transition: all var(--cpd-transition-fast);
}

.cpd-event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cpd-shadow-md);
    border-color: var(--cpd-border-hover);
}

.cpd-event-card-past {
    opacity: 0.85;
    background: var(--cpd-surface-2);
}

.cpd-event-card-past:hover {
    opacity: 1;
}

.cpd-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 1rem;
    background: linear-gradient(135deg, var(--cpd-primary) 0%, var(--cpd-primary-light) 100%);
    color: white;
    text-align: center;
}

.cpd-event-card-past .cpd-event-date {
    background: linear-gradient(135deg, var(--cpd-text-tertiary) 0%, var(--cpd-text-secondary) 100%);
}

.cpd-event-date .day {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.cpd-event-date .month {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cpd-event-content {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cpd-event-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cpd-event-meta .time {
    font-size: 0.8125rem;
    color: var(--cpd-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cpd-event-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cpd-text-primary);
    margin: 0;
    line-height: 1.4;
}

.cpd-event-description {
    font-size: 0.875rem;
    color: var(--cpd-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.cpd-event-location {
    font-size: 0.8125rem;
    color: var(--cpd-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: auto;
}

/* Page header */
.cpd-page-header {
    padding-top: calc(80px + 4rem);
    padding-bottom: 4rem;
    background: linear-gradient(135deg, var(--cpd-primary-dark) 0%, var(--cpd-primary) 100%);
    color: white;
    text-align: center;
}

.cpd-page-header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cpd-page-header-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Empty state */
.cpd-empty-state {
    text-align: center;
    padding: 2rem;
}

/* Responsive event cards */
@media (max-width: 767.98px) {
    .cpd-events-filter-bar {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .cpd-events-heading {
        justify-content: flex-start;
        margin-bottom: 1.5rem;
    }

    .cpd-events-heading h2 {
        font-size: 1.55rem;
    }

    .cpd-events-grid {
        grid-template-columns: 1fr;
    }

    .cpd-public-event-media {
        height: 170px;
    }

    .cpd-event-card {
        flex-direction: column;
    }
    
    .cpd-event-date {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        justify-content: flex-start;
    }
    
    .cpd-event-date .day {
        font-size: 1.5rem;
    }
    
    .cpd-event-date .month {
        font-size: 0.875rem;
    }
    
    .cpd-page-header-content h1 {
        font-size: 1.75rem;
    }
    
    .cpd-page-header-content p {
        font-size: 1rem;
    }
    
    .cpd-filter-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
/* ============================================
   PUBLIC EVENTS - PROFESSIONAL LAYOUT OVERRIDES
   ============================================ */
.cpd-events-hero {
    padding-top: calc(74px + 3.5rem);
    padding-bottom: 3.5rem;
    background: linear-gradient(135deg, #111827 0%, #26324d 58%, #14532d 100%);
}

.cpd-events-hero .cpd-page-header-content {
    max-width: 760px;
}

.cpd-events-hero h1 {
    margin-bottom: 0.75rem;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0;
}

.cpd-events-hero p {
    max-width: 640px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.05rem;
}

.cpd-events-page {
    padding: 2rem 0 5rem;
    background: var(--cpd-bg-primary);
}

.cpd-events-toolbar {
    position: sticky;
    top: 73px;
    z-index: 11;
    display: grid;
    grid-template-columns: minmax(180px, 260px) 1fr;
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 3rem;
    padding: 1rem;
    background: color-mix(in srgb, var(--cpd-bg-primary) 88%, transparent);
    border: 1px solid var(--cpd-border-color);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.12);
    backdrop-filter: blur(14px);
}

.cpd-events-eyebrow {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--cpd-primary);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.cpd-events-toolbar h2 {
    margin: 0;
    color: var(--cpd-text-primary);
    font-size: 1.15rem;
    font-weight: 800;
}

.cpd-events-toolbar .cpd-events-filter-bar {
    justify-content: flex-start;
    gap: 0.5rem;
}

.cpd-events-toolbar .cpd-filter-btn {
    min-height: 38px;
    padding: 0.5rem 0.72rem;
    border-radius: 10px;
    color: var(--cpd-text-secondary);
    background: transparent;
    border-color: var(--cpd-border-color);
    box-shadow: none;
    line-height: 1;
}

.cpd-events-toolbar .cpd-filter-btn:hover {
    background: var(--cpd-surface);
    transform: translateY(-1px);
}

.cpd-events-toolbar .cpd-filter-btn.active {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24);
}

.cpd-events-section {
    padding: 0;
    background: transparent;
}

.cpd-events-section + .cpd-events-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--cpd-border-color);
}

.cpd-events-heading {
    justify-content: flex-start;
    margin-bottom: 1.25rem;
}

.cpd-events-heading h2 {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    letter-spacing: 0;
}

.cpd-events-heading p {
    font-size: 0.95rem;
}

.cpd-events-heading-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.cpd-events-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.cpd-public-event-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: var(--cpd-card-bg);
    border: 1px solid var(--cpd-card-border);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.1);
    animation: fadeInUp 0.45s ease both;
    animation-delay: calc(var(--event-index, 0) * 55ms);
}

.cpd-public-event-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--cpd-primary) 58%, var(--cpd-card-border));
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.16);
}

.cpd-public-event-card::after {
    content: none;
}

.cpd-public-event-media {
    height: auto;
    aspect-ratio: 16 / 9;
    background: #1f2937;
}

.cpd-public-event-placeholder {
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(20, 83, 45, 0.82)),
        repeating-linear-gradient(45deg, transparent 0 16px, rgba(255, 255, 255, 0.08) 16px 32px);
}

.cpd-public-event-date {
    left: 0.85rem;
    bottom: 0.85rem;
    width: 66px;
    min-height: 66px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
}

.cpd-public-event-date strong {
    font-size: 1.55rem;
}

.cpd-public-event-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1rem;
}

.cpd-public-event-topline {
    justify-content: space-between;
    gap: 0.5rem;
}

.cpd-public-event-type {
    min-width: 0;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    font-size: 0.72rem;
}

.cpd-public-event-time {
    flex: 0 0 auto;
}

.cpd-public-event-card h3 {
    margin: 0.85rem 0 0.45rem;
    font-size: 1.05rem;
    line-height: 1.3;
}

.cpd-public-event-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.cpd-public-event-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--cpd-border-color);
}

.cpd-public-event-footer span {
    min-width: 0;
}

.cpd-public-event-card-past {
    opacity: 1;
    box-shadow: none;
}

.cpd-public-event-card-past .cpd-public-event-type {
    color: var(--cpd-text-secondary);
    background: var(--cpd-bg-secondary);
}

.cpd-events-empty {
    border-radius: 12px;
    background: var(--cpd-bg-secondary);
}

@media (max-width: 1199.98px) {
    .cpd-events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .cpd-events-toolbar {
        position: static;
        grid-template-columns: 1fr;
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .cpd-events-page {
        padding: 1.25rem 0 3.5rem;
    }

    .cpd-events-toolbar {
        padding: 0.85rem;
        border-radius: 12px;
    }

    .cpd-events-toolbar .cpd-events-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }

    .cpd-events-toolbar .cpd-filter-btn {
        flex: 0 0 auto;
    }

    .cpd-events-grid {
        grid-template-columns: 1fr;
    }

    .cpd-events-heading {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .cpd-events-heading-icon {
        width: 40px;
        height: 40px;
    }

    .cpd-public-event-card {
        border-radius: 10px;
    }

    .cpd-public-event-body {
        padding: 0.9rem;
    }
}

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

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--cpd-primary);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --cpd-border-color: currentColor;
    }
}
