/* =============================================================
   IGL EduConnect — Main Stylesheet
   Ported from html/css/style1.css + WordPress-specific additions
   ============================================================= */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Inner pages: add top breathing space before footer image band */
.nav-solid footer > div:first-child { margin-top: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: #1c1c1c;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 400 !important;
}

img { max-width: 100%; height: auto; }

/* ── Navigation ── */
#site-header {
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

#site-header.scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 1px 0 #DBD8AE;
}

#site-header.scrolled .nav-link        { color: #1c1c1c; }
#site-header.scrolled .nav-link:hover  { color: #22AEE8; }
#site-header.scrolled .nav-cta         { background: #22AEE8; color: #fff; border-color: transparent; }
#site-header.scrolled .logo-white      { display: none; }
#site-header.scrolled .logo-dark       { display: block; }
#site-header.scrolled #menu-toggle     { color: #1c1c1c; }

.nav-link {
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1px;
  transition: right 0.25s ease;
}

.nav-link.is-active::after {
  right: 0;
}

#site-header.scrolled .nav-link::after { background: #22AEE8; }

/* ── Study Abroad CTA — attention-grabbing pulse ── */
.study-abroad-btn {
  position: relative;
  z-index: 0;
  animation: study-abroad-bounce 2.6s ease-in-out infinite;
}

.study-abroad-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #F08123;
  animation: study-abroad-ring 2.6s ease-out infinite;
}

@keyframes study-abroad-ring {
  0%   { box-shadow: 0 0 0 0 rgba(240, 129, 35, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(240, 129, 35, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 129, 35, 0); }
}

@keyframes study-abroad-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .study-abroad-btn,
  .study-abroad-btn::before { animation: none; }
}

.logo-white { display: block; }
.logo-dark  { display: none; }

/* ── Mobile drawer ── */
#mobile-menu {
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open { transform: translateX(0); }

/* ── Site Popup ── */
.igl-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(28, 28, 28, 0.65);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.igl-popup-overlay.is-visible {
  display: flex;
  opacity: 1;
}

.igl-popup-box {
  position: relative;
  max-width: 420px;
  width: 100%;
  transform: scale(0.92);
  transition: transform 0.25s ease;
}

.igl-popup-overlay.is-visible .igl-popup-box {
  transform: scale(1);
}

.igl-popup-box img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.igl-popup-link { display: block; }

.igl-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  color: #1c1c1c;
  border-radius: 9999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}

.igl-popup-close:hover {
  transform: scale(1.08);
  background: #fff;
}

/* ── Hero overlay ── */
.hero-overlay {
  background: linear-gradient(
    100deg,
    rgba(59, 82, 73, 0.58) 0%,
    rgba(34, 174, 232, 0.10) 100%
  );
}

/* ── Discipline image cards ── */
.disc-card { position: relative; overflow: hidden; }

.disc-card img { transition: transform 0.5s ease; }
.disc-card:hover img { transform: scale(1.06); }

.disc-card .card-overlay {
  background: linear-gradient(
    180deg,
    transparent 30%,
    rgba(59, 82, 73, 0.92) 100%
  );
}

/* ── Image mosaic hover ── */
.mosaic-img { transition: transform 0.4s ease; }
.mosaic-img:hover { transform: scale(1.03); }

/* ── FAQ accordion ── */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s ease;
}

.faq-content.open { max-height: 400px; }

.faq-toggle[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }

.faq-chevron { transition: transform 0.3s ease; }

/* ── Stat numbers ── */
.stat-num { font-variant-numeric: tabular-nums; }

/* ── Approval ticker strip ── */
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-inner {
  animation: ticker 28s linear infinite;
  display: flex;
  width: max-content;
}

.ticker-inner:hover { animation-play-state: paused; }

/* ── Blog cards ── */
.blog-card { display: flex; flex-direction: column; }

.blog-card .blog-img-wrap { overflow: hidden; }

.blog-card .blog-img-wrap img {
  transition: transform 0.5s ease;
  display: block;
  width: 100%;
  object-fit: cover;
}

.blog-card:hover .blog-img-wrap img { transform: scale(1.05); }

.blog-card .blog-body { flex: 1; display: flex; flex-direction: column; }

.blog-card .blog-body > a {
  margin-top: 0.75rem;
  align-self: flex-start;
}

.blog-card .blog-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
}

.footer-social-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-social-icon:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.28);
  z-index: 70;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(37, 211, 102, 0.34);
}

/* ── Testimonial carousel dot pill ── */
.tc-dot {
  height: 8px;
  border-radius: 9999px;
  transition: width 0.3s ease, background 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}

/* ── Scroll-reveal base states ──
   No default opacity here: the hidden state is applied via inline
   styles by gsap.set() in main.js. If GSAP/ScrollTrigger fails to
   load (CDN blocked/slow), content simply stays visible instead of
   being permanently hidden. */

/* ── WordPress: pagination ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  border: 1px solid #DBD8AE;
  color: #1c1c1c;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}

.nav-links .page-numbers:hover,
.nav-links .page-numbers.current {
  background: #22AEE8;
  color: #fff;
  border-color: #22AEE8;
}

/* ── WordPress: search form ── */
.search-form {
  display: flex;
  gap: 0;
  border: 1px solid #DBD8AE;
  border-radius: 9999px;
  overflow: hidden;
}

.search-form .search-field {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: #1c1c1c;
  background: #fff;
}

.search-form .search-submit {
  padding: 0.75rem 1.5rem;
  background: #22AEE8;
  color: #fff;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.search-form .search-submit:hover { background: #0ea5e9; }

/* ── WordPress: screen-reader-text ── */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* ── Contact form feedback ── */
#igl-form-msg.success {
  background: #EAF4D3;
  color: #3B5249;
}

#igl-form-msg.error {
  background: #fef2f2;
  color: #dc2626;
}

/* ── Prose (basic article styles) ── */
.prose p { margin-bottom: 1.25em; }
.prose h2 { font-size: 1.5rem; font-family: Helvetica, Arial, sans-serif; font-weight: 400; margin: 2em 0 0.75em; color: #111827; }
.prose h3 { font-size: 1.25rem; font-family: Helvetica, Arial, sans-serif; font-weight: 400; margin: 1.75em 0 0.5em; color: #111827; }
.prose ul, .prose ol { padding-left: 1.5em; margin-bottom: 1.25em; }
.prose li { margin-bottom: 0.5em; }
.prose a { color: #22AEE8; text-decoration: underline; }
.prose a:hover { color: #0ea5e9; }
.prose strong { font-weight: 600; color: #111827; }
.prose blockquote { border-left: 3px solid #22AEE8; padding-left: 1.25em; margin: 1.5em 0; color: #6b7280; font-style: italic; }

/* ── Global soft border overrides ── */
/* Upgrade sharp Tailwind radius classes to softer equivalents */
.rounded    { border-radius: 0.75rem !important; }
.rounded-md { border-radius: 1rem    !important; }
.rounded-lg { border-radius: 1.25rem !important; }

/* Soften all border colors throughout the theme */
*  { border-color: inherit; }
[class*="border-gray-200"] { border-color: #e8e8e4 !important; }
[class*="border-accent2"]  { border-color: #e5e3cc !important; }

/* Inputs & textareas: ensure they always feel soft */
input:not([type="radio"]):not([type="checkbox"]),
textarea,
select {
  border-radius: 0.875rem !important;
}

/* Buttons without an explicit rounded class get softened too */
button:not([class*="rounded"]) { border-radius: 0.875rem; }

/* ── Reduced-motion: skip all transitions/animations ── */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right { opacity: 1 !important; transform: none !important; }

  .disc-card img,
  .mosaic-img,
  .blog-card .blog-img-wrap img { transition: none; }

  .ticker-inner { animation: none; }

  #tc-track { transition: none !important; }
}
