/* Page-specific styles for MiH-PaH website */

/* Page Headers - Enhanced Apple-inspired with gradient */
.page-header {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    padding: 10rem 0 8rem;
    margin-top: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.page-header h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    position: relative;
    z-index: 1;
    color: var(--text-inverse) !important;
}

.page-header p {
    font-size: 1.5rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    color: var(--text-inverse) !important;
}

/* Blackjack Button */
.blackjack-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #FCD92D 0%, #FFE033 100%);
    color: #251B22;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.blackjack-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #FFE033 0%, #FCD92D 100%);
}

.blackjack-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.blackjack-btn i {
    font-size: 1.1rem;
    animation: pulse 2s ease-in-out infinite;
}

.blackjack-btn i.fa-spade {
    color: #251B22;
}

.blackjack-btn i.fa-heart {
    color: #D2141E;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* Content Cards */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.content-card {
    background: var(--background);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-subtle);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.content-card:hover::before {
    opacity: 1;
}

.content-card .card-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.content-card .card-icon i {
    font-size: 3rem;
    color: var(--primary-color);
}

.content-card h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.content-card ul {
    list-style: none;
    padding: 0;
}

.content-card ul li {
    margin-bottom: 0.75rem;
    padding-left: 0;
}

/* Education Page Sections */
.education-section {
    padding: 4rem 0;
}

.education-section.alt {
    background: var(--background-alt);
}

/* Night mode styles for About page */
/* Mission, Vision, and Values cards - lighter shade of gray */
[data-theme="dark"] .mission-vision .content-card {
    background: #3a3a3c;
    border-color: #424245;
}

[data-theme="dark"] .mission-vision .content-card h2 {
    color: #f5f5f7;
}

[data-theme="dark"] .mission-vision .content-card p {
    color: #d1d5db;
}

[data-theme="dark"] .mission-vision .content-card ul li {
    color: #d1d5db;
}

[data-theme="dark"] .mission-vision .content-card ul li strong {
    color: #f5f5f7;
}

/* What We Do cards - match Mission/Vision/Values style (dark gray with white text) */
[data-theme="dark"] .activities-section .activity-card {
    background: #3a3a3c;
    border-color: #424245;
}

[data-theme="dark"] .activities-section .activity-card h3 {
    color: #f5f5f7;
}

[data-theme="dark"] .activities-section .activity-card p {
    color: #d1d5db;
}

/* Our Impact cards - match What We Do cards style (same shade of gray) */
[data-theme="dark"] .stat-card {
    background: #3a3a3c;
    border-color: #424245;
}

[data-theme="dark"] .stat-card .stat-number {
    color: #0D3F91;
}

/* Our Impact section - numbers in brand yellow (consistent in dark mode) */
[data-theme="dark"] .impact-section .stat-number {
    color: #FCD92D;
}

[data-theme="dark"] .stat-card .stat-label {
    color: #d1d5db;
}

/* Nonprofit page - Committees and Staff cards - match Mission/Vision/Values style */
[data-theme="dark"] .staff-grid .board-member {
    background: #3a3a3c;
    border-color: #424245;
}

[data-theme="dark"] .staff-grid .board-member .member-title {
    color: #f5f5f7;
}

[data-theme="dark"] .staff-grid .board-member .member-info h3 {
    color: #f5f5f7;
}

[data-theme="dark"] .staff-grid .board-member .member-bio {
    color: #d1d5db;
}

[data-theme="dark"] .staff-grid .board-member .member-telegram {
    color: #d1d5db;
}

[data-theme="dark"] .staff-grid .board-member .member-role h4 {
    color: #f5f5f7;
}

[data-theme="dark"] .staff-grid .board-member .member-role p {
    color: #d1d5db;
}

/* Nonprofit page - Governance document cards - match Mission/Vision/Values style */
[data-theme="dark"] .governance-section .document-card {
    background: #3a3a3c;
    border-color: #424245;
}

[data-theme="dark"] .governance-section .document-card h3 {
    color: #f5f5f7;
}

[data-theme="dark"] .governance-section .document-card .document-meta {
    color: #d1d5db;
}

[data-theme="dark"] .governance-section .document-card .document-header i {
    color: #0D3F91;
}

/* General document cards (used in other sections) - match Mission/Vision/Values style */
[data-theme="dark"] .document-card {
    background: #3a3a3c;
    border-color: #424245;
}

[data-theme="dark"] .document-card h3 {
    color: #f5f5f7;
}

[data-theme="dark"] .document-card .document-meta {
    color: #d1d5db;
}

[data-theme="dark"] .document-card .document-header i {
    color: #0D3F91;
}

/* Contact page - Board member and committee cards - match Mission/Vision/Values style */
[data-theme="dark"] .horizontal-board-member {
    background: #3a3a3c;
    border-color: #424245;
}

[data-theme="dark"] .horizontal-board-member .member-title {
    color: #f5f5f7;
}

[data-theme="dark"] .horizontal-board-member .member-info h3 {
    color: #f5f5f7;
}

[data-theme="dark"] .horizontal-board-member .member-telegram {
    color: #d1d5db;
}

[data-theme="dark"] .horizontal-board-member .member-description {
    color: #d1d5db;
}

[data-theme="dark"] .horizontal-board-member .member-bio {
    color: #d1d5db;
}

[data-theme="dark"] .horizontal-board-member .member-role h4 {
    color: #f5f5f7;
}

[data-theme="dark"] .horizontal-board-member .member-role p {
    color: #d1d5db;
}

/* Contact page - Contact info cards - match Mission/Vision/Values style */
[data-theme="dark"] .contact-card {
    background: #3a3a3c;
    border-color: #424245;
}

[data-theme="dark"] .contact-card h3 {
    color: #f5f5f7;
}

[data-theme="dark"] .contact-card p {
    color: #d1d5db;
}

[data-theme="dark"] .contact-card .contact-icon {
    background: #2c2c2e;
}

[data-theme="dark"] .contact-card .contact-icon i {
    color: #0D3F91;
}

/* Contact page - General Inquiries (yellow) and Safety & Conduct (red) in dark mode */
[data-theme="dark"] .contact-options .contact-card:nth-child(1) .contact-icon i {
    color: #FCD92D;
}

[data-theme="dark"] .contact-options .contact-card:nth-child(1) .btn-primary {
    background: #FCD92D;
    color: #251B22;
    border-color: #FCD92D;
}

[data-theme="dark"] .contact-options .contact-card:nth-child(1) .btn-primary:hover {
    background: #E6C000;
    border-color: #E6C000;
}

[data-theme="dark"] .contact-options .contact-card:nth-child(2) .contact-icon i {
    color: #D2141E;
}

[data-theme="dark"] .contact-options .contact-card:nth-child(2) .btn-primary {
    background: #D2141E;
    color: #FFFFFF;
    border-color: #D2141E;
}

[data-theme="dark"] .contact-options .contact-card:nth-child(2) .btn-primary:hover {
    background: #B0121A;
    border-color: #B0121A;
}

/* Contact page - Telegram button - keep original light mode styling */
[data-theme="dark"] .contact-card .social-split .telegram-root.social-link {
    background: white !important;
    color: #251B22 !important;
    border-color: #f5f5f7 !important;
}

[data-theme="dark"] .contact-card .social-split .telegram-root.social-link:hover {
    color: #0D3F91 !important;
}

[data-theme="dark"] .contact-card .split-btn.sfw {
    background: #FCD92D !important;
    color: #251B22 !important;
}

[data-theme="dark"] .contact-card .split-btn.spaces {
    background: #0D3F91 !important;
    color: #FFFFFF !important;
}

[data-theme="dark"] .contact-card .split-btn.announcements {
    background: #D2141E !important;
    color: #FFFFFF !important;
}

[data-theme="dark"] .contact-card .split-btn.cancel {
    background: #e5e7eb !important;
    color: #251B22 !important;
}

/* Membership page - Perks cards (shown when not logged in) - match Mission/Vision/Values style */
[data-theme="dark"] .membership-perks .perk-item {
    background: #3a3a3c;
    border-color: #424245;
}

[data-theme="dark"] .membership-perks .perk-content h3 {
    color: #f5f5f7;
}

[data-theme="dark"] .membership-perks .perk-content p {
    color: #d1d5db;
}

/* Membership page - Tiers cards (shown when not logged in) - match Mission/Vision/Values style */
[data-theme="dark"] .membership-tiers .tier-card {
    background: #3a3a3c;
    border-color: #424245;
}

[data-theme="dark"] .membership-tiers .tier-header {
    background: linear-gradient(135deg, #0D3F91 0%, #061A3A 100%);
}

[data-theme="dark"] .membership-tiers .tier-header h3 {
    color: white;
}

[data-theme="dark"] .membership-tiers .tier-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

[data-theme="dark"] .membership-tiers .tier-section h4 {
    color: #f5f5f7;
}

[data-theme="dark"] .membership-tiers .tier-section h4 i {
    color: #0D3F91;
}

[data-theme="dark"] .membership-tiers .tier-list li {
    color: #d1d5db;
}

[data-theme="dark"] .membership-tiers .tier-list li:before {
    color: #0D3F91;
}

[data-theme="dark"] .membership-tiers .tier-list li:not(:last-child) {
    border-bottom-color: #424245;
}

/* Login page - Background black, modal dark gray with white text, inputs untouched */
[data-theme="dark"] .login-section {
    background: #251B22 !important;
}

[data-theme="dark"] .form-container {
    background: #3a3a3c !important;
    border-color: #424245 !important;
}

[data-theme="dark"] .form-container .login-header h1 {
    color: #f5f5f7 !important;
}

[data-theme="dark"] .form-container .login-header p {
    color: #d1d5db !important;
}

[data-theme="dark"] .form-container .form-group label {
    color: #f5f5f7 !important;
}

[data-theme="dark"] .form-container .form-help {
    color: #d1d5db !important;
}

[data-theme="dark"] .form-container .password-requirements {
    background: #2c2c2e !important;
}

[data-theme="dark"] .form-container .password-requirements p {
    color: #d1d5db !important;
}

[data-theme="dark"] .form-container .password-requirements li {
    color: #d1d5db !important;
}

[data-theme="dark"] .form-container .checkbox-label {
    color: #d1d5db !important;
}

[data-theme="dark"] .form-container .forgot-link {
    color: #0D3F91 !important;
}

[data-theme="dark"] .form-container .form-divider span {
    background: #3a3a3c !important;
    color: #d1d5db !important;
}

[data-theme="dark"] .form-container .form-divider::before {
    background: #424245 !important;
}

[data-theme="dark"] .form-container .signup-link p {
    color: #d1d5db !important;
}

[data-theme="dark"] .form-container .signup-link a {
    color: #0D3F91 !important;
}

/* Login page - Keep input boxes untouched (white background, dark text) */
[data-theme="dark"] .login-section .form-group input {
    background: white !important;
    color: #251B22 !important;
    border-color: #d2d2d7 !important;
}

[data-theme="dark"] .login-section .form-group input:focus {
    border-color: #0D3F91 !important;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1) !important;
}

[data-theme="dark"] .login-section .form-group input::placeholder {
    color: #86868b !important;
}

[data-theme="dark"] .login-section .login-icon {
    background: white !important;
}

[data-theme="dark"] .login-section .login-header h1 {
    color: #f5f5f7 !important;
}

[data-theme="dark"] .login-section .login-header p {
    color: #d1d5db !important;
}

/* Profile page - Background black, Profile Information card dark gray with white text, inputs and banner untouched */
[data-theme="dark"] .profile-section {
    background: #251B22 !important;
}

/* Profile Information card - dark gray with white text */
[data-theme="dark"] #profile-tab .profile-card {
    background: #3a3a3c !important;
    border-color: #424245 !important;
}

[data-theme="dark"] #profile-tab .profile-card .card-header h2 {
    color: #f5f5f7 !important;
}

[data-theme="dark"] #profile-tab .profile-card .card-header p {
    color: #d1d5db !important;
}

[data-theme="dark"] #profile-tab .profile-card .form-group label {
    color: #f5f5f7 !important;
}

[data-theme="dark"] #profile-tab .profile-card .form-help {
    color: #d1d5db !important;
}

[data-theme="dark"] #profile-tab .profile-card .char-counter {
    color: #d1d5db !important;
}

[data-theme="dark"] #profile-tab .profile-card .toggle-label {
    color: #d1d5db !important;
}

[data-theme="dark"] #profile-tab .profile-card .input-prefix {
    color: #251B22 !important;
}

[data-theme="dark"] #profile-tab .profile-card textarea {
    background: white !important;
    color: #251B22 !important;
    border-color: #d2d2d7 !important;
}

[data-theme="dark"] #profile-tab .profile-card textarea:focus {
    border-color: #0D3F91 !important;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1) !important;
}

[data-theme="dark"] #profile-tab .profile-card textarea::placeholder {
    color: #86868b !important;
}

/* Profile page - Keep input boxes untouched (white background, dark text) */
[data-theme="dark"] .profile-section .form-group input {
    background: white !important;
    color: #251B22 !important;
    border-color: #d2d2d7 !important;
}

[data-theme="dark"] .profile-section .form-group input:focus {
    border-color: #0D3F91 !important;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1) !important;
}

[data-theme="dark"] .profile-section .form-group input::placeholder {
    color: #86868b !important;
}

[data-theme="dark"] .profile-section .form-group input[readonly] {
    background: #f5f5f7 !important;
    color: #251B22 !important;
}

/* Profile page - Keep banner area completely untouched */
[data-theme="dark"] .profile-header-card,
[data-theme="dark"] .profile-header-card *,
[data-theme="dark"] .profile-header-content,
[data-theme="dark"] .profile-header-content *,
[data-theme="dark"] .profile-cover,
[data-theme="dark"] .profile-cover *,
[data-theme="dark"] .profile-pictures-wrapper,
[data-theme="dark"] .profile-pictures-wrapper *,
[data-theme="dark"] .profile-header-info,
[data-theme="dark"] .profile-header-info *,
[data-theme="dark"] .role-buttons-banner,
[data-theme="dark"] .role-buttons-banner * {
    /* All banner elements remain untouched - no dark mode overrides */
}

/* Profile page - Keep texture dropdown, color pickers, and role text untouched */
[data-theme="dark"] #texturePicker {
    background: white !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 6px center !important;
    background-size: 10px !important;
    color: #251B22 !important;
    border-color: #d2d2d7 !important;
}

[data-theme="dark"] .color-picker-item {
    color: #251B22 !important;
}

[data-theme="dark"] .color-picker-item span {
    color: #251B22 !important;
}

[data-theme="dark"] .texture-picker-item {
    color: #251B22 !important;
}

[data-theme="dark"] .texture-picker-item span {
    color: #251B22 !important;
}

[data-theme="dark"] .profile-header-info .profile-role {
    color: #251B22 !important;
    text-shadow: 
        -2px -2px 0 white,
        2px -2px 0 white,
        -2px 2px 0 white,
        2px 2px 0 white,
        -2px 0 0 white,
        2px 0 0 white,
        0 -2px 0 white,
        0 2px 0 white,
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white !important;
}

[data-theme="dark"] .profile-header-info h1 {
    color: #251B22 !important;
}

[data-theme="dark"] .profile-header-info h1#profileDisplayName {
    color: #251B22 !important;
}

[data-theme="dark"] .profile-header-info .profile-telegram {
    color: #86868b !important;
}

[data-theme="dark"] .profile-header-info .profile-telegram i {
    color: #0088cc !important;
}

[data-theme="dark"] .profile-header-info .profile-telegram span {
    color: #251B22 !important;
}

[data-theme="dark"] .profile-header-info .profile-telegram span#profileTelegram {
    color: #251B22 !important;
    text-shadow: 
        -2px -2px 0 white,
        2px -2px 0 white,
        -2px 2px 0 white,
        2px 2px 0 white,
        -2px 0 0 white,
        2px 0 0 white,
        0 -2px 0 white,
        0 2px 0 white,
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white !important;
}

/* Security Settings and Manage Membership cards - dark gray with white text */
[data-theme="dark"] #security-tab .profile-card,
[data-theme="dark"] #account-tab .profile-card {
    background: #3a3a3c !important;
    border-color: #424245 !important;
}

[data-theme="dark"] #security-tab .profile-card .card-header h2,
[data-theme="dark"] #account-tab .profile-card .card-header h2 {
    color: #f5f5f7 !important;
}

[data-theme="dark"] #security-tab .profile-card .card-header p,
[data-theme="dark"] #account-tab .profile-card .card-header p {
    color: #d1d5db !important;
}

[data-theme="dark"] #security-tab .profile-card .form-group label,
[data-theme="dark"] #account-tab .profile-card .form-group label {
    color: #f5f5f7 !important;
}

[data-theme="dark"] #security-tab .profile-card .form-help,
[data-theme="dark"] #account-tab .profile-card .form-help {
    color: #d1d5db !important;
}

[data-theme="dark"] #security-tab .profile-card .toggle-label,
[data-theme="dark"] #account-tab .profile-card .toggle-label {
    color: #d1d5db !important;
}

[data-theme="dark"] #security-tab .profile-card .document-card,
[data-theme="dark"] #account-tab .profile-card .document-card {
    background: #2c2c2e !important;
    border-color: #424245 !important;
}

[data-theme="dark"] #security-tab .profile-card .document-card h3,
[data-theme="dark"] #account-tab .profile-card .document-card h3 {
    color: #f5f5f7 !important;
}

[data-theme="dark"] #security-tab .profile-card .document-card .document-meta,
[data-theme="dark"] #account-tab .profile-card .document-card .document-meta {
    color: #d1d5db !important;
}

[data-theme="dark"] #security-tab .profile-card .document-card .document-header i,
[data-theme="dark"] #account-tab .profile-card .document-card .document-header i {
    color: #0D3F91 !important;
}

[data-theme="dark"] #security-tab .profile-card .settings-section h3,
[data-theme="dark"] #account-tab .profile-card .settings-section h3 {
    color: #f5f5f7 !important;
}

[data-theme="dark"] #security-tab .profile-card .settings-section p,
[data-theme="dark"] #account-tab .profile-card .settings-section p {
    color: #d1d5db !important;
}

[data-theme="dark"] #security-tab .profile-card textarea,
[data-theme="dark"] #account-tab .profile-card textarea {
    background: white !important;
    color: #251B22 !important;
    border-color: #d2d2d7 !important;
}

[data-theme="dark"] #security-tab .profile-card textarea:focus,
[data-theme="dark"] #account-tab .profile-card textarea:focus {
    border-color: #0D3F91 !important;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1) !important;
}

[data-theme="dark"] #security-tab .profile-card textarea::placeholder,
[data-theme="dark"] #account-tab .profile-card textarea::placeholder {
    color: #86868b !important;
}

/* Footer - keep unchanged in night mode */
[data-theme="dark"] .footer {
    background: #251B22;
    color: white;
}

[data-theme="dark"] .footer-logo {
    color: white;
}

.footer-logo img {
    height: 48px;
    width: auto;
    border-radius: 4px;
}

[data-theme="dark"] .footer-section h4 {
    color: white;
}

[data-theme="dark"] .footer-section ul li a {
    color: #d1d5db;
}

[data-theme="dark"] .footer-section ul li a:hover {
    color: #FCD92D;
}

[data-theme="dark"] .footer-section p {
    color: #d1d5db;
}

[data-theme="dark"] .footer-section p a {
    color: #FFFFFF;
}

[data-theme="dark"] .footer-section p a:hover {
    color: #FCD92D;
}

[data-theme="dark"] .footer-social a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

[data-theme="dark"] .footer-social a:hover {
    background: #0D3F91;
}

[data-theme="dark"] .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .footer-bottom p {
    color: #9ca3af;
}

/* Timeline Styles - Horizontal Scrolling with Square Boxes */
.history-section {
    background: var(--background-alt);
    padding: 4rem 0;
}

.history-section .timeline {
    width: 80vw;         /* 80% of the viewport */
    max-width: 80vw;     /* prevents container max-width from shrinking it */
    margin: 0 auto;      /* center it */
}

.timeline {
    position: relative;
    display: flex;
    overflow-x: auto;
    width: 100%;          /* fill full screen width */
    max-width: none;      /* remove 80vw cap */
    margin: 0;            /* remove auto margin */
    padding: 4rem 0;
    gap: 3rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-alt);
}


/* Custom scrollbar styling */
.timeline::-webkit-scrollbar {
    height: 8px;
}

.timeline::-webkit-scrollbar-track {
    background: var(--background-alt);
    border-radius: 4px;
}

.timeline::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.timeline::-webkit-scrollbar-thumb:hover {
    background: #0056d6;
}

.timeline::before {
  content: "";
}

.timeline-track::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: var(--border, #e6e6e6);
  width: 100%;
  z-index: 1;
}

/* the horizontal track holds all points (forces horizontal scroll) */
.timeline-track {
    position: relative;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    min-width: max-content;  /* keep horizontal layout */
    padding: 0 1rem;
    z-index: 2;
}

/* each event column */
.timeline-point {
  width: 240px;                 /* column width */
  height: 480px;               /* total column height; controls connector length */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between; /* top item at top, bottom at bottom, connectors fill space */
  box-sizing: border-box;
  position: relative;
}

/* the square event boxes */
.timeline-item {
  /* flex: 0 0 auto; is still needed for horizontal layout */
  flex: 0 0 auto;
  min-width: 300px; /* starting width */
  height: 220px;    /* keep boxes square in height */
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

/* placeholder keeps spacing but is visually empty */
.timeline-item.placeholder .timeline-content {
  visibility: hidden;
  height: 100%;
}

/* actual content card inside square */
.timeline-content {
  min-width: inherit;       /* base width matches .timeline-item */
  width: auto;              /* allow width expansion */
  height: 100%;             /* fixed height for alignment */
  padding: 14px;
  border-radius: 10px;
  background: var(--background, #fff);
  border: 2px solid var(--border, #e6e6e6);
  box-shadow: var(--shadow, 0 2px 6px rgba(0,0,0,0.04));
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;        /* no scrollbar, let it expand instead */
  white-space: normal;      /* allow wrapping if needed */
}

/* make event cards clearly clickable */
.timeline-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.timeline-clickable:hover,
.timeline-clickable:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  outline: none;
}

/* small date/title styles (adjust to taste) */
.timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.timeline-content h3 {
  font-size: 1rem;
  margin: 0;
  color: var(--text-primary);
}

.timeline-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* connectors that stretch to fill space between item and center dot */
.timeline-connector {
  width: 2px;
  background: var(--border, #e6e6e6);
  flex: 1;                     /* expand to fill the gap so all connector lengths are consistent */
  z-index: 0;
  border-radius: 1px;
}

/* central dot at the center line */
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-color, #0D3F91);
  border: 3px solid var(--background, #fff);
  z-index: 3;
  box-shadow: 0 0 0 6px rgba(0, 122, 255, 0.06);
}

/* small responsive scaling */
@media (max-width: 900px) {
  .timeline-point { width: 200px; height: 420px; }
  .timeline-item { width: 180px; height: 180px; }
}

@media (max-width: 520px) {
  .timeline-point { width: 160px; height: 380px; gap: 6px; }
  .timeline-item { width: 140px; height: 140px; }
  .timeline-track { gap: 1rem; }
}

/* Timeline modal overlay and content */
.timeline-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 2000;
}
.timeline-modal-overlay.active { display: flex; }

.timeline-modal {
  background: #fff;
  width: min(1000px, 95vw);
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  animation: modalIn 0.2s ease-out;
}

[data-theme="dark"] .timeline-modal {
  background: #000;
  border-color: #2c2c2e;
}

.timeline-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1000;
  /* Better touch target for mobile */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  /* Improved visual feedback */
  font-size: 1.1rem;
  color: var(--text-secondary, #666);
}

[data-theme="dark"] .timeline-modal-close {
  background: rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
}

[data-theme="dark"] .timeline-modal-close:hover,
[data-theme="dark"] .timeline-modal-close:focus {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.timeline-modal-close:hover,
.timeline-modal-close:focus { 
  background: rgba(0,0,0,0.2); 
  color: var(--text-primary, #333);
  transform: scale(1.05);
}
.timeline-modal-close:active {
  transform: scale(0.95);
  background: rgba(0,0,0,0.3);
}

.timeline-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 0;
  height: 100%;
}

.timeline-modal-text {
  padding: 2rem;
  padding-bottom: 5rem; /* Add space for navigation buttons */
}
.timeline-modal-text .timeline-modal-date {
  color: var(--primary-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .timeline-modal-text .timeline-modal-date {
  color: #ffffff;
}
.timeline-modal-text h3 {
  margin: 0 0 0.75rem 0;
}
.timeline-modal-text p {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.6;
}

[data-theme="dark"] .timeline-modal-text h3,
[data-theme="dark"] .timeline-modal-text p {
  color: #ffffff;
}

.timeline-modal-image {
  background: var(--background-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
}
.timeline-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background-color: white;
}

[data-theme="dark"] .timeline-modal-image {
  background: #000 !important;
}

[data-theme="dark"] .timeline-modal-image img {
  background-color: #000;
}

/* Carousel nav buttons positioned at bottom corners of text area */
.timeline-modal-text {
  position: relative;
}

.timeline-nav-btn {
  position: absolute;
  bottom: 1rem;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.timeline-nav-btn.left { left: 1rem; }
.timeline-nav-btn.right { right: 1rem; }
.timeline-nav-btn:hover { 
  background: rgba(0,0,0,0.8); 
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

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

@media (max-width: 768px) {
  .timeline-modal-grid { grid-template-columns: 1fr; }
  .timeline-modal-image { 
    height: 40vh; 
    padding: 15px;
  }
  .timeline-modal-text {
    padding: 1.5rem;
    padding-bottom: 5rem; /* Add space for navigation buttons */
  }
  .timeline-nav-btn {
    width: 40px;
    height: 40px;
    bottom: 0.75rem;
  }
  .timeline-nav-btn.left { left: 0.75rem; }
  .timeline-nav-btn.right { right: 0.75rem; }
  
  /* Enhanced mobile close button */
  .timeline-modal-close {
    width: 48px;
    height: 48px;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.15);
    backdrop-filter: blur(4px);
    font-size: 1.2rem;
    /* Ensure it's always clickable */
    z-index: 1001;
  }
  .timeline-modal-close:hover,
  .timeline-modal-close:focus {
    background: rgba(0,0,0,0.25);
    transform: scale(1.03);
  }
}

@media (max-width: 480px) {
  .timeline-modal-text {
    padding: 1rem;
    padding-bottom: 4.5rem; /* Slightly less space on very small screens */
  }
  .timeline-nav-btn {
    width: 36px;
    height: 36px;
    bottom: 0.5rem;
  }
  .timeline-nav-btn.left { left: 0.5rem; }
  .timeline-nav-btn.right { right: 0.5rem; }
  
  /* Extra large close button for small screens */
  .timeline-modal-close {
    width: 52px;
    height: 52px;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(6px);
    font-size: 1.3rem;
    /* Maximum clickability */
    z-index: 1002;
    border: 2px solid rgba(255, 255, 255, 0.1);
  }
  .timeline-modal-close:hover,
  .timeline-modal-close:focus,
  .timeline-modal-close:active {
    background: rgba(0,0,0,0.3);
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
  }
}

/* Blog: Community Members section width mirrors About timeline (80% viewport) */
.community-members .container {
    width: 80vw;
    max-width: 80vw;
    margin: 0 auto;
}

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

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--background);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-subtle);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

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

.stat-card:hover::before {
    opacity: 1;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Our Impact section - numbers in brand yellow */
.impact-section .stat-number {
    color: #FCD92D;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Activities Grid */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.activity-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all 0.3s ease;
}

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

.activity-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.activity-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.activity-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* CTA Section - Apple-inspired */
.cta-section {
    background: var(--primary-color);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white !important;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: white !important;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-buttons .btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 2.5rem;
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--background);
    letter-spacing: -0.01em;
    font-family: inherit;
    color: var(--text-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
    opacity: 1;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
    background: var(--background);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: var(--error);
}

.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

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

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

.data-table th {
    background: var(--background-alt);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
}

.data-table tr:hover {
    background: var(--background-alt);
}

/* Document Cards */
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.document-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.document-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.document-header h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.document-actions {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Calendar Styles */
.calendar-container {
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.calendar-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.calendar-nav button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.25, 1);
}

.calendar-nav button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.event-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.25, 1);
}

.event-card.recurring {
    border-left-color: #8e44ad;
    background: linear-gradient(to right, rgba(142, 68, 173, 0.05), transparent);
}

.event-date {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.event-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.event-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Profile Styles */
.profile-header {
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Vendor Form Styles */
.vendor-form {
    margin-top: 2rem;
    animation: slideIn 0.3s ease-out;
}

.vendor-form .settings-section {
    background: var(--background);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.vendor-form .settings-section h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

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

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

.vendor-form .form-group input,
.vendor-form .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--background);
    color: var(--text-primary);
    font-family: inherit;
}

.vendor-form .form-group input:focus,
.vendor-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

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

.vendor-form .image-upload-container {
    margin-top: 0.5rem;
}

.vendor-form .image-upload-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.vendor-form .image-upload-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vendor-form .single-image-preview {
    width: 100%;
    max-width: 200px;
    height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: var(--background-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.vendor-form .single-image-preview:hover {
    border-color: var(--primary-color);
    background: rgba(0, 122, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.vendor-form .upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
}

.vendor-form .upload-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.vendor-form .upload-placeholder span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.vendor-form .single-image-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.vendor-form .single-image-preview .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.vendor-form .single-image-preview .remove-image:hover {
    background: #d70015;
    transform: scale(1.1);
}

.vendor-form .single-image-preview .placeholder-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: center;
    padding: 1rem;
}

.vendor-form .image-preview {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.vendor-form .image-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.vendor-form .image-preview .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.vendor-form .image-preview .remove-image:hover {
    background: #d70015;
    transform: scale(1.1);
}

.vendor-form .form-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: block;
}

.vendor-form .form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    text-align: right;
}

.vendor-form .form-actions .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
}

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

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 4px solid var(--primary-color);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.profile-badges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 4px 8px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge.mentor { background: var(--success); }
.badge.newbie { background: var(--warning); }
.badge.alpha { background: var(--secondary-color); }

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 18px;
    padding: 2rem;
    text-align: center;
    background: var(--background-alt);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.25, 1);
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.upload-area i {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--text-secondary);
    margin: 0;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--error); }
.toast-warning { border-left-color: var(--warning); }

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Membership Page Styles */
.membership-benefits {
    background: var(--background-alt);
}

.membership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.membership-card {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.membership-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-subtle);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.membership-card:hover::before {
    opacity: 0.5;
}

.membership-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

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

.membership-card.featured:hover {
    transform: scale(1.05) translateY(-2px);
}

.membership-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.membership-card .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.membership-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    text-align: left;
}

.membership-card ul li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.membership-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Board Page Styles */
.moderators-section {
    background: var(--background-alt);
}

.moderators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.moderator-card {
    border-left: 4px solid var(--accent-color);
}

.moderator-card .member-badge.moderator {
    background: var(--accent-color);
}

/* Blog List Styles */
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 2rem 0;
}

.post-card {
    background: white;
    border-radius: 0;
    border-left: 4px solid var(--primary-color);
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

.post-card:hover {
    background: var(--background-alt);
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.post-card:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.post-card:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-bottom: none;
}

.post-header {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.post-category {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-category.education { background: var(--primary-color); color: white; }
.post-category.events { background: var(--secondary-color); color: white; }
.post-category.personal { background: var(--accent-color); color: var(--text-primary); }
.post-category.community { background: var(--success); color: white; }
.post-category.safety { background: var(--text-primary); color: white; }

.post-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.post-content {
    display: none; /* Hide content in list view */
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    background: var(--background-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.author-title {
    color: var(--text-light);
    font-size: 0.75rem;
}

.post-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.8rem;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Donate Page Styles */
.donate-header {
    padding: 4rem 0 2rem; /* Reduced by 60% */
}

.quick-donate-section {
    background: var(--background-alt);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-light);
}

.quick-donate-widget {
    background: white;
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--border-light);
}

.widget-header h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.widget-header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.quick-amounts {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.quick-amount-btn {
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    background: transparent;
    border-radius: 980px;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.25, 1);
    min-width: 80px;
}

.quick-amount-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.quick-amount-btn.featured {
    transform: scale(1.1);
}

.quick-amount-btn.featured:hover {
    transform: scale(1.1) translateY(-2px);
}

.widget-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Merchants Page Styles */
.merchants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.merchant-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.merchant-header {
    background: var(--gradient);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.merchant-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.merchant-icon i {
    font-size: 1.8rem;
    color: white;
}

.merchant-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: white !important;
}

.merchant-specialty {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.merchant-bio {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.merchant-bio p {
    margin: 0 0 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.merchant-bio p:last-child {
    margin-bottom: 0;
}

.merchant-specialties {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.merchant-specialties h4 {
    margin: 0 0 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.merchant-specialties ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.merchant-specialties li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.merchant-specialties li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.merchant-links {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.commission-info {
    background: var(--background-alt);
    padding: 4rem 0;
}

/* Responsive Design for Pages */
@media (max-width: 768px) {
    .page-header {
        padding: 6rem 0 3rem;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .blackjack-btn {
        font-size: 1.1rem;
        padding: 0.9rem 2rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile timeline - horizontal scrolling with smaller cards */
    .timeline {
        padding: 3rem 1rem;
        gap: 2rem;
    }
    
    /* Timeline line removed */
    
    .timeline-item {
        min-width: 280px;
    }
    
    .timeline-marker {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        margin-bottom: 1.5rem;
    }
    
    .timeline-marker i {
        font-size: 1.2rem;
    }
    
    .timeline-content {
        width: 280px;
        min-height: 160px;
        padding: 1.5rem;
    }
    
    .timeline::-webkit-scrollbar {
        height: 6px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .activities-grid {
        grid-template-columns: 1fr;
    }
    
    .merchants-grid {
        grid-template-columns: 1fr;
    }
    
    .merchant-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 5rem 0 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .blackjack-btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
        margin-top: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .document-actions {
        flex-direction: column;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
} 

/* --- Mobile enhancements: timeline and profile layout fixes (no desktop impact) --- */
@media (max-width: 520px) {
  /* Prevent timeline content from spilling out of cards on very small screens */
  .timeline-point { height: auto; }
  .timeline-item {
    width: 220px;           /* larger card for readability */
    min-width: 220px;
    height: auto;           /* let content define height */
  }
  .timeline-content {
    height: auto;           /* allow expansion */
    overflow: hidden;       /* no overflow beyond rounded corners */
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 768px) {
  /* Reposition profile header elements to avoid overlap on mobile */
  .profile-section .profile-header-content { margin-top: 0 !important; }
  .profile-section .profile-picture-container { margin-top: 0 !important; }
  .profile-section .profile-color-picker {
    top: auto !important;
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}

@media (max-width: 480px) {
  /* Slightly taller cover to ensure avatar isn't cropped */
  .profile-section .profile-cover { height: 120px !important; }
}

/* --- Mobile-only timeline as separated cards; hide middle line and dots; widen members container --- */
@media (max-width: 768px) {
  /* Convert horizontal timeline to vertical card list */
  .timeline { overflow-x: visible; padding: 1.5rem 0; }
  .timeline-track { flex-direction: column; align-items: stretch; gap: 1rem; min-width: 0; padding: 0; }
  .timeline-track::before, .timeline-dot, .timeline-connector { display: none !important; }
  .timeline-point { width: 100%; height: auto; align-items: stretch; justify-content: flex-start; gap: 0; }
  .timeline-item { width: 100%; min-width: 0; height: auto; }
  .timeline-item.placeholder { display: none; }
  .timeline-content { min-width: 0; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

  /* Blog members container: use full viewport width on mobile for more room */
  .community-members .container { width: 100vw; max-width: 100vw; padding-left: 15px; padding-right: 15px; }
}

/* --- Construction Page Styles --- */
.construction-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 4rem 0;
}

.construction-card {
    background: var(--background);
    padding: 4rem 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    text-align: center;
    max-width: 500px;
    width: 100%;
    transition: var(--transition);
}

.construction-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.construction-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    display: block;
}

.construction-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.construction-message {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.construction-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.construction-card .btn {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Mobile responsive for construction page */
@media (max-width: 768px) {
    .construction-container {
        padding: 2rem 1rem;
        min-height: 50vh;
    }
    
    .construction-card {
        padding: 3rem 2rem;
    }
    
    .construction-title {
        font-size: 2rem;
    }
    
    .construction-message {
        font-size: 1.1rem;
    }
}