/* Index CSS for Greater Craigmillar Community Calendar */
:root {
  --primary: #4a6fa5;
  --secondary: #166088;
  --accent: #ffc107;
  --light: #f9fafb;
  --dark: #1e293b;
}

body {
  background: var(--light);
  color: var(--dark);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary);
}

.main-container {
  width: 80%;
  margin: 2rem auto;
}

/* HERO / LOGO AREA */
.text-center.mb-5 {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
  padding: 3rem 2rem;
  margin: 2rem auto 3rem;
  max-width: 1000px;
  text-align: center;
}

.logo-link img {
  display: block;
  margin: 0 auto 1rem;
  max-width: 280px;
  height: auto;
}

.text-center .lead {
  max-width: 850px;
  margin: 0.75rem auto 2rem auto;
  color: #444;
  line-height: 1.8;
  font-size: 1.15rem;
}

/* CTA BUTTON */
.btn.btn-primary.btn-lg.mt-3 {
  background: var(--primary);
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  box-shadow: 0 6px 15px rgba(74, 111, 165, 0.3);
  transition: all 0.25s ease;
}

.btn.btn-primary.btn-lg.mt-3:hover {
  background: #395f91;
  transform: translateY(-2px);
}

/* UPCOMING EVENTS */
.full-width-slider-container {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  width: 100%;
}

.slider-header {
  border-bottom: 2px solid #f1f3f5;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.slider-header h2 {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.6rem;
}

.slide-item {
  background: #f9fafb;
  border-radius: 14px;
  border: 1px solid #e9ecef;
  overflow: hidden;
  transition: all 0.3s ease;
}

.slide-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.slide-image {
  height: 100%;
  overflow: hidden;
}

.slide-image img {
  width: 100%;
  height: 100%;
}

.slide-content {
  padding: 1.25rem;
}

.slide-title {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.slide-date {
  color: var(--secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.slide-desc {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.4;
}

.categories-sidebar {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  padding: 2rem 1.5rem;
}

.categories-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
}

.category-item:last-child {
  border-bottom: none;
}

.category-link {
  color: var(--dark);
  font-weight: 500;
}

.category-link:hover {
  color: var(--primary);
}

.category-count {
  background: var(--primary);
  color: #fff;
  padding: 0.35rem 0.55rem;
  border-radius: 50%;
  font-size: 0.8rem;
}

.subscribe-section {
  margin-top: 1.75rem;
  border-top: 2px solid #f1f3f5;
  padding-top: 1.25rem;
}

.subscribe-section p {
  color: #555;
}

.subscribe-section input {
  border-radius: 8px 0 0 8px !important;
}

.subscribe-section button {
  border-radius: 0 8px 8px 0 !important;
  background: var(--primary);
  border: none;
}

.subscribe-section button:hover {
  background: #395f91;
}

.event-card {
  border-radius: 16px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  background: #ffffff;
  cursor: pointer;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.event-image-wrapper {
  position: relative;
  overflow: hidden;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.event-img {
  width: 60%;
  object-fit: cover;
  transition:
    transform 0.5s ease,
    filter 0.3s ease;
}

.event-card:hover .event-img {
  transform: scale(1.07);
  filter: brightness(0.9);
}

.event-date-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  text-align: center;
  padding: 0.4rem 0.6rem;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.event-date-badge .day {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
}

.event-date-badge .month {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}

.event-card .card-title {
  font-size: 1.05rem;
  line-height: 1.3;
}

.event-card .card-text {
  line-height: 1.5;
}

.badge {
  transition: all 0.2s ease;
}

.badge:hover {
  background-color: rgba(45, 93, 159, 0.2) !important;
  transform: translateY(-2px);
}

.btn-primary {
  transition: all 0.2s ease;
  background: #2d5d9f;
  border-color: #2d5d9f;
}

.btn-primary:hover {
  background: #244a80;
  border-color: #244a80;
  transform: translateY(-2px);
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
  .text-center.mb-5 {
    margin: 1rem auto 2rem;
    padding: 2rem;
  }

  .logo-link img {
    max-width: 70%;
  }

  .categories-sidebar {
    margin-top: 1.5rem;
  }
}

@media (max-width: 768px) {
  .slide-item {
    flex: 0 0 calc(100% - 1rem);
  }

  .full-width-slider-container {
    padding: 1.5rem;
  }
}

/* === MOBILE OPTIMIZATION === */
@media (max-width: 768px) {
  .main-container {
    width: 95% !important;
    margin: 1rem auto;
    padding: 0 0.5rem;
  }

  .text-center.mb-5 {
    padding: 1.5rem 1rem;
    margin: 1rem auto 2rem;
  }

  .logo-link img {
    max-width: 35% !important;
  }

  .lead {
    font-size: 1rem !important;
    line-height: 1.6;
  }

  /* Improve card layout for mobile */
  .event-card {
    margin-bottom: 1rem;
  }

  .event-card .card-body {
    padding: 1rem;
  }

  /* Better button sizing */
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  /* Improve feature lists */
  .d-flex.align-items-center.gap-2 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  /* Calendar controls */
  .calendar-tools .btn-group {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .calendar-tools .btn {
    padding: 0.5rem;
  }

  /* Modal improvements */
  .modal-body {
    padding: 1rem;
  }

  .modal-header h5 {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 576px) {
  /* Single column layout for smallest screens */
  .row-cols-sm-2 {
    grid-template-columns: 1fr !important;
  }

  .text-center.mb-5 {
    padding: 1rem 0.5rem;
  }

  .logo-link img {
    max-width: 95% !important;
  }

  /* Feature icons sizing */
  .d-flex.align-items-center.gap-2 .fs-4 {
    font-size: 1.25rem !important;
  }

  /* Improve touch targets */
  .btn,
  .card[role="button"] {
    min-height: 44px;
  }

  .category-item {
    padding: 1rem 0;
  }
}

/* Additional mobile-specific improvements */
@media (max-width: 768px) {
  /* Reduce vertical spacing */
  .mb-5 {
    margin-bottom: 2rem !important;
  }

  .my-5 {
    margin: 2rem 0 !important;
  }

  /* Improve text hierarchy */
  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  /* Better event cards */
  .event-date-badge .day {
    font-size: 1rem;
  }

  .event-date-badge .month {
    font-size: 0.7rem;
  }
}

/* Add this if you want some custom enhancements */
#eventModal .modal-content {
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

#eventModal .btn-rounded {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#eventModal .media-card {
  transition: transform 0.2s ease;
}

#eventModal .media-card:hover {
  transform: translateY(-2px);
}
/* End of Index CSS */
@media (max-width: 768px) {
  #mPoster {
    margin-left: 0 !important;
    width: 100% !important;
  }
}
/* ACTIVITY MODAL POSTER - UNIVERSAL FIX */
#activityDetailModal .border.rounded-3.bg-light.overflow-hidden {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 900px !important;
  max-height: 70vh !important;
  padding: 15px !important;
  background: #f8f9fa !important;
}

#activityDetailModal #modalPosterImage {
  max-width: 900px !important;
  max-height: 900px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Remove the inline style conflict */
#activityDetailModal #modalPosterImage[style*="max-height"] {
  max-height: 400px !important;
}
/* Make activity modal wider */
#activityDetailModal .modal-dialog {
  max-width: 700px !important; /* Default is 500px, now 800px */
  width: 90% !important; /* Responsive on mobile */
}

/* Optional - make event modal wider too */
#eventModal .modal-dialog {
  max-width: 700px !important;
  width: 90% !important;
}
/* Fix poster spacing in activity detail modal */
#activityDetailModal .modal-body {
  display: flex;
  flex-direction: column;
}

#ad_poster_container {
  margin-bottom: 1.5rem !important;
  width: 100%;
}

#ad_poster {
  max-height: 300px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

#ad_description {
  clear: both !important;
  margin-top: 1rem !important;
  padding-top: 0.5rem !important;
}
