/* styles.css
   Complete stylesheet (top to bottom) for the Faiz Education System page.
   Includes final adjustments so the WHY CHOOSE portrait image displays as a full portrait aligned with the text.
*/

/* Root variables */
:root{
  --bg: #ffffff;
  --card: #ffffff;
  --muted: #6b6b6b;
  --accent: #ff6a00;
  --accent-2: #ff9a3c;
  --accent-dark: #d94f00;
  --banner-yellow: #fff0b8;
  --cta-red: #d62828;
  --radius: 12px;
  --max-width: 1200px;
  --shadow: 0 8px 24px rgba(16,24,40,0.06);
  --container-padding: 20px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --font-display: "Poppins", var(--font-sans);
}

/* Reset / base */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: #222;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font-sans);
  line-height: 1.5;
  font-size: 16px;
}

/* Container */
.container { max-width: var(--max-width); margin: 0 auto; padding: var(--container-padding); }

/* Header */
.header {
  background: var(--bg);
  color: var(--accent);
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(4px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--container-padding); }

/* Brand */
.brand-wrap { display: flex; align-items: center; gap: 12px; }
.logo-small { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; padding: 6px; background: transparent; }
.brand-text .brand { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.2px; font-size: 20px; color: var(--accent); }
.brand-text .tag { font-size: 13px; opacity: 0.95; margin-left: 0; font-weight: 500; color: var(--muted); }

/* Nav */
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 13px;
  transition: color 160ms ease, transform 160ms ease;
  background: transparent;
  border-radius: 4px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  bottom: -8px;
  height: 4px;
  width: 44px;
  background: var(--accent);
  border-radius: 3px;
  transition: transform 180ms cubic-bezier(.2,.9,.2,1), opacity 180ms;
  transform-origin: center;
  opacity: 0;
}
.nav-link:hover, .nav-link:focus { color: var(--accent-dark); transform: translateY(-3px); }
.nav-link:hover::after, .nav-link:focus::after { transform: translateX(-50%) scaleX(1); opacity: 1; }
.nav-link.active { color: var(--accent); }
.nav-link.active::after { transform: translateX(-50%) scaleX(1); opacity: 1; bottom: -8px; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: transparent; border: 0; color: var(--accent); font-size: 20px; }
/* Social icon in header */
.header-actions .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(90deg,#3b5998,#2d4373);
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(16,24,40,0.06);
  margin-left: 8px;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}
.header-actions .social-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.header-actions .social-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16,24,40,0.12);
}
.header-actions .social-icon:focus {
  outline: 3px solid rgba(59,89,152,0.22);
  outline-offset: 2px;
}

/* Full-bleed slideshow container (single slide visible) */
.slides-fullscreen {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  box-sizing: border-box;
  z-index: 10;
  background: var(--bg);
  margin-top: 20px; /* small spacing between header and slides */
}

/* Slider card */
.slides-wrap.fullscreen {
  width: 100%;
  height: 68vh; /* adjust to taste */
  max-height: 820px;
  overflow: hidden;
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 30px 60px rgba(16,24,40,0.08);
  display: block;
  padding: 0; /* keep sides empty */
}

/* Swiper base: single slide fills container */
.swiper { width: 100%; height: 100%; }
.swiper .swiper-wrapper { align-items: stretch; }
.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100% !important; /* force single slide width */
  height: 100%;
  transition: transform 700ms ease, opacity 700ms ease;
  backface-visibility: hidden;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}
.swiper-slide img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #fff;
}

/* Controls */
.swiper-button-next,
.swiper-button-prev {
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.28));
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  border: 0;
}
.swiper-button-next::after,
.swiper-button-prev::after { font-size: 18px; }
.swiper-pagination-bullet {
  background: rgba(255,255,255,0.9);
  opacity: 0.9;
  width: 10px;
  height: 10px;
}
.swiper-pagination-bullet-active {
  background: var(--accent);
  width: 12px;
  height: 12px;
}

/* Play/pause controls */
.slider-controls {
  position: absolute;
  right: 28px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  gap: 8px;
}
.slider-control {
  background: rgba(255,255,255,0.95);
  color: var(--accent);
  border: 2px solid rgba(255,106,0,0.12);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16,24,40,0.06);
}

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; padding: 36px var(--container-padding); }
.hero-left h1 { font-family: var(--font-display); font-size: 36px; margin: 0 0 12px 0; color: #222; }
.hero-sub { color: var(--muted); margin: 0 0 12px 0; }
.hero-points { list-style: none; padding: 0; margin: 0 0 18px 0; }
.hero-points li { margin: 8px 0; font-weight: 600; color: #333; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.hero-note { color: var(--muted); margin-top: 8px; }

/* Accent headings */
.accent-heading { color: var(--accent); font-family: var(--font-display); font-weight: 700; position: relative; display: inline-block; }
.accent-heading::after { content: ""; display: block; height: 4px; width: 56px; background: var(--accent-2); margin-top: 8px; border-radius: 3px; opacity: 0.95; }

/* CTA */
.cta { display: inline-block; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; box-shadow: 0 8px 20px rgba(255,106,0,0.12); }
.cta.small { padding: 8px 12px; font-size: 14px; }
.cta.secondary { background: transparent; color: var(--accent); border: 2px solid rgba(255,106,0,0.08); }
.cta.donate { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Hero right */
.hero-right { display: flex; flex-direction: column; gap: 12px; }
.hero-card { background: var(--card); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); }
.hero-image { width: 100%; height: 260px; object-fit: cover; border-radius: 8px; }
.hero-stats { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.stat { background: linear-gradient(180deg, #fff, #fffaf6); padding: 10px; border-radius: 10px; flex: 1; text-align: center; }
.stat-value { font-size: 22px; color: var(--accent); font-weight: 800; }
.stat-label { color: var(--muted); font-size: 13px; }

/* Hex grid */
.hex-section { padding-top: 8px; padding-bottom: 8px; }
.hex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; align-items: center; justify-items: center; padding: 12px 0 24px 0; }
.hex-item { position: relative; width: 180px; height: 156px; display: flex; align-items: center; justify-content: center; text-align: center; cursor: default; transition: transform 220ms ease, box-shadow 220ms ease; }
.hex-item:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16,24,40,0.08); }
.hex-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hex-shape polygon { fill: #fffaf6; stroke: rgba(255,106,0,0.12); stroke-width: 2; filter: drop-shadow(0 6px 18px rgba(16,24,40,0.04)); }
.hex-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 10px; width: 86%; }
.hex-icon { font-size: 28px; margin-bottom: 8px; }
.hex-label { font-weight: 700; color: #222; }
.hex-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Info banner */
.info-banner { background: var(--banner-yellow); border-top: 1px solid rgba(255,170,0,0.08); border-bottom: 1px solid rgba(255,170,0,0.06); padding: 14px 0; margin-top: 18px; }
.banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.banner-text { margin: 0; font-weight: 600; color: #2b2b2b; }
.find-nearby { background: var(--cta-red); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 800; box-shadow: 0 8px 20px rgba(214,40,40,0.12); }

/* New: Info cards (four boxes) */
.info-cards-section { padding-top: 18px; padding-bottom: 6px; }
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 12px; }
.info-card { background: linear-gradient(180deg, #fff, #fffaf6); border: 1px solid #fff6f0; padding: 18px; border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.info-card-image { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; display: block; }
.info-card-title { margin: 0; font-size: 18px; color: var(--accent); font-weight: 800; font-family: var(--font-display); }
.info-card-text { margin: 0; color: #333; font-size: 14px; line-height: 1.45; }
.info-card-link { margin-top: auto; display: inline-block; text-decoration: none; color: #fff; background: var(--accent); padding: 8px 12px; border-radius: 8px; font-weight: 700; box-shadow: 0 8px 20px rgba(255,106,0,0.08); }

/* Totals */
.totals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 12px; }
.total-card { text-align: center; padding: 18px; border-radius: 12px; box-shadow: var(--shadow); background: var(--card); }
.total-number { font-size: 28px; color: var(--accent); font-weight: 800; }

/* ------------------------------------------------------------------
   Books carousel styles (new)
------------------------------------------------------------------ */

.books-section { padding-top: 18px; padding-bottom: 28px; }
.books-section .section-title { margin-bottom: 6px; }
.books-section .small { margin-bottom: 12px; color: var(--muted); }

.books-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg,#fff,#fffaf6);
  padding: 12px;
  box-shadow: var(--shadow);
  border: 1px solid #fff6f0;
}

.carousel-track {
  display: flex;
  gap: 12px;
  align-items: center;
  animation: scroll-left 28s linear infinite;
  will-change: transform;
}

.book-item {
  flex: 0 0 calc((100% / 4) - 9px);
  max-width: calc((100% / 4) - 9px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 8px 20px rgba(16,24,40,0.04);
  border: 1px solid rgba(0,0,0,0.03);
}
.book-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.books-carousel:hover .carousel-track,
.books-carousel:focus-within .carousel-track {
  animation-play-state: paused;
}

@media (max-width: 980px) {
  .book-item { flex: 0 0 calc((100% / 3) - 8px); max-width: calc((100% / 3) - 8px); }
  .book-item img { height: 200px; }
}
@media (max-width: 680px) {
  .book-item { flex: 0 0 calc((100% / 2) - 8px); max-width: calc((100% / 2) - 8px); }
  .book-item img { height: 180px; }
}
@media (max-width: 420px) {
  .book-item { flex: 0 0 calc(100% - 12px); max-width: calc(100% - 12px); }
  .book-item img { height: 160px; }
}

/* Donation modal */
.donation-modal-backdrop { position: fixed; inset: 0; background: rgba(8,10,12,0.5); display: none; align-items: center; justify-content: center; z-index: 120; padding: 20px; }
.donation-modal { width: 100%; max-width: 720px; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(16,24,40,0.12); overflow: hidden; }
.donation-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; }
.donation-body { padding: 18px 20px; color: #222; }
.donation-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.donation-item { padding: 12px; border-radius: 10px; background: linear-gradient(180deg, #fff, #fffaf6); border: 1px solid #fff6f0; }
.donation-actions { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
.donation-copy { background: var(--accent); color: #fff; border: 0; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-weight: 700; }
.donation-note { margin-top: 10px; color: var(--muted); font-size: 13px; }

/* Footer */
.site-footer { margin-top: 36px; padding: 18px var(--container-padding); background: linear-gradient(180deg, #fff, #fff8f2); border-top: 1px solid #fff0e6; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo-mark { width: 48px; height: 48px; border-radius: 8px; background: var(--accent); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }

/* Responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 28px var(--container-padding); }
  .nav { display: none; }
  .menu-toggle { display: inline-block; }
  .hero-image { height: 220px; }
  .banner-inner { flex-direction: column; align-items: flex-start; }
  .hex-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
  .hex-item { width: 150px; height: 130px; }
  .slides-wrap.fullscreen { height: 48vh; }
  .info-cards { grid-template-columns: 1fr; }
  .info-card-image { height: 180px; }
}

/* ------------------------------------------------------------------
   WHY CHOOSE final portrait alignment (full portrait image aligned with text)
   - Fixed portrait column on the right
   - Text left column top-aligned and vertically balanced
   - Image preserved as full portrait (no cropping) on wide screens
------------------------------------------------------------------ */
.why-choose-section { position: relative; padding-top: 8px; padding-bottom: 8px; }
.why-choose-section > h2 { margin-bottom: 12px; }

/* Two-column layout: text left, fixed portrait image on the right */
.why-choose-content.two-column {
  display: grid;
  grid-template-columns: 1fr 320px; /* text column + fixed portrait column */
  gap: 24px;
  align-items: start; /* top-align text and image for a tidy layout */
}

/* Keep text vertically balanced and readable */
.why-choose-text {
  max-width: 820px;
  margin: 0;
  color: #333;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
}

/* Image container centers the portrait inside its column */
.why-choose-media {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Portrait image: fixed portrait dimensions, preserve aspect, no crop */
.why-portrait {
  width: 320px;        /* fixed portrait width */
  height: 420px;       /* fixed portrait height (portrait ratio) */
  object-fit: contain; /* preserve full image, no cropping */
  object-position: center;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16,24,40,0.06);
  display: block;
}

/* Responsive: stack on small screens and scale image */
@media (max-width: 980px) {
  .why-choose-content.two-column { grid-template-columns: 1fr; }
  .why-portrait { width: 100%; height: 300px; max-width: 360px; object-fit: cover; }
}
@media (max-width: 520px) {
  .why-portrait { height: 220px; }
}
