/* Calendar Page Specific Styles */
:root {
  --calendar-primary: #3f51b5;
  --calendar-primary-dark: #303f9f;
  --calendar-primary-light: #e8eaf6;
  --calendar-accent: #ff6d00;
  --calendar-accent-dark: #e65100;
  --calendar-accent-light: #fff3e0;
  --calendar-success: #43a047;
  --calendar-warning: #fb8c00;
  --calendar-info: #039be5;
  --calendar-primary-rgb: 63, 81, 181;
  --calendar-accent-rgb: 255, 109, 0;
}

/* Create scoped variables for calendar page - ensures styles apply correctly */
body {
  /* Apply these variables to the entire page when on calendar.html */
  --primary-color: var(--calendar-primary);
  --primary-color-dark: var(--calendar-primary-dark);
  --primary-color-light: var(--calendar-primary-light);
  --primary-color-rgb: var(--calendar-primary-rgb);
  --accent-color: var(--calendar-accent);
}

/* Hero Section Special Styling */
.calendar-hero {
  background: linear-gradient(135deg, #3f51b5 0%, #673ab7 100%) !important;
  position: relative;
  overflow: hidden;
}

.calendar-hero .overlay-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.calendar-hero .hero-content {
  padding: 3rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  color: white;
}

.calendar-hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.calendar-hero .hero-badge {
  background: var(--calendar-accent);
  color: white;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: inline-block;
  box-shadow: 0 5px 15px rgba(255, 109, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.calendar-hero .hero-tagline {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.calendar-hero .hero-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 2.5rem;
}

.calendar-hero .stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.calendar-hero .stat-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
}

.calendar-hero .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 5px;
}

.calendar-hero .stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Calendar Container */
.calendar-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 30px;
  margin-top: 2rem;
  position: relative;
}

@media (max-width: 992px) {
  .calendar-container {
    grid-template-columns: 1fr;
  }
}

.calendar {
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 25px;
  border: 1px solid #eaeaea;
  transition: all 0.3s ease;
}

.calendar:hover {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--calendar-primary-light);
}

.calendar-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--calendar-primary-dark);
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-header h3::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--calendar-accent);
  border-radius: 2px;
}

.calendar-header .navigation-buttons {
  display: flex;
  gap: 10px;
}

.calendar-header .prev-month,
.calendar-header .next-month {
  background: var(--calendar-primary-light);
  border: none;
  color: var(--calendar-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(var(--calendar-primary-rgb), 0.15);
  position: relative;
  overflow: hidden;
}

.calendar-header .prev-month::before,
.calendar-header .next-month::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--calendar-primary);
  border-radius: 50%;
  transform: scale(0);
  transition: all 0.3s ease;
  z-index: 0;
}

.calendar-header .prev-month i,
.calendar-header .next-month i {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.calendar-header .prev-month:hover::before,
.calendar-header .next-month:hover::before {
  transform: scale(1);
}

.calendar-header .prev-month:hover,
.calendar-header .next-month:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(var(--calendar-primary-rgb), 0.25);
}

.calendar-header .prev-month:hover i,
.calendar-header .next-month:hover i {
  color: white;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day,
.weekday {
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
}

.weekday {
  font-weight: 700;
  background: var(--calendar-primary-light);
  color: var(--calendar-primary);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.calendar-day {
  position: relative;
  cursor: default;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day:not(.empty) {
  cursor: pointer;
  border: 1px solid #f0f0f0;
}

.calendar-day:not(.empty):hover {
  background: #f9f9f9;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  font-weight: 600;
  color: var(--calendar-primary);
  z-index: 2;
}

.calendar-day.today {
  background: var(--calendar-primary-light);
  color: var(--calendar-primary-dark);
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(var(--calendar-primary-rgb), 0.15);
  border: 2px solid var(--calendar-primary);
}

.calendar-day.has-event {
  color: white;
  background: var(--calendar-accent);
  font-weight: 600;
  box-shadow: 0 5px 15px rgba(var(--calendar-accent-rgb), 0.25);
  border: none;
}

.calendar-day.has-event::after {
  content: '';
  position: absolute;
  right: 5px;
  top: 5px;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
}

.calendar-day.has-event:hover {
  background: var(--calendar-accent-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(var(--calendar-accent-rgb), 0.3);
  color: white;
}

.calendar-day.selected {
  outline: 3px solid var(--calendar-primary);
  outline-offset: -1px;
  z-index: 3;
}

/* Removed event list related styles as they are no longer needed */

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

.event-detail::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: rgba(var(--calendar-accent-rgb), 0.05);
  border-radius: 0 0 0 100px;
  z-index: 0;
}

.event-detail-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.event-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  background: rgba(var(--calendar-primary-rgb), 0.05);
  border-radius: 8px;
  color: #555;
}

.detail-item i {
  color: var(--calendar-accent);
  font-size: 1.1rem;
}

.event-detail-actions {
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: rgba(var(--calendar-primary-rgb), 0.1);
  color: var(--calendar-primary);
}

.btn-icon:hover {
  background: var(--calendar-primary);
  color: white;
  transform: rotate(90deg);
}

/* Notifications Section */
.notification-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 2rem;
}

.notification-form-wrapper {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #eaeaea;
}

.notification-form .form-group {
  margin-bottom: 20px;
}

.notification-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #444;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

.notification-form input[type='email'],
.notification-form input[type='text'] {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 1px solid #e0e0e0;
  border-radius: 30px;
  font-size: 0.95rem;
  color: #444;
  transition: all 0.2s ease;
}

.notification-form input[type='email']:focus,
.notification-form input[type='text']:focus {
  outline: none;
  border-color: var(--calendar-primary);
  box-shadow: 0 0 0 3px rgba(var(--calendar-primary-rgb), 0.15);
}

.notification-options,
.notification-frequency {
  margin-bottom: 20px;
}

.notification-options h4,
.notification-frequency h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #444;
}

.checkbox-group,
.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.custom-checkbox,
.custom-radio {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-checkbox input,
.custom-radio input {
  accent-color: var(--calendar-primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.custom-checkbox label,
.custom-radio label {
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
}

.form-submit {
  margin-top: 25px;
  text-align: center;
}

.form-note {
  font-size: 0.8rem;
  color: #777;
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.notification-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.notification-feature {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  border: 1px solid #f0f0f0;
}

.notification-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  background: var(--calendar-primary-light);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon i {
  color: var(--calendar-primary);
  font-size: 20px;
}

.feature-text h4 {
  margin: 0 0 5px;
  font-weight: 600;
  color: #333;
}

.feature-text p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Share Dialog */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: block;
  opacity: 1;
}

.modal-content {
  background: white;
  margin: 10% auto;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-modal {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-modal:hover {
  color: var(--calendar-primary);
}

.modal-body {
  padding: 25px;
}

.share-options h4,
.share-link h4,
.qr-code h4 {
  margin: 0 0 15px;
  font-size: 1rem;
  color: #444;
}

.social-share-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 25px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: none;
  border-radius: 5px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.facebook {
  background: #3b5998;
}

.twitter {
  background: #1da1f2;
}

.whatsapp {
  background: #25d366;
}

.email {
  background: #ea4335;
}

.copy-link-container {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

#shareLink {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 0.9rem;
  color: #666;
  flex-grow: 1;
}

.btn-secondary {
  background: var(--calendar-primary);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-secondary:hover {
  background: var(--calendar-primary-dark);
}

.qr-image {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.qr-image img {
  border: 1px solid #e0e0e0;
  padding: 10px;
  border-radius: 5px;
  max-width: 100%;
}

/* Accessibility Enhancements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Improved focus styles */
:focus {
  outline: 2px solid var(--calendar-primary);
  outline-offset: 2px;
}

.event-card:focus,
.news-filter:focus,
.calendar-tab:focus,
.share-btn:focus,
.notification-form input:focus,
.notification-form button:focus {
  outline: 2px solid var(--calendar-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(var(--calendar-primary-rgb), 0.2);
}

/* Form title styling */
.form-title {
  font-size: 1.2rem;
  margin: 0 0 1.5rem;
  color: var(--calendar-primary-dark);
  font-weight: 600;
  text-align: center;
}

/* Enhanced required field indicator */
.required {
  color: #e53935;
  margin-left: 3px;
}

/* Enhanced form elements */
.notification-form .form-group {
  margin-bottom: 1.5rem;
}

/* Enhanced animation for interactivity */
.event-card {
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.event-card:hover,
.event-card:focus {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Animation styles for scroll effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* Enhanced mobile responsiveness */
@media (max-width: 992px) {
  /* Layout adjustments */
  #news .news-header {
    flex-direction: column;
  }

  #news .news-header-content {
    max-width: 100%;
  }

  #news .news-search {
    flex-direction: column;
  }

  #news .news-stats {
    width: 100%;
    justify-content: space-around;
  }

  #school-calendar {
    padding: 1.5rem;
  }

  #school-calendar .exam-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* News grid adjustments */
  #news .news-grid {
    grid-template-columns: 1fr;
  }

  #news .news-filters {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 1rem;
  }

  #news .news-filter {
    white-space: nowrap;
  }

  /* Calendar adjustments */
  #school-calendar .calendar-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    gap: 5px;
  }

  #school-calendar .calendar-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  #school-calendar .calendar-download {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  /* Fine mobile adjustments */
  .calendar-hero h2 {
    font-size: 1.8rem;
  }

  .calendar-hero .hero-stats {
    flex-direction: column;
    gap: 15px;
  }

  .calendar-hero .stat-item {
    width: 80%;
  }

  #school-calendar .section-header.enhanced h2 {
    font-size: 1.5rem;
  }

  #school-calendar .academic-year-banner {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  #school-calendar .academic-year-text {
    font-size: 1.3rem;
  }

  #news .news-badge,
  #news .news-header h2 {
    text-align: center;
  }

  #news .news-tagline {
    text-align: center;
  }

  .notification-container {
    grid-template-columns: 1fr;
  }

  .modal-content {
    margin: 15% auto;
    width: 95%;
  }
}

/* Enhanced focus states and animations */
.calendar-day[role='gridcell']:focus,
.calendar-day[role='button']:focus {
  outline: 2px solid var(--calendar-primary);
  outline-offset: 2px;
  position: relative;
  z-index: 2;
}

.calendar-day.has-event:focus {
  background: var(--calendar-accent-dark);
}

.calendar-tab[role='tab'] {
  position: relative;
}

.calendar-tab[role='tab']::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--calendar-primary);
  transition: width 0.3s ease;
}

.calendar-tab[role='tab']:hover::after {
  width: 100%;
}

.calendar-tab[role='tab'][aria-selected='true']::after {
  width: 100%;
}

/* Enhanced animation for tab panels */
.school-calendar-section[role='tabpanel'] {
  animation: fadeIn 0.5s ease forwards;
}

/* Added focus style for event cards */
.event-card:focus-visible {
  outline: 2px solid var(--calendar-primary);
  outline-offset: 2px;
}

/* Print styles for calendar page */
@media print {
  header,
  nav,
  footer,
  .back-to-top,
  #backToTop,
  .hero-cta,
  .section-footer,
  .news-filters,
  .calendar-tabs,
  .notification-container,
  .modal,
  .copy-link-container button {
    display: none !important;
  }

  body {
    background-color: white !important;
    color: black !important;
    font-size: 12pt;
  }

  .card,
  .welcome-card,
  .static-bg-section {
    background: white !important;
    color: black !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 1cm !important;
    page-break-inside: avoid;
  }

  .calendar-hero {
    background: none !important;
    color: black !important;
    padding: 0 !important;
  }

  .calendar-hero h2 {
    font-size: 24pt !important;
    color: black !important;
  }

  .calendar-container {
    grid-template-columns: 1fr !important;
    page-break-before: always;
  }

  .event-card,
  .news-item,
  .calendar-period,
  .timeline-event,
  .exam-item {
    break-inside: avoid;
    border: 1px solid #ddd !important;
    margin-bottom: 15pt !important;
  }

  .section-header {
    border-bottom: 1pt solid #000;
    margin-bottom: 15pt;
    padding-bottom: 5pt;
  }

  a::after {
    content: ' (' attr(href) ')';
    font-size: 80%;
  }

  h2,
  h3,
  h4 {
    page-break-after: avoid;
  }

  table {
    border-collapse: collapse !important;
  }

  table td,
  table th {
    border: 1pt solid #ddd !important;
  }
}

/* Enhanced Section Header and Intro */
#school-calendar {
  background: white;
  border-radius: 15px;
  border: none;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
}

#school-calendar::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(var(--calendar-primary-rgb), 0.03);
  border-radius: 50%;
  z-index: 1;
}

#school-calendar::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 150px;
  height: 150px;
  background: rgba(var(--calendar-accent-rgb), 0.03);
  border-radius: 50%;
  z-index: 1;
}

#school-calendar .section-header.enhanced {
  position: relative;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(var(--calendar-primary-rgb), 0.1);
  z-index: 2;
}

#school-calendar .section-header.enhanced h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--calendar-primary-dark);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 15px;
}

#school-calendar .section-header.enhanced h2 i {
  color: var(--calendar-accent);
  background: rgba(var(--calendar-accent-rgb), 0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.4rem;
  box-shadow: 0 5px 15px rgba(var(--calendar-accent-rgb), 0.2);
  border: 2px solid rgba(var(--calendar-accent-rgb), 0.1);
  transition: all 0.3s ease;
}

#school-calendar .section-header.enhanced:hover h2 i {
  transform: rotate(15deg) scale(1.1);
  background: var(--calendar-accent);
  color: white;
}

#school-calendar .section-divider {
  width: 80px;
  height: 4px;
  background: var(--calendar-accent);
  margin-top: 1rem;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

#school-calendar .section-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

#school-calendar .section-intro {
  max-width: 800px;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

#school-calendar .section-intro p {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

#school-calendar .section-emphasis {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: rgba(var(--calendar-primary-rgb), 0.05);
  border-left: 4px solid var(--calendar-primary);
  border-radius: 0 8px 8px 0;
  color: #555;
  font-weight: 500;
  margin-top: 1.5rem;
}

#school-calendar .section-emphasis i {
  color: var(--calendar-accent);
  font-size: 1.2rem;
}

.view-all-events {
  margin-top: 20px;
  text-align: center;
}

#events .view-all-events .btn {
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid var(--calendar-primary);
  color: var(--calendar-primary);
}

#events .view-all-events .btn:hover {
  background: var(--calendar-primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(var(--calendar-primary-rgb), 0.25);
}

#events .view-all-events .btn i {
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

#events .view-all-events .btn:hover i {
  transform: translateX(3px);
}

/* Scoped styles for news section */
#news .section-header.enhanced {
  position: relative;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #eaeaea;
}

#news .section-header.enhanced h2 {
  font-size: 2rem;
  font-weight: 700;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 15px;
}

#news .section-header.enhanced h2 i {
  color: inherit;
  width: auto;
  height: auto;
  display: inline;
  font-size: inherit;
  box-shadow: none;
  border: none;
  background: transparent;
}

#news .section-header.enhanced:hover h2 i {
  transform: none;
  background: transparent;
  color: inherit;
}

#news .section-divider {
  width: 80px;
  height: 4px;
  background: #ddd;
  margin-top: 1rem;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

#news .section-divider::before {
  display: none;
}

#news .section-intro {
  max-width: 800px;
  margin-bottom: 2rem;
}

#news .section-intro p {
  font-size: inherit;
  color: inherit;
  line-height: inherit;
  margin-bottom: inherit;
}

/* News section specific styles */
#news {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  border: none;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

#news .news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 1rem;
  position: relative;
  overflow: hidden;
}

#news .news-header-content {
  position: relative;
  z-index: 2;
  max-width: 70%;
}

#news .news-badge {
  background: var(--calendar-accent);
  color: white;
  padding: 7px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: inline-block;
  box-shadow: 0 3px 10px rgba(var(--calendar-accent-rgb), 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

#news .news-header h2 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  color: var(--calendar-primary-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

#news .news-header h2 i {
  color: var(--calendar-accent);
}

#news .news-tagline {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

#news .news-header-decoration {
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  z-index: 1;
}

#news .circle-decoration {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(var(--calendar-primary-rgb), 0.05);
  top: -40px;
  right: -40px;
}

#news .square-decoration {
  position: absolute;
  width: 100px;
  height: 100px;
  transform: rotate(45deg);
  background: rgba(var(--calendar-accent-rgb), 0.05);
  top: 20px;
  right: 20px;
}

#news .news-search {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem 1.5rem;
  gap: 20px;
}

#news .search-container {
  position: relative;
  flex: 1;
  min-width: 300px;
}

#news .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

#news .search-input {
  width: 100%;
  padding: 12px 50px 12px 40px;
  border: 1px solid #e0e0e0;
  border-radius: 30px;
  font-size: 0.95rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

#news .search-input:focus {
  outline: none;
  border-color: var(--calendar-primary);
  box-shadow: 0 5px 15px rgba(var(--calendar-primary-rgb), 0.15);
}

#news .search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--calendar-primary);
  color: white;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

#news .search-btn:hover {
  background: var(--calendar-accent);
  transform: translateY(-50%) scale(1.1);
}

#news .news-stats {
  display: flex;
  gap: 20px;
}

#news .news-stat-item {
  text-align: center;
  background: rgba(var(--calendar-primary-rgb), 0.05);
  padding: 10px 15px;
  border-radius: 8px;
}

#news .news-stat-item .stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--calendar-primary-dark);
}

#news .news-stat-item .stat-label {
  font-size: 0.8rem;
  color: #666;
}

/* News filters */
#news .news-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 2rem 1.5rem;
}

#news .news-filter {
  background: none;
  border: 2px solid #e0e0e0;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

#news .news-filter:hover {
  border-color: #3f51b5;
  color: #3f51b5;
}

#news .news-filter.active {
  background: #3f51b5;
  color: white;
  border-color: #3f51b5;
}

/* Enhanced Academic Year Banner */
#school-calendar .academic-year-banner {
  background: linear-gradient(
    135deg,
    var(--calendar-primary) 0%,
    var(--calendar-primary-dark) 100%
  );
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 10px 25px rgba(var(--calendar-primary-rgb), 0.25);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

#school-calendar .academic-year-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

#school-calendar .academic-year-icon {
  background: rgba(255, 255, 255, 0.2);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#school-calendar .academic-year-icon i {
  color: white;
  font-size: 24px;
}

#school-calendar .academic-year-text {
  color: white;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Enhanced Calendar Tabs */
#school-calendar .calendar-tabs {
  display: flex;
  margin-bottom: 2rem;
  gap: 10px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

#school-calendar .calendar-tab {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

#school-calendar .calendar-tab i {
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

#school-calendar .calendar-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: all 0.3s ease;
}

#school-calendar .calendar-tab:hover {
  color: var(--calendar-primary);
  background: rgba(var(--calendar-primary-rgb), 0.05);
}

#school-calendar .calendar-tab:hover i {
  transform: translateY(-3px);
}

#school-calendar .calendar-tab.active {
  color: var(--calendar-primary);
  background: rgba(var(--calendar-primary-rgb), 0.05);
  font-weight: 700;
}

#school-calendar .calendar-tab.active::after {
  background: var(--calendar-accent);
}

#school-calendar .calendar-tab:focus-visible {
  outline: 2px solid var(--calendar-primary);
  outline-offset: 2px;
}

/* Enhanced Calendar Content */
#school-calendar .calendar-content {
  position: relative;
  z-index: 2;
  margin-bottom: 2rem;
}

#school-calendar .school-calendar-section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  display: none;
  animation: fadeIn 0.5s ease forwards;
  border: 1px solid #f0f0f0;
}

#school-calendar .school-calendar-section.active {
  display: block;
}

#school-calendar .calendar-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 15px;
}

#school-calendar .calendar-header i {
  color: var(--calendar-accent);
  font-size: 1.4rem;
}

#school-calendar .calendar-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--calendar-primary-dark);
}

/* Enhanced Calendar List */
#school-calendar .calendar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#school-calendar .calendar-period {
  display: flex;
  gap: 20px;
  background: #f9f9f9;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#school-calendar .calendar-period:hover {
  background: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

#school-calendar .calendar-period::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--calendar-primary);
  opacity: 0;
  transition: all 0.3s ease;
}

#school-calendar .calendar-period:hover::before {
  opacity: 1;
}

#school-calendar .period-icon {
  width: 50px;
  height: 50px;
  background: rgba(var(--calendar-primary-rgb), 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

#school-calendar .calendar-period:hover .period-icon {
  background: var(--calendar-primary);
}

#school-calendar .period-icon i {
  color: var(--calendar-primary);
  font-size: 20px;
  transition: all 0.3s ease;
}

#school-calendar .calendar-period:hover .period-icon i {
  color: white;
}

#school-calendar .period-details {
  flex: 1;
}

#school-calendar .period-details h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  transition: all 0.3s ease;
}

#school-calendar .calendar-period:hover .period-details h4 {
  color: var(--calendar-primary);
}

#school-calendar .period-details .date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  margin-bottom: 5px;
  font-size: 0.95rem;
}

#school-calendar .period-details .date i {
  color: var(--calendar-accent);
}

#school-calendar .period-duration {
  display: inline-block;
  background: rgba(var(--calendar-accent-rgb), 0.1);
  color: var(--calendar-accent);
  padding: 3px 10px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Enhanced Event Timeline */
#school-calendar .event-timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 0 15px;
  position: relative;
}

#school-calendar .event-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background: rgba(var(--calendar-primary-rgb), 0.2);
  transform: translateX(-50%);
}

#school-calendar .timeline-event {
  position: relative;
  padding-left: 50px;
  margin-bottom: 30px;
}

#school-calendar .timeline-event::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 30px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--calendar-primary);
  border: 3px solid white;
  box-shadow: 0 0 0 3px rgba(var(--calendar-primary-rgb), 0.2);
  z-index: 1;
}

#school-calendar .event-date {
  position: absolute;
  left: 0;
  top: 15px;
  width: 40px;
  text-align: center;
  transform: translateX(-50%);
  background: var(--calendar-primary);
  color: white;
  padding: 8px 0;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(var(--calendar-primary-rgb), 0.3);
  transition: all 0.3s ease;
}

#school-calendar .timeline-event:hover .event-date {
  background: var(--calendar-accent);
  transform: translateX(-50%) translateY(-5px);
}

#school-calendar .event-month {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
}

#school-calendar .event-day {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  margin: 3px 0;
}

#school-calendar .event-year {
  display: block;
  font-size: 0.7rem;
}

#school-calendar .event-content {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
}

#school-calendar .timeline-event:hover .event-content {
  background: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#school-calendar .event-content h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}

#school-calendar .timeline-event:hover .event-content h4 {
  color: var(--calendar-primary);
}

#school-calendar .event-content h4 i {
  color: var(--calendar-accent);
}

#school-calendar .event-content p {
  margin: 0 0 10px;
  color: #666;
}

#school-calendar .event-time {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #777;
  background: rgba(var(--calendar-primary-rgb), 0.05);
  padding: 3px 10px;
  border-radius: 30px;
}

/* Enhanced Exams List */
#school-calendar .exam-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

#school-calendar .exam-item {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border: 1px solid rgba(var(--calendar-primary-rgb), 0.1);
}

#school-calendar .exam-item:hover {
  background: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

#school-calendar .exam-period {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #eaeaea;
}

#school-calendar .exam-term {
  font-weight: 600;
  color: var(--calendar-primary-dark);
  font-size: 1.1rem;
}

#school-calendar .exam-dates {
  color: #666;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

#school-calendar .exam-dates i {
  color: var(--calendar-accent);
}

#school-calendar .exam-details p {
  color: #666;
  margin: 0 0 10px;
}

#school-calendar .exam-class {
  display: inline-block;
  background: rgba(var(--calendar-primary-rgb), 0.05);
  color: var(--calendar-primary);
  padding: 3px 10px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
}

#school-calendar .special-exam {
  border-color: var(--calendar-accent);
  position: relative;
}

#school-calendar .special-exam::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 30px 30px 0;
  border-style: solid;
  border-color: var(--calendar-accent) white;
}

/* Enhanced Calendar Actions */
#school-calendar .calendar-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 2;
}

#school-calendar .calendar-download {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

#school-calendar .calendar-download .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

#school-calendar .calendar-download .btn-primary {
  background: var(--calendar-primary);
  color: white;
  border: none;
}

#school-calendar .calendar-download .btn-primary:hover {
  background: var(--calendar-primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(var(--calendar-primary-rgb), 0.25);
}

#school-calendar .calendar-download .btn-outline {
  background: none;
  color: var(--calendar-primary);
  border: 2px solid var(--calendar-primary);
}

#school-calendar .calendar-download .btn-outline:hover {
  background: var(--calendar-primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(var(--calendar-primary-rgb), 0.15);
}

#school-calendar .calendar-note {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: rgba(var(--calendar-info-rgb, 3, 155, 229), 0.05);
  border-radius: 12px;
  padding: 15px 20px;
}

#school-calendar .calendar-note i {
  color: var(--calendar-info, #039be5);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 3px;
}

#school-calendar .calendar-note p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Enhanced back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--calendar-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(var(--calendar-primary-rgb), 0.3);
  border: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--calendar-accent);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(var(--calendar-accent-rgb), 0.3);
}

.back-to-top:focus {
  outline: 3px solid rgba(var(--calendar-primary-rgb), 0.5);
  outline-offset: 3px;
}
