/* ==========================================================
   TurtleEdu — College Detail Page Polish Stylesheet
   Loaded via <link> on every college-*.php page
   Layered ON TOP of each page's existing inline CSS, so it
   nudges typography/spacing/colour without breaking layouts.
   ========================================================== */

:root {
  --te-blue: #035bff;
  --te-blue-dark: #0240b3;
  --te-green: #12b76a;
  --te-dark: #0f172a;
  --te-mid: #475569;
  --te-light: #94a3b8;
}

/* Page-wide font polish */
body {
  font-family: 'Nunito', 'Inter', -apple-system, system-ui, sans-serif !important;
  color: #1e293b !important;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #035bff 0%, #0240b3 50%, #0f172a 100%) !important;
  padding: 130px 5% 56px !important;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(96, 165, 250, .25) 0%, transparent 55%),
    radial-gradient(circle at 82% 78%, rgba(74, 222, 128, .15) 0%, transparent 50%);
  pointer-events: none;
}
.hero .hi { max-width: 1280px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 {
  font-family: 'Sora', 'Nunito', sans-serif !important;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem) !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.4px !important;
  color: #fff !important;
  margin-bottom: 14px !important;
}
.hero p, .hi p {
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 720px;
}

/* ---------- Cards (info sections) ---------- */
.card {
  background: #fff !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 14px rgba(15, 23, 42, .06) !important;
  border: 1.5px solid #e8edf5 !important;
  overflow: hidden !important;
  margin-bottom: 18px !important;
  transition: box-shadow .25s, transform .25s;
}
.card:hover {
  box-shadow: 0 8px 28px rgba(15, 23, 42, .1) !important;
}
.ch {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 18px 22px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: #fafbff;
}
.ci {
  width: 38px !important;
  height: 38px !important;
  background: linear-gradient(135deg, #e8f0ff, #dbeafe) !important;
  color: #035bff;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.05rem !important;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(3, 91, 255, .12);
}
.ct {
  font-family: 'Sora', 'Nunito', sans-serif !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  color: #0f172a !important;
  letter-spacing: -0.2px;
  margin: 0 !important;
}
.cb {
  padding: 22px !important;
  font-size: 0.93rem;
  color: #334155;
  line-height: 1.7;
}
.cb p { margin: 0 0 12px; line-height: 1.7; color: #334155; }
.cb p:last-child { margin-bottom: 0; }
.cb h3, .cb h4 {
  font-family: 'Sora', 'Nunito', sans-serif !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 16px 0 8px !important;
  font-size: 1rem !important;
}
.cb ul, .cb ol { margin: 0 0 12px; padding-left: 22px; }
.cb li { margin: 4px 0; color: #334155; line-height: 1.65; }
.cb table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  margin: 10px 0 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.cb table th, .cb table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}
.cb table th {
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.2px;
}
.cb table tr:last-child td { border-bottom: none; }
.cb table tr:nth-child(even) td { background: #f8fafc; }

/* Facility chips */
.fac-chip {
  display: inline-flex !important;
  background: #f1f5f9 !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 50px !important;
  padding: 7px 14px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #334155 !important;
  margin: 4px 4px 4px 0 !important;
  transition: all .2s;
}
.fac-chip:hover {
  border-color: #035bff !important;
  color: #035bff !important;
  background: #eff6ff !important;
  transform: translateY(-1px);
}

/* ---------- FAQ ---------- */
.faq-item {
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 12px !important;
  margin-bottom: 10px !important;
  overflow: hidden !important;
  transition: border-color .2s, background .2s;
}
.faq-item:hover { border-color: rgba(3, 91, 255, .35) !important; }
.faq-item.open {
  border-color: #035bff !important;
  background: #fafbff !important;
}
.faq-q {
  width: 100% !important;
  background: #fff !important;
  border: none !important;
  text-align: left !important;
  padding: 16px 18px !important;
  font-family: 'Nunito', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  color: #0f172a !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  transition: color .2s !important;
}
.faq-q:hover { color: #035bff !important; }
.faq-item.open .faq-q { color: #035bff !important; background: transparent !important; }
.faq-arr {
  font-size: 0.7rem !important;
  transition: transform .3s !important;
  flex-shrink: 0;
  color: #94a3b8;
}
.faq-item.open .faq-arr { transform: rotate(180deg) !important; color: #035bff; }
.faq-a {
  display: none;
  padding: 0 18px 16px !important;
  font-size: 0.88rem !important;
  color: #475569 !important;
  line-height: 1.7 !important;
  border-top: 1px solid #f1f5f9;
}
.faq-item.open .faq-a {
  display: block !important;
  animation: faqFade .25s ease;
}
@keyframes faqFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Sidebar (Quick Info, Need Guidance, etc.) ---------- */
.sc { gap: 16px !important; }
.qi {
  background: #fff !important;
  border-radius: 16px !important;
  border: 1.5px solid #e8edf5 !important;
  box-shadow: 0 2px 14px rgba(15, 23, 42, .05) !important;
  padding: 20px !important;
}
.qi h4 {
  font-family: 'Sora', 'Nunito', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #035bff !important;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 14px !important;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.qr {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center;
  gap: 10px;
  padding: 9px 0 !important;
  font-size: 0.85rem !important;
  border-bottom: 1px solid #f8fafc !important;
}
.qr:last-child { border-bottom: none !important; }
.ql {
  color: #64748b !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
}
.qv {
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  text-align: right !important;
}

.ctabox {
  background: linear-gradient(135deg, #0f172a 0%, #0240b3 100%) !important;
  border-radius: 16px !important;
  padding: 22px !important;
  color: #fff !important;
  text-align: center !important;
  border: none !important;
  box-shadow: 0 8px 28px rgba(3, 91, 255, .25);
}
.ctabox a {
  border-radius: 9px !important;
}

/* The new acard-cta block we generated when removing inline forms */
.acard-cta {
  background: linear-gradient(135deg, #035bff 0%, #0240b3 60%, #0f172a 100%) !important;
  padding: 24px !important;
  border-radius: 16px !important;
  text-align: center !important;
  margin-bottom: 16px !important;
  box-shadow: 0 10px 32px rgba(3, 91, 255, .25) !important;
  position: relative;
  overflow: hidden;
}
.acard-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(96, 165, 250, .25) 0%, transparent 55%),
    radial-gradient(circle at 82% 78%, rgba(74, 222, 128, .18) 0%, transparent 55%);
  pointer-events: none;
}
.acard-cta > * { position: relative; z-index: 1; }
.acard-cta h3 {
  font-family: 'Sora', 'Nunito', sans-serif !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  margin-bottom: 6px !important;
  letter-spacing: -0.2px;
  color: #fff !important;
}
.acard-cta p {
  font-size: 0.84rem !important;
  color: rgba(255, 255, 255, .82) !important;
  margin-bottom: 14px !important;
  line-height: 1.55;
}
.acard-cta a {
  display: block !important;
  margin-bottom: 8px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  font-size: 0.86rem !important;
  padding: 11px 16px !important;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.acard-cta a:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.acard-cta a:last-child { margin-bottom: 0 !important; }

/* When sidebar stacks below content (narrow viewports < 900px),
   present acard-cta + qi + ctabox as a clean horizontal trio,
   not three full-width banners. */
@media (max-width: 900px) and (min-width: 540px) {
  .sc {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    align-items: start;
  }
  .sc .acard-cta { grid-column: 1 / -1; padding: 20px !important; }
  .sc .acard-cta a { display: inline-flex !important; margin: 4px !important; }
  .sc .acard-cta a + a { margin-top: 4px !important; }
  .sc .acard-cta { display: flex; flex-direction: column; }
  .sc .acard-cta > h3, .sc .acard-cta > p { text-align: center; }
  .sc .acard-cta .acard-btns {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px;
  }
}
@media (max-width: 540px) {
  .acard-cta { padding: 18px !important; }
  .acard-cta h3 { font-size: 0.98rem !important; }
}

/* ---------- Related colleges section ---------- */
.related-colleges {
  background: #f8fafc !important;
  padding: 56px 5% !important;
  border-top: 1px solid #e2e8f0;
}
.related-colleges h2 {
  font-family: 'Sora', 'Nunito', sans-serif !important;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem) !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  text-align: center;
  max-width: 1280px;
  margin: 0 auto 28px !important;
}

/* Related college cards INSIDE the "More X Colleges" cb panel.
   Override the stray late <style> rule that flattens them. */
.cb a.rel-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  border: 1.5px solid #e8edf5 !important;
  background: #fff !important;
  color: #0f172a !important;
  text-decoration: none !important;
  margin-bottom: 8px !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  transition: border-color .2s, background .2s, transform .2s !important;
}
.cb a.rel-card:hover {
  border-color: #035bff !important;
  background: #eff6ff !important;
  color: #0f172a !important;
  transform: translateX(3px);
}
.cb a.rel-card .rel-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.3rem !important;
  flex-shrink: 0;
  color: #fff;
}
.cb a.rel-card .rel-name {
  font-family: 'Sora', 'Nunito', sans-serif !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.3 !important;
  margin-bottom: 3px !important;
}
.cb a.rel-card .rel-meta {
  font-size: 0.74rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
}
.cb a.rel-card:hover .rel-name { color: #035bff !important; }

/* Layout related cards as a 2-col grid on desktop for better density */
.cb > a.rel-card,
.cb a.rel-card + a.rel-card {
  display: flex !important;
}
@media (min-width: 540px) {
  .card .cb:has(> a.rel-card) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
  }
  .card .cb:has(> a.rel-card) > a:not(.rel-card),
  .card .cb:has(> a.rel-card) > div:not(.rel-card) {
    grid-column: 1 / -1;
  }
}

/* ---------- Section spacing & overall page padding ---------- */
section { font-family: inherit; }

/* Force a clean 2-col page layout on desktop, centered max-width container.
   The page itself defines .pb { 1fr 310px } at >900px — we just make sure
   the sidebar widgets look right at all widths. */
.pb { max-width: 1280px !important; margin: 0 auto !important; }

/* When sidebar stacks below content, keep it visually contained so it
   doesn't look like a giant full-width banner. */
@media (max-width: 900px) {
  .sc {
    max-width: 720px !important;
    margin: 0 auto !important;
    width: 100% !important;
  }
}

/* ---------- Buttons (apply / details) on detail page ---------- */
.btn-apply, .btn-d, .apply-btn, .course-apply-btn {
  background: linear-gradient(135deg, #12b76a, #059669) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 9px !important;
  padding: 11px 20px !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(18, 183, 106, .25);
  transition: transform .2s, box-shadow .2s;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-apply:hover, .btn-d:hover, .apply-btn:hover, .course-apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(18, 183, 106, .35) !important;
  color: #fff !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .hero { padding: 110px 18px 44px !important; }
  .ch { padding: 14px 16px !important; }
  .cb { padding: 16px !important; font-size: 0.88rem; }
  .ci { width: 32px !important; height: 32px !important; font-size: .95rem !important; border-radius: 8px !important; }
  .ct { font-size: 0.92rem !important; }
  .qi, .ctabox { padding: 16px !important; }
  .qr { font-size: 0.8rem !important; padding: 7px 0 !important; }
  .ql, .qv { font-size: 0.78rem !important; }
  .fac-chip { font-size: 0.72rem !important; padding: 5px 11px !important; }
  .faq-q { padding: 13px 14px !important; font-size: 0.86rem !important; }
  .faq-a { padding: 0 14px 13px !important; font-size: 0.82rem !important; }
}
