/* =========================================================
   APSCHOOLZ.COM
   Main Stylesheet
   ========================================================= */

/* ================= RESET ================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #123b6d;
  --primary-light: #1976d2;
  --accent: #ffb703;

  --text: #172033;
  --muted: #667085;

  --background: #ffffff;
  --light-bg: #f5f7fa;

  --border: #e6eaf0;

  --success: #168a5b;
  --orange: #e87518;
  --purple: #7357c7;

  --radius: 14px;
  --shadow: 0 8px 25px rgba(18, 59, 109, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input {
  font-family: inherit;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ================= HEADER ================= */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;

  font-size: 22px;
  font-weight: 800;
  color: var(--primary);

  white-space: nowrap;
}

.logo > span:last-child span {
  color: var(--primary-light);
}

.logo-icon {
  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  background: var(--primary);
  color: #fff;

  border-radius: 10px;

  font-size: 21px;
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;

  margin-left: auto;
}

.main-nav a {
  color: #4b5565;
  font-size: 13px;
  font-weight: 600;

  transition: 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-light);
}

.search-btn {
  width: 40px;
  height: 40px;

  border: 1px solid var(--border);
  background: #fff;

  border-radius: 10px;

  cursor: pointer;
}

.menu-btn {
  display: none;

  border: 0;
  background: transparent;

  font-size: 25px;
  cursor: pointer;
}

/* ================= HERO ================= */

.hero {
  background:
    radial-gradient(circle at 85% 30%, #dbeeff 0, transparent 32%),
    linear-gradient(135deg, #f6faff 0%, #eef6ff 100%);

  padding: 78px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.hero-badge {
  display: inline-flex;

  padding: 8px 13px;

  border-radius: 30px;

  background: #e2efff;
  color: var(--primary-light);

  font-size: 12px;
  font-weight: 700;

  margin-bottom: 18px;
}

.hero h1 {
  max-width: 680px;

  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.1;

  letter-spacing: -2px;

  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--primary-light);
}

.hero p {
  max-width: 620px;

  color: var(--muted);

  font-size: 17px;

  margin-bottom: 28px;
}

.search-box {
  max-width: 620px;

  display: flex;

  padding: 6px;

  background: #fff;

  border: 1px solid #dfe7f0;

  border-radius: 12px;

  box-shadow: 0 10px 30px rgba(25, 118, 210, 0.09);
}

.search-box input {
  flex: 1;

  border: 0;
  outline: 0;

  padding: 13px 15px;

  font-size: 14px;
}

.search-box button {
  border: 0;

  padding: 0 24px;

  background: var(--primary);
  color: #fff;

  border-radius: 8px;

  font-weight: 600;

  cursor: pointer;

  transition: 0.2s;
}

.search-box button:hover {
  background: var(--primary-light);
}

.popular-searches {
  margin-top: 15px;

  display: flex;
  flex-wrap: wrap;
  gap: 13px;

  font-size: 12px;

  color: var(--muted);
}

.popular-searches a {
  color: var(--primary-light);
}

.popular-searches a:hover {
  text-decoration: underline;
}

/* ================= HERO ILLUSTRATION ================= */

.hero-illustration {
  display: flex;
  justify-content: center;
}

.illustration-card {
  width: 390px;
  height: 340px;

  position: relative;

  border-radius: 35px;

  background: linear-gradient(145deg, #1976d2, #123b6d);

  box-shadow: 0 25px 60px rgba(18, 59, 109, 0.25);

  overflow: hidden;
}

.student {
  position: absolute;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  font-size: 125px;

  filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.18));
}

.book {
  position: absolute;

  font-size: 42px;

  background: #fff;

  width: 70px;
  height: 70px;

  display: grid;
  place-items: center;

  border-radius: 16px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.book-one {
  left: 35px;
  top: 40px;
  transform: rotate(-10deg);
}

.book-two {
  right: 35px;
  top: 50px;
  transform: rotate(9deg);
}

.book-three {
  left: 45px;
  bottom: 40px;
  transform: rotate(7deg);
}

.floating-card {
  position: absolute;

  background: #fff;

  padding: 11px 14px;

  border-radius: 10px;

  font-size: 11px;
  font-weight: 700;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.floating-card span {
  margin-right: 5px;
}

.card-one {
  right: 25px;
  bottom: 35px;
}

.card-two {
  right: 22px;
  top: 135px;
}

.card-three {
  left: 28px;
  top: 150px;
}

/* ================= ADS ================= */

.ad-placeholder {
  height: 90px;

  margin: 25px 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px dashed #ccd4df;

  color: #98a2b3;

  font-size: 11px;
}

/* ================= SECTIONS ================= */

.section {
  padding: 75px 0;
}

.section-light {
  background: var(--light-bg);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;

  margin-bottom: 30px;
}

.section-label {
  display: block;

  color: var(--primary-light);

  text-transform: uppercase;

  font-size: 11px;
  font-weight: 800;

  letter-spacing: 1.2px;

  margin-bottom: 5px;
}

.section-heading h2 {
  font-size: 28px;

  letter-spacing: -0.8px;
}

.view-all {
  color: var(--primary-light);

  font-size: 13px;
  font-weight: 700;
}

.view-all:hover {
  text-decoration: underline;
}

/* ================= CATEGORIES ================= */

.category-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 16px;
}

.category-card {
  padding: 22px;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  background: #fff;

  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-4px);

  box-shadow: var(--shadow);
}

.category-icon {
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  font-size: 22px;

  margin-bottom: 15px;
}

.category-card h3 {
  font-size: 15px;

  margin-bottom: 4px;
}

.category-card p {
  font-size: 12px;

  color: var(--muted);
}

/* Category colors */

.blue .category-icon {
  background: #e6f2ff;
}

.orange .category-icon {
  background: #fff0df;
}

.green .category-icon {
  background: #e5f8ef;
}

.purple .category-icon {
  background: #eeeaff;
}

.red .category-icon {
  background: #ffebeb;
}

.teal .category-icon {
  background: #e2f8f7;
}

.yellow .category-icon {
  background: #fff7d9;
}

.dark .category-icon {
  background: #e9edf4;
}

/* ================= CONTENT LAYOUT ================= */

.content-layout {
  display: grid;

  grid-template-columns: 1fr 280px;

  gap: 30px;
}

.article-grid {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 20px;
}

/* ================= ARTICLE ================= */

.article-card {
  background: #fff;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  overflow: hidden;

  transition: 0.2s;
}

.article-card:hover {
  transform: translateY(-3px);

  box-shadow: var(--shadow);
}

.article-image {
  height: 150px;

  display: grid;
  place-items: center;

  font-size: 52px;
}

.blue-bg {
  background: #e5f2ff;
}

.orange-bg {
  background: #fff0df;
}

.green-bg {
  background: #e4f8ee;
}

.purple-bg {
  background: #eeeaff;
}

.article-body {
  padding: 20px;
}

.article-category {
  color: var(--primary-light);

  font-size: 10px;
  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: 0.6px;
}

.orange-text {
  color: var(--orange);
}

.green-text {
  color: var(--success);
}

.purple-text {
  color: var(--purple);
}

.article-body h3 {
  font-size: 16px;

  line-height: 1.4;

  margin: 7px 0;
}

.article-body p {
  color: var(--muted);

  font-size: 12px;

  line-height: 1.7;
}

.article-meta {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-top: 18px;

  padding-top: 14px;

  border-top: 1px solid var(--border);

  color: #98a2b3;

  font-size: 10px;
}

.article-meta a {
  color: var(--primary-light);

  font-weight: 700;
}

/* ================= SIDEBAR ================= */

.sidebar-box {
  background: #fff;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  padding: 22px;
}

.sidebar-box h3 {
  font-size: 15px;

  margin-bottom: 15px;
}

.category-list {
  list-style: none;
}

.category-list li {
  border-top: 1px solid var(--border);
}

.category-list a {
  display: flex;

  justify-content: space-between;

  padding: 12px 0;

  color: #4b5565;

  font-size: 12px;

  transition: 0.2s;
}

.category-list a:hover {
  color: var(--primary-light);

  padding-left: 4px;
}

.sidebar-ad {
  height: 250px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px dashed #ccd4df;

  margin-top: 20px;

  color: #98a2b3;

  font-size: 11px;
}

/* ================= STUDY MATERIALS ================= */

.class-buttons {
  display: flex;

  flex-wrap: wrap;

  gap: 10px;

  margin-bottom: 28px;
}

.class-buttons a {
  padding: 10px 16px;

  background: #fff;

  border: 1px solid var(--border);

  border-radius: 8px;

  font-size: 12px;
  font-weight: 600;

  transition: 0.2s;
}

.class-buttons a:hover,
.class-buttons a.highlight {
  background: var(--primary);

  border-color: var(--primary);

  color: #fff;
}

.resource-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 16px;
}

.resource-card {
  display: flex;

  align-items: center;

  gap: 13px;

  padding: 18px;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  transition: 0.2s;
}

.resource-card:hover {
  border-color: #b8d7f7;

  background: #f7fbff;
}

.resource-card > span {
  font-size: 25px;
}

.resource-card div {
  flex: 1;
}

.resource-card h3 {
  font-size: 13px;
}

.resource-card p {
  color: var(--muted);

  font-size: 10px;
}

.resource-card strong {
  color: var(--primary-light);
}

/* ================= SCHOLARSHIPS ================= */

.scholarship-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 18px;
}

.scholarship-card {
  background: #fff;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  padding: 20px;

  display: grid;

  grid-template-columns: 45px 1fr;

  gap: 14px;
}

.scholarship-icon {
  width: 45px;
  height: 45px;

  display: grid;
  place-items: center;

  background: #fff5d9;

  border-radius: 11px;

  font-size: 21px;
}

.scholarship-card span {
  color: var(--primary-light);

  font-size: 10px;

  font-weight: 700;

  text-transform: uppercase;
}

.scholarship-card h3 {
  font-size: 14px;

  margin: 4px 0;
}

.scholarship-card p {
  color: var(--muted);

  font-size: 11px;
}

.scholarship-card > a {
  grid-column: 1 / -1;

  color: var(--primary-light);

  font-size: 11px;

  font-weight: 700;
}

/* ================= TOOLS ================= */

.tools-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 18px;
}

.tool-card {
  padding: 25px;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  background: #fff;

  transition: 0.2s;
}

.tool-card:hover {
  border-color: #b8d7f7;

  box-shadow: var(--shadow);

  transform: translateY(-3px);
}

.tool-card > div {
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  background: #e8f3ff;

  color: var(--primary-light);

  border-radius: 12px;

  font-size: 20px;

  margin-bottom: 15px;
}

.tool-card h3 {
  font-size: 14px;

  margin-bottom: 5px;
}

.tool-card p {
  color: var(--muted);

  font-size: 11px;
}

/* ================= CTA ================= */

.cta-section {
  padding: 50px 0;

  background: var(--primary);
}

.cta-content {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 30px;
}

.cta-content span {
  color: var(--accent);

  font-size: 12px;

  font-weight: 800;

  text-transform: uppercase;
}

.cta-content h2 {
  color: #fff;

  font-size: 28px;

  margin: 5px 0;
}

.cta-content p {
  color: #bcd0e6;

  font-size: 13px;
}

.cta-button {
  background: var(--accent);

  color: #172033;

  padding: 13px 20px;

  border-radius: 9px;

  font-size: 12px;

  font-weight: 800;

  white-space: nowrap;
}

/* ================= FOOTER ================= */

.site-footer {
  background: #0c294a;

  color: #fff;

  padding-top: 55px;
}

.footer-grid {
  display: grid;

  grid-template-columns: 2fr 1fr 1fr 1fr;

  gap: 45px;

  padding-bottom: 45px;
}

.footer-logo {
  display: inline-flex;

  align-items: center;

  gap: 9px;

  font-size: 20px;

  font-weight: 800;
}

.footer-logo .logo-icon {
  background: var(--primary-light);
}

.footer-about p {
  max-width: 360px;

  color: #a9bdd3;

  font-size: 12px;

  line-height: 1.8;

  margin-top: 15px;
}

.footer-column {
  display: flex;

  flex-direction: column;

  gap: 10px;
}

.footer-column h3 {
  font-size: 13px;

  margin-bottom: 5px;
}

.footer-column a {
  color: #a9bdd3;

  font-size: 11px;

  transition: 0.2s;
}

.footer-column a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);

  padding: 20px 0;
}

.footer-bottom .container {
  display: flex;

  align-items: center;

  justify-content: space-between;
}

.footer-bottom p,
.footer-bottom a {
  color: #8fa7c0;

  font-size: 10px;
}

.footer-bottom div {
  display: flex;

  gap: 18px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
  .main-nav {
    gap: 13px;
  }

  .main-nav a {
    font-size: 11px;
  }

  .hero-grid {
    gap: 30px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================= TABLET ================= */

@media (max-width: 800px) {
  .header-inner {
    min-height: 65px;
  }

  .main-nav {
    display: none;

    position: absolute;

    left: 20px;
    right: 20px;
    top: 70px;

    background: #fff;

    padding: 15px;

    border: 1px solid var(--border);

    border-radius: 12px;

    box-shadow: var(--shadow);

    flex-direction: column;

    align-items: stretch;

    gap: 0;
  }

  .main-nav.show {
    display: flex;
  }

  .main-nav a {
    padding: 12px;

    font-size: 13px;

    border-bottom: 1px solid var(--border);
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .menu-btn {
    display: block;
  }

  .search-btn {
    margin-left: auto;
  }

  .hero {
    padding: 55px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;

    text-align: center;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .search-box {
    margin: auto;
  }

  .popular-searches {
    justify-content: center;
  }

  .hero-illustration {
    display: none;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .scholarship-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ================= MOBILE ================= */

@media (max-width: 550px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .hero h1 {
    font-size: 36px;

    letter-spacing: -1.2px;
  }

  .hero p {
    font-size: 14px;
  }

  .search-box {
    flex-direction: column;

    background: transparent;

    border: 0;

    box-shadow: none;

    gap: 8px;
  }

  .search-box input {
    width: 100%;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: 9px;
  }

  .search-box button {
    width: 100%;

    min-height: 45px;
  }

  .section {
    padding: 50px 0;
  }

  .section-heading h2 {
    font-size: 23px;
  }

  .section-heading {
    align-items: center;
  }

  .view-all {
    font-size: 11px;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;

    gap: 10px;
  }

  .category-card {
    padding: 16px;
  }

  .category-card h3 {
    font-size: 13px;
  }

  .category-card p {
    font-size: 10px;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tool-card {
    padding: 18px;
  }

  .tool-card h3 {
    font-size: 12px;
  }

  .cta-content {
    flex-direction: column;

    align-items: flex-start;
  }

  .cta-button {
    width: 100%;

    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;

    gap: 30px;
  }

  .footer-bottom .container {
    flex-direction: column;

    align-items: flex-start;

    gap: 10px;
  }
}

/* =========================================================
   HEADER SEARCH
========================================================= */

.header-search {
  position: relative;
  margin-left: 5px;
}

.search-button {
  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  border: 1px solid #e5e9ef;

  background: #fff;

  border-radius: 9px;

  cursor: pointer;

  font-size: 16px;

  transition: 0.2s;
}

.search-button:hover {
  background: #f5f8fc;
  border-color: #cbd8e8;
}

/* SEARCH DROPDOWN */

.search-dropdown {
  position: absolute;

  top: calc(100% + 10px);

  right: 0;

  width: 330px;

  padding: 10px;

  background: #fff;

  border: 1px solid #e5e9ef;

  border-radius: 12px;

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);

  display: none;

  z-index: 2000;
}

.search-dropdown.show {
  display: block;
}

.header-search-form {
  display: flex;

  gap: 7px;
}

.header-search-form input {
  flex: 1;

  min-width: 0;

  height: 40px;

  padding: 0 12px;

  border: 1px solid #dce2ea;

  border-radius: 8px;

  outline: none;

  font-size: 12px;
}

.header-search-form input:focus {
  border-color: #1976d2;

  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.08);
}

.header-search-form button {
  height: 40px;

  padding: 0 15px;

  border: 0;

  border-radius: 8px;

  background: #123b6d;

  color: #fff;

  font-size: 11px;

  font-weight: 600;

  cursor: pointer;
}

.header-search-form button:hover {
  background: #1976d2;
}

/* MOBILE */

@media (max-width: 550px) {
  .search-dropdown {
    position: fixed;

    top: 70px;

    left: 14px;

    right: 14px;

    width: auto;
  }
}
