/* Program Page Specific Styles */

/* Base Layout */
body {
  font-family: 'Mukti', 'Mukta', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f9f7f2 0%, #fdf5e6 50%, #fff8dc 100%);
  background-attachment: fixed;
  line-height: 1.6;
}

/* Main Container */
.program-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.program-container.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Header Section */
.program-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(75, 0, 130, 0.1);
}

.program-title {
  color: #4B0082;
  margin: 0 0 20px 0;
  font-size: 2.2rem;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(75, 0, 130, 0.1);
}

.program-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Navigation Buttons */
.back-button,
.filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.back-button {
  background: linear-gradient(135deg, #c28800, #a06f00);
  color: white;
  box-shadow: 0 4px 15px rgba(194, 136, 0, 0.3);
}

.back-button:hover {
  background: linear-gradient(135deg, #a06f00, #8b5a00);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(194, 136, 0, 0.4);
}

.filter-button {
  background: linear-gradient(135deg, #4B0082, #6A1B9A);
  color: white;
  box-shadow: 0 4px 15px rgba(75, 0, 130, 0.3);
}

.filter-button:hover {
  background: linear-gradient(135deg, #6A1B9A, #7B1FA2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(75, 0, 130, 0.4);
}

.filter-button.active {
  background: linear-gradient(135deg, #7B1FA2, #8E24AA);
}

/* Filter Section */
.filter-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: none;
  animation: slideDown 0.3s ease;
}

.filter-section.show {
  display: block;
}

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

.filter-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-weight: 600;
  color: #4B0082;
  font-size: 14px;
}

.filter-input {
  padding: 12px 16px;
  border: 2px solid #E1BEE7;
  border-radius: 8px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

.filter-input:focus {
  outline: none;
  border-color: #4B0082;
  box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.1);
}

.filter-actions {
  display: flex;
  gap: 10px;
  grid-column: 1 / -1;
  justify-content: center;
}

.clear-button,
.today-button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-button {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
}

.clear-button:hover {
  background: linear-gradient(135deg, #d32f2f, #c62828);
  transform: translateY(-1px);
}

.today-button {
  background: linear-gradient(135deg, #4CAF50, #388E3C);
  color: white;
}

.today-button:hover {
  background: linear-gradient(135deg, #388E3C, #2E7D32);
  transform: translateY(-1px);
}

/* Main Content */
.program-content {
  margin-bottom: 80px;
}

/* Day Blocks */
.day-block {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  margin-bottom: 25px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.day-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.day-block:nth-child(odd) {
  animation-delay: 0.1s;
}

.day-block:nth-child(even) {
  animation-delay: 0.2s;
}

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

/* Date Header */
.date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: linear-gradient(135deg, #4B0082, #6A1B9A);
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.date-header:hover {
  background: linear-gradient(135deg, #6A1B9A, #7B1FA2);
}

.date-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.date-text {
  font-weight: 600;
  font-size: 1.1rem;
}

.today-badge {
  background: linear-gradient(135deg, #d9480f, #bf360c);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  animation: pulse 2s infinite;
}

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

.program-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
}

.expand-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.expand-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.toggle-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.expand-toggle.expanded .toggle-icon {
  transform: rotate(180deg);
}

/* Programs Content */
.programs-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.programs-content.expanded {
  max-height: 1000px;
  padding: 25px;
}

.programs-list-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.program-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

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

.program-item:hover {
  background: rgba(75, 0, 130, 0.05);
  padding-left: 10px;
  border-radius: 8px;
}

.program-image-container {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-image-container:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.program-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
}

.program-bullet {
  color: #4B0082;
  font-weight: bold;
  font-size: 1.2em;
  margin-top: 2px;
}

.program-text {
  flex: 1;
  color: #333;
  line-height: 1.6;
  font-size: 15px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-title {
  color: #4B0082;
  font-size: 1.5rem;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.empty-description {
  color: #666;
  margin: 0 0 30px 0;
  font-size: 1.1rem;
}

.empty-action {
  display: inline-block;
  background: linear-gradient(135deg, #4B0082, #6A1B9A);
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.empty-action:hover {
  background: linear-gradient(135deg, #6A1B9A, #7B1FA2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(75, 0, 130, 0.3);
}

/* Flash Messages */
.flash-messages {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
}

.flash-message {
  background: linear-gradient(135deg, #4CAF50, #388E3C);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideInRight 0.3s ease;
}

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

.flash-text {
  flex: 1;
  font-weight: 500;
}

.flash-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  margin-left: 15px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.flash-close:hover {
  opacity: 1;
}

/* Floating Action Buttons */
.floating-actions {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 999;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0);
}

.fab.show {
  opacity: 1;
  transform: scale(1);
}

.scroll-top {
  background: linear-gradient(135deg, #4B0082, #6A1B9A);
  color: white;
}

.scroll-top:hover {
  background: linear-gradient(135deg, #6A1B9A, #7B1FA2);
  transform: scale(1.1);
}

.add-program {
  background: linear-gradient(135deg, #4CAF50, #388E3C);
  color: white;
}

.add-program:hover {
  background: linear-gradient(135deg, #388E3C, #2E7D32);
  transform: scale(1.1);
}

/* Loading Spinner */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-spinner.show {
  opacity: 1;
  visibility: visible;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #E1BEE7;
  border-top: 5px solid #4B0082;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

.loading-spinner p {
  color: #4B0082;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Load More Button */
.load-more-section {
  text-align: center;
  margin-top: 40px;
}

.load-more-button {
  background: linear-gradient(135deg, #4B0082, #6A1B9A);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(75, 0, 130, 0.3);
}

.load-more-button:hover {
  background: linear-gradient(135deg, #6A1B9A, #7B1FA2);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(75, 0, 130, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .program-container {
    padding: 15px;
  }
  
  .program-title {
    font-size: 1.8rem;
  }
  
  .program-nav {
    flex-direction: column;
    align-items: center;
  }
  
  .filter-controls {
    grid-template-columns: 1fr;
  }
  
  .filter-actions {
    flex-direction: column;
  }
  
  .date-header {
    padding: 15px 20px;
  }
  
  .programs-content.expanded {
    padding: 20px;
  }
  
  .floating-actions {
    bottom: 20px;
    right: 20px;
  }
  
  .fab {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .flash-messages {
    left: 15px;
    right: 15px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .program-header {
    padding: 20px;
  }
  
  .program-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  .back-button,
  .filter-button {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .date-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .floating-actions {
    bottom: 15px;
    right: 15px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .day-block {
    border: 2px solid #000;
  }
  
  .program-item {
    border-bottom-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .program-container,
  .day-block,
  .fab,
  .flash-message {
    animation: none;
    transition: none;
  }
  
  .today-badge {
    animation: none;
  }
  
  .spinner {
    animation: none;
  }
}
