/* =========================================================
   APPU BLOG
   BLOG-SPECIFIC STYLESHEET
   ========================================================= */


/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
}


body {
  margin: 0;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: #f4f6f8;
  color: #17222c;

  line-height: 1.65;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


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


a {
  color: inherit;
}


button,
a {
  -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   VARIABLES
   ========================================================= */

:root {

  --primary: #17324d;
  --primary-hover: #244d70;

  --accent: #d79b22;
  --accent-hover: #b98116;

  --background: #f4f6f8;
  --surface: #ffffff;
  --surface-alt: #eaf0f4;

  --text: #17222c;
  --text-secondary: #43515d;
  --text-muted: #5b6975;

  --border: #d4dde4;

  --max-width: 1180px;

  --radius-small: 8px;
  --radius-medium: 12px;
  --radius-large: 18px;
}


/* =========================================================
   GLOBAL LAYOUT
   ========================================================= */

.container {
  width: min(
    calc(100% - 32px),
    var(--max-width)
  );

  margin-inline: auto;
}


main {
  min-height: 60vh;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  background: var(--primary);
  color: #ffffff;

  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}


.header-inner {
  width: min(
    calc(100% - 32px),
    var(--max-width)
  );

  min-height: 72px;

  margin-inline: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;
}


.site-logo {
  color: #ffffff;

  text-decoration: none;

  font-size: 1.55rem;
  font-weight: 800;

  letter-spacing: -0.035em;
}


.main-nav {
  display: flex;
  align-items: center;

  gap: 24px;
}


.main-nav a {
  color: #ffffff;

  text-decoration: none;

  font-size: 0.92rem;
  font-weight: 650;

  opacity: 0.9;

  transition:
    opacity 0.2s ease,
    color 0.2s ease;
}


.main-nav a:hover,
.main-nav a:focus-visible {
  color: #ffd77b;
  opacity: 1;
}


/* =========================================================
   BLOG HERO
   ========================================================= */

.blog-hero {
  padding: 76px 0 82px;

  background:
    linear-gradient(
      135deg,
      #17324d 0%,
      #244d70 100%
    );

  color: #ffffff;
}


.blog-hero .container {
  max-width: 900px;
}


.hero-label {
  margin: 0 0 14px;

  color: #ffd77b;

  font-size: 0.78rem;
  font-weight: 800;

  letter-spacing: 0.15em;

  text-transform: uppercase;
}


.blog-hero h1 {
  max-width: 820px;

  margin: 0;

  font-size: clamp(
    2.2rem,
    5vw,
    3.8rem
  );

  line-height: 1.08;

  letter-spacing: -0.04em;
}


.hero-text {
  max-width: 700px;

  margin: 22px 0 0;

  color: #edf3f7;

  font-size: 1.08rem;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.content-section {
  padding: 76px 0;
}


.section-alt {
  background: var(--surface-alt);
}


.section-heading {
  max-width: 720px;

  margin-bottom: 38px;
}


.section-label {
  margin: 0 0 10px;

  color: var(--primary);

  font-size: 0.76rem;
  font-weight: 800;

  letter-spacing: 0.14em;

  text-transform: uppercase;
}


.section-heading h2 {
  margin: 0;

  color: var(--text);

  font-size: clamp(
    1.8rem,
    4vw,
    2.5rem
  );

  line-height: 1.15;

  letter-spacing: -0.025em;
}


.section-heading p:last-child {
  margin: 12px 0 0;

  color: var(--text-secondary);

  font-size: 1rem;
}


/* =========================================================
   ARTICLE GRID
   ========================================================= */

.article-grid {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 22px;
}


.blog-card {
  display: flex;

  min-height: 300px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: var(--radius-medium);

  overflow: hidden;

  box-shadow:
    0 5px 20px rgba(20, 40, 60, 0.06);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}


.blog-card:hover {
  transform: translateY(-3px);

  box-shadow:
    0 10px 28px rgba(20, 40, 60, 0.1);
}


.blog-card-content {
  width: 100%;

  display: flex;
  flex-direction: column;

  padding: 28px;
}


.article-meta {
  margin: 0 0 12px;

  color: var(--accent);

  font-size: 0.72rem;
  font-weight: 850;

  letter-spacing: 0.12em;

  text-transform: uppercase;
}


.blog-card h3 {
  margin: 0;

  color: var(--text);

  font-size: 1.3rem;

  line-height: 1.3;
}


.blog-card h3 a {
  text-decoration: none;
}


.blog-card h3 a:hover,
.blog-card h3 a:focus-visible {
  color: var(--primary-hover);

  text-decoration: underline;
}


.blog-card p:not(.article-meta) {
  margin: 12px 0 24px;

  color: var(--text-secondary);
}


/* =========================================================
   CARD LINK
   ========================================================= */

.card-link {
  display: inline-flex;

  align-items: center;

  width: fit-content;

  margin-top: auto;

  color: var(--primary);

  font-weight: 750;

  text-decoration: none;
}


.card-link::after {
  content: " →";

  transition:
    transform 0.2s ease;
}


.card-link:hover,
.card-link:focus-visible {
  color: var(--primary-hover);

  text-decoration: underline;
}


/* =========================================================
   TOPICS
   ========================================================= */

.topic-grid {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 16px;
}


.topic-card {
  display: flex;
  flex-direction: column;

  min-height: 150px;

  padding: 24px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: var(--radius-medium);

  text-decoration: none;

  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}


.topic-card:hover,
.topic-card:focus-visible {
  border-color: #aebdca;

  transform: translateY(-2px);

  box-shadow:
    0 7px 22px rgba(20, 40, 60, 0.07);
}


.topic-card strong {
  color: var(--primary);

  font-size: 1.05rem;
}


.topic-card span {
  margin-top: 8px;

  color: var(--text-secondary);

  font-size: 0.92rem;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background: #152631;

  color: #eaf0f4;
}


.footer-inner {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  gap: 40px;

  padding-top: 56px;
  padding-bottom: 40px;
}


.footer-logo {
  color: #ffffff;

  font-size: 1.5rem;
  font-weight: 800;

  text-decoration: none;
}


.footer-inner p {
  max-width: 340px;

  margin: 8px 0 0;

  color: #c4d0d8;
}


.footer-nav {
  display: flex;

  flex-wrap: wrap;

  justify-content: flex-end;

  gap: 10px 22px;
}


.footer-nav a {
  color: #dce5eb;

  text-decoration: none;

  font-size: 0.92rem;
}


.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #ffffff;

  text-decoration: underline;
}


.footer-bottom {
  padding-top: 18px;
  padding-bottom: 22px;

  border-top: 1px solid rgba(255, 255, 255, 0.12);
}


.footer-bottom p {
  margin: 0;

  color: #b6c3cc;

  font-size: 0.85rem;
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

a:focus-visible,
button:focus-visible {
  outline: 3px solid #f4c65d;

  outline-offset: 3px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

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


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

}


@media (max-width: 700px) {

  .header-inner {
    min-height: 64px;

    flex-direction: column;

    justify-content: center;

    gap: 8px;

    padding: 14px 0;
  }


  .main-nav {
    width: 100%;

    justify-content: center;

    gap: 18px;
  }


  .blog-hero {
    padding: 64px 0 68px;
  }


  .content-section {
    padding: 62px 0;
  }


  .footer-inner {
    flex-direction: column;
  }


  .footer-nav {
    justify-content: flex-start;
  }

}


@media (max-width: 560px) {

  .container,
  .header-inner {
    width: min(
      calc(100% - 24px),
      var(--max-width)
    );
  }


  .blog-hero h1 {
    font-size: 2.15rem;
  }


  .hero-text {
    font-size: 1rem;
  }


  .article-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }


  .main-nav {
    gap: 12px;
  }


  .main-nav a {
    font-size: 0.84rem;
  }


  .blog-card-content {
    padding: 24px;
  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }


  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

}
