:root {
  --primary-color: #1a73e8;
  --primary-dark: #0d47a1;
  --primary-light: #5e92f3;
  --secondary-color: #34c759;
  --accent-color: #ff3b30;
  --neutral-dark: #222831;
  --neutral-light: #f5f5f7;
  --neutral-medium: #6c757d;
  --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  --text-primary: #212121;
  --text-secondary: #616161;
  --danger-color: #f44336;
  --warning-color: #ff9800;
  --info-color: #2196f3;
  --success-color: #4caf50;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f5f5f7;
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Animation keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Navbar Styles */
.navbar {
  background: var(--primary-color);
  background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* Site Header */
.site-header {
  background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 3.5rem 0 5rem;
  margin-bottom: 4.5rem;
  border-radius: 0 0 30px 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  z-index: 0;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -5%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  z-index: 0;
}

.site-header .container {
  position: relative;
  z-index: 1;
}

.page-title {
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.8s ease-out forwards;
}

.site-header .lead {
  font-weight: 400;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  animation: fadeInUp 0.8s 0.2s ease-out forwards;
  opacity: 0;
}

/* Year selector */
.year-selector-container {
  animation: fadeInUp 0.8s 0.4s ease-out forwards;
  opacity: 0;
}

.year-selector {
  max-width: 200px;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 50px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.year-selector .input-group-text {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: transparent;
  color: white;
  padding: 0.6rem 1rem;
}

.year-selector .form-select {
  border: none;
  background-color: transparent;
  color: white;
  cursor: pointer;
  font-weight: 600;
  padding: 0.6rem 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-position: calc(100% - 12px) center;
}

.year-selector .form-select option {
  color: var(--text-primary);
  background-color: white;
}

/* View toggle */
.view-toggle {
  margin-top: 1.8rem;
  animation: fadeInUp 0.8s 0.6s ease-out forwards;
  opacity: 0;
}

.view-toggle .btn {
  padding: 0.6rem 1.8rem;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-color: transparent;
  color: white;
  min-width: 140px;
}

.view-toggle .btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.view-toggle .btn.active {
  background-color: white;
  border-color: white;
  color: var(--primary-color);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  font-weight: 600;
}

/* Month Cards */
.month-card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  margin-bottom: 2.5rem;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
  animation-delay: calc(var(--card-index, 0) * 0.1s);
}

.month-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.month-card .card-header {
  background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
  border-bottom: none;
  padding: 1.2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.month-card .card-header h2 {
  position: relative;
  z-index: 1;
}

.month-card .card-header::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.month-card .card-body {
  padding: 1.5rem;
}

/* Holiday Cards */
.holiday-card {
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 1.8rem;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
  background-color: #ffffff;
  height: calc(100% - 1.8rem);
}

.holiday-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.holiday-card .card-header {
  padding: 1rem 1.25rem;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

.holiday-card .card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 55%);
  background-size: 200% 200%;
  animation: shimmer 2.5s infinite;
}

.holiday-card.past-holiday {
  opacity: 0.75;
  transform: scale(0.98);
}

.holiday-card.past-holiday:hover {
  transform: translateY(-5px) scale(1);
}

.holiday-card .card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.holiday-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.holiday-date {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  margin-bottom: 0.8rem;
  background-color: rgba(0, 0, 0, 0.04);
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Calendar Styles */
.calendar-table {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 3px;
  margin: 0 auto;
  width: 100%;
}

.calendar-table th {
  background-color: rgba(0, 0, 0, 0.03);
  text-align: center;
  padding: 0.5rem 0;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: 8px;
}

.calendar-table td {
  height: 36px;
  text-align: center;
  vertical-align: middle;
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: none;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.calendar-table td.has-holiday {
  cursor: pointer;
  font-weight: bold;
  transform: scale(1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

.calendar-table td.has-holiday:hover {
  transform: scale(1.2);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.calendar-table td.today {
  border: 2px solid var(--primary-color);
  font-weight: bold;
  color: var(--primary-color);
  background-color: rgba(26, 115, 232, 0.05);
}

/* Month's holiday list */
.month-holiday-list {
  margin-top: 1.5rem;
}

.month-holiday-list h6 {
  font-weight: 600;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
}

.month-holiday-list .list-group-item {
  border-radius: 8px;
  margin-bottom: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background-color: rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

.month-holiday-list .list-group-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
  transform: translateX(5px);
}

.month-holiday-list .list-group-item strong {
  color: var(--primary-color);
  margin-right: 0.3rem;
}

/* Calendar Legend */
.holiday-legend {
  border-radius: 16px;
  border: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  animation: fadeInUp 0.8s ease-out forwards;
}

.holiday-legend .card-body {
  padding: 1.5rem;
}

.holiday-legend h4 {
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.legend-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 50px;
  transition: all 0.3s ease;
}

.legend-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.legend-color {
  width: 16px;
  height: 16px;
  display: inline-block;
  margin-right: 0.7rem;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Region badges */
.region-badges {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.region-badge {
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.75rem;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.region-badge:hover {
  background-color: var(--primary-light);
  color: white;
  transform: translateY(-2px);
}

/* Category badges */
.badge-public {
  background-color: var(--danger-color);
  color: white;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 50px;
}

.badge-regional {
  background-color: var(--warning-color);
  color: white;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 50px;
}

.badge-observance {
  background-color: var(--info-color);
  color: white;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 50px;
}

.badge-other {
  background-color: var(--neutral-medium);
  color: white;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 50px;
}

/* Footer */
.site-footer {
  background: linear-gradient(145deg, var(--neutral-dark), #000000);
  color: white;
  padding: 3rem 0;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

.site-footer h5 {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.site-footer p {
  opacity: 0.8;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  animation: pulse 2s infinite;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
}

/* Animation for shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Responsive styles */
@media (max-width: 991.98px) {
  .site-header {
    padding: 2.5rem 0 4rem;
    margin-bottom: 3.5rem;
  }
  
  .holiday-card {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .site-header {
    padding: 2rem 0 3.5rem;
    margin-bottom: 3rem;
    border-radius: 0 0 20px 20px;
  }
  
  .page-title {
    font-size: 2.2rem;
  }
  
  .holiday-card:hover {
    transform: translateY(-5px) scale(1.01);
  }
  
  .month-card {
    margin-bottom: 2rem;
  }
  
  .legend-container {
    gap: 0.5rem;
  }
  
  .legend-item {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 575.98px) {
  .site-header {
    padding: 1.5rem 0 3rem;
    margin-bottom: 2.5rem;
  }
  
  .page-title {
    font-size: 1.8rem;
  }
  
  .view-toggle .btn {
    padding: 0.5rem 1.2rem;
    min-width: 120px;
    font-size: 0.9rem;
  }
  
  .holiday-card .card-header {
    padding: 0.8rem 1rem;
  }
  
  .holiday-card .card-body {
    padding: 1rem;
  }
  
  .calendar-table th {
    font-size: 0.75rem;
  }
  
  .calendar-table td {
    height: 32px;
    font-size: 0.85rem;
  }
}
