:root {
  --teal: #35aaa8;
  --teal-dark: #258b8b;
  --orange: #ff6b24;
  --ink: #2e4242;
  --muted: #657273;
  --line: #e3e7e7;
  --paper: #ffffff;
  --soft: #f6f8f8;
  --warm: #f0d77c;
  --shadow: 0 18px 45px rgba(27, 51, 51, 0.12);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: #334444;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(53, 170, 168, 0.05), transparent 34%, rgba(255, 107, 36, 0.04)),
    #fff;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--orange);
}

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

header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 74px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-container,
.footer-container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.header-container {
  display: grid;
  grid-template-columns: auto minmax(220px, 320px) 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 74px;
}

.logo a,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.logo img,
.footer-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.site-name {
  max-width: 180px;
  font-size: 12px;
  line-height: 1.35;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 44px 0 17px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(53, 170, 168, 0.15);
}

.search-box button {
  position: absolute;
  right: 7px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  cursor: pointer;
}

.main-nav ul,
.footer-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 74px;
  color: #263737;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: 3px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--orange);
  border-top-color: var(--orange);
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero-section {
  --hero-strip: 105px;
  position: relative;
  display: grid;
  height: clamp(430px, 52vw, 620px);
  min-height: 430px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(242, 225, 102, 0.82), rgba(255, 255, 255, 0.7) 48%, rgba(244, 218, 91, 0.65)),
    var(--warm);
}

.hero-image {
  grid-area: 1 / 1;
  width: min(calc(100% - 84px), 1720px);
  height: 100%;
  margin: 0 auto;
  object-fit: cover;
  opacity: 0.88;
  filter: saturate(1.12) contrast(1.05);
}

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.hero-section::before {
  top: 28%;
  bottom: var(--hero-strip);
  background: rgba(38, 45, 45, 0.45);
  mix-blend-mode: multiply;
}

.hero-section::after {
  bottom: 0;
  height: var(--hero-strip);
  background: rgba(53, 170, 168, 0.96);
}

.hero-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 2;
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0;
  color: #fff;
  text-align: center;
  transform: translateX(-50%);
}

.hero-overlay h1 {
  position: absolute;
  top: calc((100% - var(--hero-strip)) / 2);
  left: 50%;
  width: min(900px, 100%);
  max-width: 690px;
  margin: 0;
  color: #fff;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.2);
}

.hero-overlay h1::first-letter {
  color: var(--orange);
}

.hero-subtitle {
  position: absolute;
  bottom: calc(var(--hero-strip) / 2);
  left: 50%;
  width: min(900px, calc(100% - 40px));
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-size: clamp(16px, 1.55vw, 22px);
  line-height: 1.35;
  transform: translate(-50%, 50%);
}

body > main,
.blog-page-wrapper,
.about-page-main,
.contact-page-main,
body > aside {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

body > main {
  padding: 84px 0 36px;
}

main > main {
  max-width: 820px;
  margin: 0 auto;
}

main h1,
.blog-header h1,
.about-header h1,
.contact-header h1 {
  margin: 0 0 28px;
  color: var(--ink);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: Impact, "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

h2 {
  margin: 70px 0 22px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  text-transform: uppercase;
}

h3 {
  margin: 34px 0 12px;
  font-size: 24px;
  line-height: 1.2;
}

p {
  margin: 0 0 20px;
}

.intro-text,
.post-excerpt,
.contact-description {
  color: var(--muted);
}

.hero-overlay .hero-subtitle {
  color: #fff;
}

main > main > p:first-of-type {
  position: relative;
  max-width: none;
  margin: -22px calc(50% - 50vw) 74px;
  padding: 34px max(24px, calc((100vw - var(--max)) / 2));
  color: #fff;
  background: var(--teal);
}

main > main > p:first-of-type::first-line {
  font-weight: 700;
  text-transform: uppercase;
}

section {
  position: relative;
}

main img {
  width: 100%;
  margin: 34px 0 46px;
  border-radius: 0;
  box-shadow: var(--shadow);
}

main ul,
main ol {
  margin: 26px 0 32px;
  padding-left: 0;
  list-style: none;
}

main li {
  position: relative;
  margin: 0 0 13px;
  padding-left: 28px;
}

main li::before {
  content: "";
  position: absolute;
  top: 0.78em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 107, 36, 0.12);
}

blockquote {
  margin: 36px 0;
  padding: 30px 34px;
  color: #fff;
  background:
    linear-gradient(rgba(27, 35, 35, 0.72), rgba(27, 35, 35, 0.72)),
    url("images/brasilia-national-congress-buildings.webp") center / cover;
  border-left: 6px solid var(--orange);
}

blockquote p:last-child {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.45;
}

table {
  width: 100%;
  margin: 34px 0 42px;
  border-collapse: collapse;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #fff;
  background: var(--teal-dark);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tr:nth-child(even) td {
  background: #f9fbfb;
}

.recent-posts-aside,
.popular-posts-aside,
.comments-aside,
.author-aside,
.social-share-aside {
  padding: 24px 0;
}

.social-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px;
  color: #fff;
  background: var(--teal);
}

.social-share h3,
.recent-posts-slider h2,
.popular-posts h2,
.comments-toggle h2 {
  margin: 0;
  text-transform: uppercase;
}

.social-share h3 {
  color: #fff;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.share-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.recent-posts-slider,
.popular-posts,
.comments-section,
.author-bio,
.sidebar-widget,
.contact-info-box,
.contact-form-section,
.contact-map-section,
.about-section {
  background: #fff;
  border: 1px solid var(--line);
}

.recent-posts-slider {
  overflow: hidden;
}

.recent-posts-slider,
.popular-posts,
.comments-section,
.author-bio {
  padding: 34px;
}

.slider-container {
  overflow: hidden;
  margin-top: 26px;
}

.slider-track {
  display: flex;
  transition: transform 0.45s ease;
}

.slider-slide {
  flex: 0 0 100%;
  padding-right: 1px;
}

.slider-slide a,
.popular-post-item a,
.post-link {
  display: block;
  color: inherit;
}

.slider-slide img {
  aspect-ratio: 16 / 8;
  width: 100%;
  object-fit: cover;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #9aa4a4;
  cursor: pointer;
}

.dot.active {
  background: var(--teal);
}

.popular-post-item {
  border-top: 1px solid var(--line);
}

.popular-post-item a {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 26px;
  padding: 26px 0;
}

.popular-post-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.read-more,
.featured-badge {
  color: var(--orange);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.comments-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.toggle-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.toggle-btn.active {
  color: #fff;
  background: var(--teal);
}

.toggle-btn.active svg {
  transform: rotate(180deg);
}

.comment-form-container {
  display: none;
  padding-top: 28px;
}

.comment-form-container.active {
  display: block;
}

.comment-form,
.contact-form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group {
  display: grid;
  gap: 8px;
}

label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  padding: 13px 15px;
  color: var(--ink);
  font: inherit;
  background: #fff;
  outline: none;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(53, 170, 168, 0.15);
}

.submit-btn,
.pagination-btn,
.pagination-number,
.modal-close-btn,
.modal-link,
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--teal);
  color: #fff;
  background: var(--teal);
  font-weight: 700;
  cursor: pointer;
}

.submit-btn:hover,
.pagination-btn:hover,
.pagination-number:hover,
.modal-close-btn:hover,
.modal-link:hover,
.social-link:hover {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
}

.author-bio {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 26px;
}

.author-photo {
  width: 140px;
  height: 140px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: none;
}

.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-page-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px;
  padding: 72px 0 48px;
}

.blog-header,
.about-header,
.contact-header {
  grid-column: 1 / -1;
  text-align: center;
}

.articles-container {
  display: grid;
  gap: 28px;
}

.blog-post {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-post:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.post-link {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 220px;
}

.post-image-wrapper,
.post-image {
  height: 100%;
}

.post-image {
  width: 100%;
  object-fit: cover;
}

.post-details {
  padding: 26px;
}

.post-details h2 {
  margin: 0 0 14px;
  font-size: 31px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  padding: 7px 10px;
  color: #fff;
  background: var(--orange);
}

.pagination {
  margin-top: 34px;
}

.pagination-container,
.pagination-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pagination-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.blog-sidebar,
.about-sidebar,
.contact-sidebar {
  display: grid;
  align-content: start;
  gap: 24px;
}

.sidebar-widget,
.contact-info-box,
.contact-form-section,
.contact-map-section,
.about-section {
  padding: 28px;
}

.sidebar-widget h3,
.contact-info-box h3,
.about-section h2,
.contact-form-section h2,
.contact-map-section h2 {
  margin-top: 0;
}

.sidebar-list,
.sidebar-updates {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-list li,
.sidebar-updates li {
  padding: 14px 0 14px 22px;
  border-bottom: 1px solid var(--line);
}

.update-date {
  display: block;
  color: var(--orange);
}

.about-page-main,
.contact-page-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px 44px;
  padding: 72px 0 48px;
}

.about-content-wrapper,
.contact-content-wrapper {
  display: grid;
  gap: 24px;
}

.about-author-section .author-bio {
  border: 0;
  padding: 0;
}

.team-member {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.team-member h4 {
  margin: 0 0 4px;
  color: var(--ink);
}

.team-member-role {
  margin-bottom: 8px;
  color: var(--orange);
  font-weight: 700;
}

.contact-detail-item,
.contact-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.map-container {
  overflow: hidden;
  border: 1px solid var(--line);
}

.map-container iframe {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
}

.search-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 30, 30, 0.58);
}

.search-modal {
  width: min(520px, 100%);
  padding: 34px;
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-modal h3 {
  margin-top: 10px;
}

.search-modal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px 0;
}

footer {
  margin-top: 50px;
  color: rgba(255, 255, 255, 0.78);
  background: #253333;
}

.footer-content {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 34px;
  align-items: center;
  padding: 42px 0;
}

.footer-logo {
  color: #fff;
}

.footer-info p {
  margin-bottom: 8px;
  font-size: 14px;
}

.footer-nav a {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-nav a:hover {
  color: var(--orange);
}

@media (max-width: 980px) {
  .header-container {
    grid-template-columns: auto 1fr auto;
    gap: 18px;
  }

  .search-box {
    grid-column: 1 / -1;
    order: 4;
    margin-bottom: 14px;
  }

  .main-nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
    padding: 12px 0 18px;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    min-height: 44px;
    border-top: 0;
    border-left: 3px solid transparent;
    padding-left: 12px;
  }

  .main-nav a.active,
  .main-nav a:hover {
    border-left-color: var(--orange);
  }

  .mobile-menu-toggle {
    display: block;
  }

  .blog-page-wrapper,
  .about-page-main,
  .contact-page-main {
    grid-template-columns: 1fr;
  }

  .blog-sidebar,
  .about-sidebar,
  .contact-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-logo,
  .footer-nav ul {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .header-container,
  .footer-container,
  body > main,
  .blog-page-wrapper,
  .about-page-main,
  .contact-page-main,
  body > aside {
    width: min(100% - 28px, var(--max));
  }

  .site-name {
    max-width: 145px;
  }

  .hero-section {
    --hero-strip: 128px;
    min-height: 520px;
  }

  .hero-overlay {
    padding-inline: 0;
  }

  main > main > p:first-of-type {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  h2 {
    margin-top: 52px;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  .popular-post-item a,
  .post-link,
  .author-bio {
    grid-template-columns: 1fr;
  }

  .post-link {
    min-height: 0;
  }

  .post-image {
    aspect-ratio: 16 / 9;
  }

  .popular-post-item img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .blog-sidebar,
  .about-sidebar,
  .contact-sidebar,
  .form-row {
    grid-template-columns: 1fr;
  }

  .social-share {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination-container,
  .footer-nav ul {
    flex-wrap: wrap;
  }
}

@media (max-width: 460px) {
  body {
    font-size: 15px;
  }

  .logo img,
  .footer-logo img {
    width: 40px;
    height: 40px;
  }

  .site-name {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .hero-section {
    --hero-strip: 150px;
    min-height: 500px;
  }

  .hero-section::before {
    top: 22%;
    bottom: var(--hero-strip);
  }

  .hero-section::after {
    height: var(--hero-strip);
  }

  .recent-posts-slider,
  .popular-posts,
  .comments-section,
  .author-bio,
  .sidebar-widget,
  .contact-info-box,
  .contact-form-section,
  .contact-map-section,
  .about-section,
  .search-modal {
    padding: 22px;
  }

  th,
  td {
    padding: 13px 14px;
  }
}
