/* ==================================================
   COMPONENTS CSS
   Purpose:
   - Reusable UI elements
   - Buttons, forms, cards, carousels, signatures
   - Component-specific hover/transition effects
   ================================================== */

/* ================= BUTTONS ================= */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--secondary);
  padding: 12px 25px;
  border-radius: var(--radius-md);
  font-weight: bold;
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* CTA Buttons (Overrides) */
.cta .btn {
  background-color: var(--white);
  color: var(--primary);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
}

.cta .btn:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* Admissions button */
.apply-btn {
  display: inline-block;
  margin-top: 25px;
  padding: 18px 40px;
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  background: var(--secondary);
  border-radius: 50px;
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: 0 10px 25px rgba(43,47,102,0.25);
}

.apply-btn:hover {
  background: var(--accent);
  color: var(--secondary);
  transform: translateY(-3px);
}

/* ================= FORMS ================= */
.contact-form label {
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
  font-weight: bold;
}

.contact-form input, 
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: var(--radius-sm);
  margin-bottom: 15px;
  font-size: 14px;
}

.contact-form button.btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 25px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px;
}

.contact-form button.btn:hover {
  background: var(--secondary);
}

/* ================= SIGNATURES ================= */
.signature {
  margin-top: 25px;
  font-style: italic;
  color: #333;
}

.signature-name {
  margin-top: 5px;
  font-weight: 700;
  color: var(--primary);
}

.signature-role {
  font-weight: normal;
  color: #666;
  margin-top: 2px;
}

/* ================= IMAGE BOXES ================= */
.image-box.large {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.image-box.large.visible {
  opacity: 1;
  transform: translateY(0);
}

.image-box.large img,
.hero-image img,
.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
  transition: transform 0.3s ease;
}

.image-box.large img:hover,
.hero-image img:hover {
  transform: scale(1.05);
}

/* ================= HEADTEACHER MESSAGE ================= */
.headteacher-message {
  max-width: 1100px;
  margin: 60px auto;
  padding: 30px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  background: var(--white);
}

.headteacher-image {
  flex: 0 0 260px;
}

.headteacher-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  box-shadow: var(--shadow-lg);
}

.headteacher-message .message {
  flex: 1;
}

.headteacher-message h1 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.headteacher-message h3 {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 15px;
}

.headteacher-message p {
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 15px;
}

/* ================= FEATURES SECTION ================= */
.features-section {
  padding: 60px 20px;
  background: #f9f9f9;
}

.features-grid {
  max-width: 1200px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr; /* MOBILE FIRST */
  gap: 25px;
}

/* Feature Card */
.feature-item {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.12);
}

/* Image wrapper – FIXED SIZE */
.feature-image {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  background: #eaeaea;
  margin-bottom: 15px;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text */
.feature-item h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #2b2f66;
}

.feature-item p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

/* ================= TABLET ================= */
@media (min-width: 600px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-image {
    height: 210px;
  }
}

/* ================= DESKTOP ================= */
@media (min-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .feature-image {
    height: 220px;
  }
}


/* ================= CAROUSEL ================= */
.carousel-container {
  max-width: 1000px;
  margin: 30px auto;
}

.carousel-main {
  position: relative;
  text-align: center;
  width: 100%;
  height: 450px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
}

.carousel-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: var(--white);
  border: none;
  font-size: 30px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition-normal);
}

.nav-btn:hover {
  background: var(--primary);
}

.nav-btn.prev { left: 10px; }
.nav-btn.next { right: 10px; }

.carousel-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
}

.carousel-thumbnails img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.6;
  border: 3px solid transparent;
  transition: 0.3s;
}

.carousel-thumbnails img.active {
  opacity: 1;
  border-color: var(--secondary);
}

.carousel-thumbnails img:hover {
  opacity: 1;
}