/* 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;
}

/* 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;
}

/* 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, #007aff);
  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;
}

.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);
}
.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;
}
.timeline-modal-text h3 {
  margin: 0 0 0.75rem 0;
}
.timeline-modal-text p {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.6;
}

.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;
}

/* 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;
}

.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;
}

.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;
    }
    
    .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;
    }
    
    .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;
    }
}