/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #E8F4FD;
  --color-bg-white: #ffffff;
  --color-primary: #4A90D9;
  --color-primary-dark: #357ABD;
  --color-primary-light: #B8D9F5;
  --color-text: #2C3E50;
  --color-text-light: #5A6F82;
  --color-accent: #FF8C69;
  --shadow-sm: 0 2px 8px rgba(74, 144, 217, 0.12);
  --shadow-md: 0 4px 20px rgba(74, 144, 217, 0.18);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
  --font: 'Mali', sans-serif;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.logo__icon {
  display: flex;
  align-items: center;
  color: var(--color-primary);
}

.logo__icon .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav__link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-light);
  transition: color var(--transition);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link:focus {
  color: var(--color-primary);
}

.nav__link:hover::after,
.nav__link:focus::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 4rem 0 5rem;
  background: linear-gradient(160deg, var(--color-bg) 0%, var(--color-primary-light) 100%);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__badge {
  display: inline-block;
  background: var(--color-bg-white);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
  max-width: 420px;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: none;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 144, 217, 0.4);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 217, 0.5);
}

.hero__image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
}

.hero__wave svg {
  width: 100%;
  height: 60px;
}

/* ===== Section Common ===== */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--color-text-light);
  font-size: 1rem;
}

/* ===== Seals Gallery ===== */
.seals {
  padding: 4rem 0;
  background: var(--color-bg-white);
}

.seals__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.seal-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.seal-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.seal-card__image {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.seal-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.seal-card:hover .seal-card__image img {
  transform: scale(1.05);
}

.seal-card__body {
  padding: 1.25rem;
}

.seal-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.15rem;
}

.seal-card__latin {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

.seal-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.seal-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.seal-card__tags li {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
}

/* Last card spans center on 3-col grid when 5 items */
.seals__grid .seal-card:nth-child(4) {
  grid-column: 1 / 2;
}

.seals__grid .seal-card:nth-child(5) {
  grid-column: 2 / 3;
}

/* ===== Fun Facts ===== */
.facts {
  padding: 4rem 0;
  background: var(--color-bg);
}

.facts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.fact-card {
  background: var(--color-bg-white);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.fact-card:hover {
  transform: translateY(-4px);
}

/* ===== Icons ===== */
.icon {
  display: block;
  width: 100%;
  height: 100%;
}

.fact-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 0.75rem;
  color: var(--color-primary);
}

.inline-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.icon--inline {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-primary);
}

.about__text--icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.fact-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.5rem;
}

.fact-card__text {
  font-size: 0.88rem;
  color: var(--color-text-light);
}

/* ===== About ===== */
.about {
  padding: 4rem 0;
  background: var(--color-bg-white);
}

.about__inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.about__text {
  color: var(--color-text-light);
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 0;
  text-align: center;
}

.footer__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.icon--footer {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
}

.footer__copy {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ===== Fade-in Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .seals__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .seals__grid .seal-card:nth-child(4),
  .seals__grid .seal-card:nth-child(5) {
    grid-column: auto;
  }

  .facts__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg-white);
    padding: 1rem 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
    gap: 0.75rem;
  }

  .nav.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero {
    padding: 2.5rem 0 4rem;
  }

  .seals__grid {
    grid-template-columns: 1fr;
  }

  .facts__grid {
    grid-template-columns: 1fr;
  }
}
