.slider-section { margin: 0; border-radius: 0; overflow: hidden; }
.slider-container { position: relative; width: 100%; height: 500px; background: var(--dark-slate); }
.slide { position: absolute; width:100%; height:100%; opacity: 0; display: block; transition: opacity 0.8s ease; }
.slide.active { opacity: 1; z-index: 5; }

.slide-img-side { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; z-index: 1; transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94); transform: scale(1); }
.slide.active .slide-img-side { transform: scale(1.05); }

.slide-text-side { position: absolute; top: 0; left: 0; height: 100%; width: 100%; background: linear-gradient(to right, rgba(15,15,15,0.9) 0%, rgba(15,15,15,0.6) 45%, transparent 100%); z-index: 2; display: flex; align-items: center; justify-content: flex-start; padding: 0 8%; }

.slide-content { max-width: 500px; transform: translateX(-40px); opacity: 0; transition: all 1s ease 0.4s; }
.slide.active .slide-content { transform: translateX(0); opacity: 1; }
.slide-content h2 { font-size: 3.5rem; color: var(--white); margin-bottom: 20px; font-weight: 800; line-height: 1.1; text-align: left; letter-spacing: -1px; }
.slide-content p { font-size: 1.2rem; color: #F0F0F0; font-weight: 500; text-align: left; border-left: 4px solid var(--accent-gold); padding-left: 20px; line-height: 1.6; }

.slider-arrows { position: absolute; bottom: 30px; right: 30px; display: flex; gap: 15px; z-index: 10; }
.slider-arrows button { background: rgba(255,255,255,0.15); border: 1px solid rgba(212, 175, 55, 0.5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); width: 50px; height: 50px; border-radius: 50%; color: var(--white); cursor: pointer; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.slider-arrows button:hover { background: var(--primary-maroon); color: var(--accent-gold); transform: scale(1.1); border-color: var(--accent-gold); box-shadow: 0 10px 20px rgba(122, 28, 28, 0.4); }

.headteacher-about { display: flex; flex-wrap: wrap; gap: 3rem; background: var(--bg-cream); padding: 5rem 2.5rem; margin: 0; align-items: center; position: relative; overflow: hidden; border-bottom: 1px solid rgba(0,0,0,0.05); }
.headteacher-about::before { content: ''; position: absolute; top: 0; left: 0; width: 6px; height: 100%; background: linear-gradient(180deg, var(--primary-maroon) 0%, var(--accent-gold) 100%); }

.headteacher-card { flex: 1 1 300px; display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--white); border-radius: 20px; padding: 2.5rem 1.5rem; border: 1px solid rgba(212, 175, 55, 0.2); box-shadow: 0 15px 35px rgba(0,0,0,0.03); transition: transform 0.4s ease; }
.headteacher-card:hover { transform: translateY(-8px); }
.headteacher-img { width: 130px; height: 130px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 4rem; color: var(--primary-maroon); background: var(--white); border: 4px solid var(--accent-gold); box-shadow: 0 12px 25px rgba(212, 175, 55, 0.3); margin-bottom: 20px; }
.headteacher-name { font-weight: 800; font-size: 1.5rem; color: var(--primary-maroon); }
.headteacher-title { color: var(--accent-gold); font-weight: 700; font-size: 0.95rem; text-transform: uppercase; margin-bottom: 12px; letter-spacing: 0.5px; }
.headteacher-quote { font-style: italic; font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

.about-school { flex: 2 1 450px; }
.about-school h3 { font-size: 2rem; color: var(--dark-slate); margin-bottom: 20px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.about-school h3 i { color: var(--primary-maroon); }
.cms-rich-content p { margin-bottom: 15px; color: #4A4A4A; font-size: 1.05rem; line-height: 1.7; }

.badge-row { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 25px; }
.badge-row span { background: rgba(122, 28, 28, 0.05); color: var(--primary-maroon); padding: 10px 20px; border-radius: 12px; font-weight: 700; font-size: 0.9rem; border: 1px solid rgba(122, 28, 28, 0.1); display: flex; align-items: center; gap: 8px; transition: all 0.3s ease; }
.badge-row span:hover { background: var(--primary-maroon); color: var(--white); transform: translateY(-3px); box-shadow: 0 8px 15px rgba(122, 28, 28, 0.2); }

.events-row { display: flex; flex-wrap: wrap; gap: 2.5rem; margin: 0; padding: 5rem 2.5rem; background: var(--bg-cream); border-radius: 0; }
.incoming-events, .past-events { flex: 1 1 400px; background: var(--white); border-radius: 20px; padding: 3rem; box-shadow: 0 15px 35px rgba(0,0,0,0.04); }
.incoming-events h3 { color: var(--primary-maroon); margin-bottom: 1.8rem; font-size: 1.5rem; border-bottom: 2px solid rgba(212, 175, 55, 0.3); padding-bottom: 12px; font-weight: 800; }
.past-events h3 { color: var(--dark-slate); margin-bottom: 1.8rem; font-size: 1.5rem; border-bottom: 2px solid #EEE; padding-bottom: 12px; font-weight: 800; }

.event-item { display: flex; gap: 18px; background: var(--bg-cream); padding: 18px; border-radius: 14px; margin-bottom: 18px; align-items: center; border-left: 4px solid transparent; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: pointer; }
.event-item:hover { transform: translateX(8px) translateY(-3px); border-left-color: var(--accent-gold); box-shadow: 0 10px 25px rgba(0,0,0,0.06); background: #FFF; }
.event-date { background: linear-gradient(135deg, var(--primary-maroon) 0%, #9C2A2A 100%); color: var(--accent-gold); font-weight: 800; padding: 12px; border-radius: 12px; text-align: center; min-width: 65px; line-height: 1.2; box-shadow: 0 5px 15px rgba(122, 28, 28, 0.2); }
.event-date-archived { background: linear-gradient(135deg, #888 0%, #666 100%); color: var(--white); font-weight: 800; padding: 12px; border-radius: 12px; text-align: center; min-width: 65px; line-height: 1.2; }
.event-desc strong { display: block; font-size: 1.1rem; color: var(--dark-slate); margin-bottom: 4px; font-weight: 700; }
.event-desc small { color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 6px; font-weight: 500; }
.record-item { background: #F8F8F8; opacity: 0.9; }

.news-ticker-wrap { display: flex; align-items: center; background: var(--white); margin: 0; width: 100%; max-width: 100%; border-bottom: 1px solid rgba(212, 175, 55, 0.2); overflow: hidden; position: relative; z-index: 20; }
.ticker-heading { background: linear-gradient(135deg, var(--primary-maroon) 0%, #9C2A2A 100%); color: var(--accent-gold); font-weight: 800; padding: 14px 24px; font-size: 0.85rem; text-transform: uppercase; white-space: nowrap; z-index: 2; box-shadow: 5px 0 15px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 8px; letter-spacing: 0.5px; }
.ticker-content { flex: 1; overflow: hidden; position: relative; padding: 14px 0; background: var(--white); }
.ticker-text { display: inline-block; white-space: nowrap; animation: tickerScroll 30s linear infinite; font-weight: 600; color: var(--dark-slate); font-size: 0.95rem; }
.ticker-text:hover { animation-play-state: paused; }
.ticker-text span strong { color: var(--primary-maroon); font-weight: 800; }
.ticker-dot { color: var(--accent-gold); margin: 0 40px; font-size: 1.2rem; }

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.gallery-section { margin: 0; background: var(--white); padding: 5rem 2.5rem; }
.gallery-header { text-align: center; margin-bottom: 2.5rem; }
.gallery-header h3 { color: var(--primary-maroon); font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.gallery-header p { color: var(--text-muted); font-size: 1.1rem; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery-item { position: relative; border-radius: 16px; overflow: hidden; height: 250px; box-shadow: 0 10px 20px rgba(0,0,0,0.08); cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.gallery-item:hover img { transform: scale(1.1); }

.gallery-overlay { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(0deg, rgba(26,26,26,0.9) 0%, rgba(26,26,26,0) 100%); padding: 30px 20px 15px; display: flex; flex-direction: column; justify-content: flex-end; opacity: 0; transition: opacity 0.3s ease; }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-cat { display: inline-block; background: var(--accent-gold); color: var(--primary-maroon); font-weight: 800; font-size: 0.75rem; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; margin-bottom: 8px; align-self: flex-start; }
.gallery-cap { color: var(--white); font-size: 0.95rem; font-weight: 500; margin: 0; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

.quick-actions-section { margin: 0; padding: 4rem 2.5rem; background: var(--bg-cream); }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.qa-card { background: var(--white); border-radius: 16px; padding: 30px; display: flex; align-items: center; gap: 20px; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,0.04); border: 1px solid rgba(212, 175, 55, 0.1); transition: all 0.3s ease; }
.qa-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(122, 28, 28, 0.08); border-color: var(--accent-gold); }
.qa-icon { width: 60px; height: 60px; border-radius: 50%; background: rgba(122, 28, 28, 0.05); color: var(--primary-maroon); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; transition: all 0.3s ease; flex-shrink: 0; }
.qa-card:hover .qa-icon { background: var(--primary-maroon); color: var(--accent-gold); transform: scale(1.1); }
.qa-text h4 { color: var(--dark-slate); font-size: 1.2rem; font-weight: 800; margin: 0 0 5px 0; }
.qa-text p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

.core-values-section { margin: 0; padding: 5rem 2.5rem; background: var(--white); text-align: center; }
.cv-header { margin-bottom: 3.5rem; }
.cv-header h3 { color: var(--primary-maroon); font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; }
.cv-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.cv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.cv-item { padding: 20px; transition: transform 0.3s; }
.cv-item:hover { transform: translateY(-5px); }
.cv-icon { font-size: 3.5rem; color: var(--accent-gold); margin-bottom: 20px; display: inline-block; }
.cv-item h4 { color: var(--dark-slate); font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; }
.cv-item p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

.stats-section { margin: 0; padding: 6rem 2.5rem; background: linear-gradient(135deg, var(--primary-maroon) 0%, #4A1010 100%); color: var(--white); position: relative; overflow: hidden; }
.stats-section::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(rgba(212, 175, 55, 0.1) 2px, transparent 2px); background-size: 30px 30px; opacity: 0.5; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; text-align: center; position: relative; z-index: 2; }
.stat-item .stat-number { font-size: 4rem; font-weight: 900; color: var(--accent-gold); margin-bottom: 5px; line-height: 1; text-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.stat-item .stat-label { font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #EEE; }

.map-directions-btn {
  display: inline-block;
  background: var(--primary-maroon);
  color: var(--accent-gold);
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(122, 28, 28, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.map-directions-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122, 28, 28, 0.4);
}

@media (max-width: 768px) {
  .slider-section { height: 85vh; min-height: 600px; }
  .slide-img-side { height: 100%; width: 100%; clip-path: none; position: absolute; top: 0; left: 0; }
  .slide-img-side::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, transparent 30%, rgba(26,26,26,0.95) 85%); }
  .slide-text-side { width: 100%; height: auto; top: auto; bottom: 0; clip-path: none; background: transparent; padding: 2rem 1.5rem 5rem 1.5rem; justify-content: flex-end; align-items: center; text-align: center; }
  .slide-content { transform: translateY(20px); text-align: center; max-width: 100%; position: relative; z-index: 10; }
  .slide.active .slide-content { transform: translateY(0); }
  .slide-content h2 { font-size: 2rem; margin-bottom: 12px; text-shadow: 0 4px 10px rgba(0,0,0,0.5); }
  .slide-content p { font-size: 1.05rem; border-left: none; padding-left: 0; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
  .slider-arrows { bottom: 15px; right: 50%; transform: translateX(50%); gap: 20px; z-index: 20; }
  .slider-arrows button { width: 50px; height: 50px; font-size: 1.2rem; background: rgba(122,28,28,0.8); }

  .quick-actions-section, .core-values-section, .stats-section, .headteacher-about, .events-row, .gallery-section { padding: 4rem 1.5rem; gap: 1.5rem; }
  .events-row { flex-direction: column; }
  .incoming-events, .past-events { flex: 1 1 100%; padding: 1.5rem; }
  .main-menu a, .qa-card, .event-item { min-height: 48px; }
  .qa-card { padding: 25px 20px; flex-direction: column; text-align: center; gap: 15px; }
  .qa-icon { width: 70px; height: 70px; font-size: 2rem; margin: 0 auto; }
  .cv-header h3, .gallery-header h3 { font-size: 2rem; line-height: 1.2; }
  .stat-item .stat-number { font-size: 3.5rem; }
  .news-ticker-wrap { flex-direction: column; align-items: stretch; border-bottom: none; }
  .ticker-heading { width: 100%; justify-content: center; font-size: 0.85rem; padding: 12px; box-shadow: none; border-bottom: 2px solid var(--accent-gold); }
  .ticker-content { padding: 12px 0; border-bottom: 1px solid rgba(212, 175, 55, 0.2); }
  .ticker-text { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-text { animation: none; }
  .slide-img-side { transition: none; }
}