/* ==============================
   VARIABLES
============================== */
:root {
  --bg-main: #313f3e;
  --bg-footer: #222222;
  --accent: #3ba796;
  --accent-hover: #2e8c7c;
  --text-light: #ffffff;
  --text-dark: #222222;

  --container-width: 97.4%;
  --container-max: 1530px;

  --radius-pill: 50px;
  --transition-fast: 0.2s ease;
}

/* ==============================
   BASE
============================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Nunito Sans", sans-serif;
  color: var(--text-light);
  background:
    linear-gradient(rgba(49, 63, 62, 0.96), rgba(49, 63, 62, 0.96)),
    url("assets/bg-ese.jpg") center / cover no-repeat fixed;
}

h1,
h2 {
  font-weight: 900;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  text-decoration: none !important;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}

/* ==============================
   UTILITIES
============================== */
.accent {
  color: var(--accent);
}

.btn-accent {
  background-color: var(--accent);
  color: #fff;
  border: none;
}
.btn-accent:hover {
  background-color: var(--accent-hover);
}

.layout-container,
.section-nav-container,
.our-school-container,
.container-wide {
  width: var(--container-width);
  max-width: var(--container-max);
  margin: 0 auto;
}

.custom-grid-wrapper {
  width: 81.7%;
  margin: 0 auto;
}

/* ==============================
   HERO
============================== */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-overlay {
  width: 100%;
  height: 100%;
}

.hero-logo {
  position: absolute;
  top: 0;
  left: 5vw;
  z-index: 10;
  width: 160px;
}

.carousel,
.carousel-inner,
.carousel-item,
.hero-slide {
  height: 500px;
}

.hero-slide {
  background-size: cover;
  background-position: center;
}

.hero-text {
  width: 33%;
  color: #fff;
}
.hero-text h1 {
  font-size: 2.8rem;
  line-height: 1.1;
  margin: 0;
}

/* ==============================
   SECTION NAVIGATION
============================== */
.section-nav {
  padding: 2rem 0;
}

.section-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.section-nav a {
  padding: 15px 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 1rem;
  background: transparent;
}
.section-nav a:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

/* ==============================
   OUR SCHOOL
============================== */

.our-school-section {
  padding: 3rem 0;
}

.our-school-image {
  background-image: url("assets/our-school-2.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right;
  width: auto;
  height: 100%;
  min-height: 420px;
}

.our-school-content {
  background: linear-gradient(90deg, #fff 40%, #e8fffa 100%);
  padding: 80px 70px;
  color: var(--text-dark);
}
.our-school-content p {
  font-weight: 400;
  line-height: 150%;
  font-style: italic;
}
.our-school-link {
  color: var(--text-dark);
  text-decoration: underline;
  font-weight: 600;
}

.our-school-link {
  background: none;
  border: none;
  padding: 0;
  margin-top: 1.2rem;

  color: var(--text-dark);
  font: inherit;
  text-decoration: underline;

  cursor: pointer;
}

.our-school-link:hover {
  opacity: 0.8;
}

.our-school-link:focus {
  outline: none;
}

/* ==============================
   TITLES
============================== */
.section-title {
  text-align: center;
  font-size: 3.7rem;
  margin-bottom: 3rem;
  font-weight: 500;
}
.section-title span {
  color: var(--accent);
  font-style: italic;
  font-weight: 800;
}

/* ==============================
   WHY ESE
============================== */
.why-ese-section {
  padding: 3rem 0;
}

.why-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 0.715;
}
.why-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 33%;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  padding: 0 8%;
  background: rgba(255, 255, 255, 0.1);
}
.why-overlay p {
  font-size: 1.5rem;
  line-height: 120%;
}

/* ==============================
   FACULTY
============================== */

.faculty-section {
  padding: 3rem 0;
}

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px 40px;
}

.faculty-card {
  text-align: center;
  max-width: 220px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.faculty-card h3 {
  font-size: 1.563rem;
  margin-bottom: 1rem;
  font-weight: 500;
  line-height: 1.2;
}

.faculty-card img {
  width: 180px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 20px;
}
.faculty-card p {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 1.2rem;
}

.faculty-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 1rem;
  width: fit-content;
}

.faculty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.faculty-card .faculty-btn {
  margin: auto auto 0 auto;
}

.faculty-btn:hover {
  color: #f0ffbb;
  border-color: #f0ffbb;
}

/* ==============================
   PUBLICATIONS
============================== */
.publications-section {
  padding: 3rem 0;
}

.publications-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(2rem, 3vw, 3rem);
  margin-top: 3rem;
}

.publication-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.8rem;
}

.publication-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.publication-meta img {
  aspect-ratio: 53 / 71;
  width: clamp(53px, 4vw, 53px);
  object-fit: cover;
}

.publication-title p {
  font-size: 1.15rem;
  flex-grow: 1;
  line-height: 130%;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.publication-authors {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  font-weight: 300;
  line-height: 150%;
}

.publications-more {
  text-align: center;
  margin-top: 4rem;
}

.publications-more a {
  text-decoration: underline;
}

.publications-toggle {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

.publications-toggle:hover {
  opacity: 0.85;
}

/* ==============================
   CENTERS
============================== */
.centers-section {
  padding: 3rem 0;
}

.centers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 3rem;
  align-items: stretch;
}

.center-card {
  background-color: rgba(255, 255, 255, 0.04);
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.center-card img {
  flex-shrink: 0;
  margin-bottom: 1.25rem;
}

.center-card h3 {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 1.375rem;
  line-height: 120%;
  color: #d7f5a6;
  font-weight: 600;
}

/* ==============================
   FOOTER
============================== */
.site-footer {
  background: #1c1f1e;
  padding: 3rem 0;
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.footer-logos img {
  height: 90px;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
  font-size: 1.3rem;
}
.footer-social a {
  color: #fff;
  opacity: 0.85;
}
.footer-social a:hover {
  opacity: 1;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 1200px) {
  .carousel,
  .carousel-inner,
  .carousel-item,
  .hero-slide {
    height: 300px;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text {
    width: 65%;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-left {
    flex-direction: column;
    gap: 1.5rem;
  }

  .faculty-grid,
  .centers-grid,
  .publications-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .faculty-card img {
    width: 150px;
  }

  .carousel,
  .carousel-inner,
  .carousel-item,
  .hero-slide {
    height: 500px;
  }

  .custom-grid-wrapper {
    width: 90%;
  }

  .section-title {
    font-size: 2.5rem;
  }
  body {
    background-attachment: scroll;
  }
  .faculty-grid,
  .publications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .centers-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .publications-grid {
    gap: clamp(1rem, 2vw, 2rem);
  }

  .hero-logo {
    width: 100px;
    left: 50%;
    transform: translateX(-50%);
  }

  .our-school-content {
    padding: 40px 24px;
  }

  .hero-overlay .container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 2.5rem;
    padding-bottom: clamp(2rem, 6vw, 3.5rem);
  }

  .hero-text {
    width: 100%;
    text-align: left;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }
}

/* ==============================
   MOBILE NAV TRANSFORM
============================== */

.section-nav-toggle {
  display: none;
  width: 100%;
  background: #222222;
  color: #fff;
  border: none;
  padding: 1rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #ffffff33;
}

.section-nav-toggle i {
  transition: transform 0.3s ease;
}

@media (max-width: 1200px) {
  .section-nav {
    padding: 2rem 0 0 0;
  }

  .section-nav-toggle {
    display: flex;
  }

  .nav-collapse ul {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.8rem 1.5rem;
    background: #222222;
    border: 1px solid #ffffff33;
  }

  .nav-collapse {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);

    transition:
      max-height 0.45s ease,
      opacity 0.35s ease,
      transform 0.35s ease;
  }

  .section-nav.open .nav-collapse {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
  }

  .section-nav ul a {
    display: inline-block;
  }

  .section-nav.open .section-nav-toggle i {
    transform: rotate(180deg);
  }

  .section-nav ul {
    overflow: hidden;
    transition:
      grid-template-rows 0.35s ease,
      opacity 0.3s ease;
  }

  .section-nav.open .section-nav-toggle {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .section-nav.open ul {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}

/* ==============================
   SWIPER
============================== */

.whySwiper {
  padding-bottom: 40px;
}

.whySwiper .swiper-slide {
  height: auto;
}

.whySwiper .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.4;
}

.whySwiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--accent);
}

.publication-meta span {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
