/* CSS Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: clamp(14px, 2.5vw, 16px);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: #08373e;
  background: #ffffff;
  overflow-x: hidden;
}

/* Typography Scale */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: #08373e;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.3;
  color: #08373e;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.4;
  color: #08373e;
}

h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
  color: #08373e;
}

h5 {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  line-height: 1.5;
  color: #08373e;
}

h6 {
  font-size: clamp(0.875rem, 1.5vw, 1.125rem);
  font-weight: 600;
  line-height: 1.5;
  color: #08373e;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1rem;
  word-wrap: break-word;
}

p {
  margin-bottom: 1.5rem;
  color: #0d5c67;
  max-width: 70ch;
  font-size: 1.125rem;
  line-height: 1.8;
}

a {
  color: #0d5c67;
  text-decoration: none;
  transition: all 0.2s ease;
  word-break: break-word;
  border-bottom: 1px solid transparent;
}

a:hover,
a:focus {
  color: #08373e;
  border-bottom-color: #7fc6ce;
  outline: none;
}

a:focus-visible {
  outline: 2px solid #0d5c67;
  outline-offset: 2px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

ul,
ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.75rem;
  word-wrap: break-word;
  color: #0d5c67;
  line-height: 1.7;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #f0f9fa;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(13, 92, 103, 0.1);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 80px;
}

.nav-container > img {
  height: clamp(40px, 6vw, 50px);
  width: auto;
  flex-shrink: 0;
}

/* Desktop Navigation */
.nav-container > div:last-child {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.nav-links {
  display: flex;
}

.nav-links ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2.5rem;
  align-items: center;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  font-weight: 500;
  color: #0d5c67;
  padding: 0.75rem 0;
  position: relative;
  white-space: nowrap;
  transition: all 0.3s ease;
  font-size: 1rem;
  border-bottom: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #7fc6ce;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links a:hover,
.nav-links a:focus {
  color: #08373e;
  border-bottom: none;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

/* CTA Button */
.nav-container > div:last-child > a {
  background: linear-gradient(135deg, #0d5c67 0%, #08373e 100%);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(13, 92, 103, 0.3);
  border: none;
}

.nav-container > div:last-child > a:hover,
.nav-container > div:last-child > a:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 92, 103, 0.4);
  background: linear-gradient(135deg, #08373e 0%, #0d5c67 100%);
  border-bottom: none;
}

.nav-container > div:last-child > a img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Mobile Menu Toggle */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.hamburger-menu:hover,
.hamburger-menu:focus {
  background: #f0f9fa;
  outline: none;
}

.hamburger-menu img {
  width: 28px;
  height: 28px;
  display: block;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #f0f9fa;
  box-shadow: 0 10px 40px rgba(13, 92, 103, 0.15);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.mobile-menu.active {
  display: block;
  max-height: 500px;
}

.mobile-menu ul {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
}

.mobile-menu li {
  margin: 0;
  border-bottom: 1px solid #f0f9fa;
}

.mobile-menu li:last-child {
  border-bottom: none;
}

.mobile-menu a {
  display: block;
  padding: 1.25rem 2rem;
  color: #0d5c67;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  border-bottom: none;
}

.mobile-menu a:hover,
.mobile-menu a:focus {
  background: #f0f9fa;
  color: #08373e;
  padding-left: 2.5rem;
  border-bottom: none;
}

/* Main Content Container */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Article Container */
article {
  max-width: 850px;
  margin: 4rem auto;
  padding: 0 2rem;
  background: white;
}

/* Article Header */
article > header {
  position: static;
  background: none;
  border: none;
  box-shadow: none;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 3px solid #f0f9fa;
  backdrop-filter: none;
  text-align: center;
}

article h1[itemprop="headline"] {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2rem;
  color: #08373e;
  letter-spacing: -0.03em;
  max-width: 15ch;
  margin-left: auto;
  margin-right: auto;
}

/* Article Meta */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: center;
  font-size: 1rem;
  color: #0d5c67;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f0f9fa;
  border-radius: 15px;
  border: 1px solid rgba(127, 198, 206, 0.2);
}

.article-meta > * {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-meta .author a {
  color: #08373e;
  font-weight: 600;
  border-bottom: 1px solid #7fc6ce;
}

.article-meta .author a:hover {
  color: #0d5c67;
  border-bottom-color: #08373e;
}

.article-meta time {
  color: #0d5c67;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.reading-time,
.word-count {
  background: white;
  color: #08373e;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid #7fc6ce;
}

/* Article Content */
article [itemprop="articleBody"] {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #0d5c67;
  max-width: none;
}

article [itemprop="articleBody"] > * {
  margin-bottom: 2rem;
}

article [itemprop="articleBody"] h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  color: #08373e;
  scroll-margin-top: 120px;
  position: relative;
  padding-left: 1rem;
  border-left: 4px solid #7fc6ce;
}

article [itemprop="articleBody"] h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  color: #08373e;
  scroll-margin-top: 120px;
  position: relative;
  padding-left: 0.75rem;
  border-left: 3px solid #7fc6ce;
}

article [itemprop="articleBody"] h4,
article [itemprop="articleBody"] h5,
article [itemprop="articleBody"] h6 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: 120px;
  color: #08373e;
}

article [itemprop="articleBody"] p {
  max-width: none;
  margin-bottom: 2rem;
  text-align: justify;
  hyphens: auto;
}

article [itemprop="articleBody"] ul,
article [itemprop="articleBody"] ol {
  margin-bottom: 2rem;
  padding-left: 2.5rem;
}

article [itemprop="articleBody"] li {
  margin-bottom: 1rem;
  line-height: 1.8;
}

article [itemprop="articleBody"] blockquote {
  border-left: 5px solid #7fc6ce;
  padding: 2rem;
  margin: 3rem 0;
  background: linear-gradient(
    135deg,
    #f0f9fa 0%,
    rgba(127, 198, 206, 0.1) 100%
  );
  border-radius: 0 15px 15px 0;
  font-style: italic;
  color: #08373e;
  font-size: 1.25rem;
  line-height: 1.7;
  position: relative;
}

article [itemprop="articleBody"] blockquote::before {
  content: '"';
  font-size: 4rem;
  color: #7fc6ce;
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  font-family: Georgia, serif;
}

article [itemprop="articleBody"] code {
  background: #f0f9fa;
  color: #08373e;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas,
    monospace;
  font-size: 0.9em;
  font-weight: 600;
  border: 1px solid rgba(127, 198, 206, 0.3);
}

article [itemprop="articleBody"] pre {
  background: linear-gradient(135deg, #08373e 0%, #0d5c67 100%);
  color: #f0f9fa;
  padding: 2rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 3rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: 0 8px 30px rgba(13, 92, 103, 0.3);
}

article [itemprop="articleBody"] pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  border: none;
}

article [itemprop="articleBody"] table {
  width: 100%;
  border-collapse: collapse;
  margin: 3rem 0;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(13, 92, 103, 0.1);
}

article [itemprop="articleBody"] th,
article [itemprop="articleBody"] td {
  border: 1px solid #f0f9fa;
  padding: 1rem 1.5rem;
  text-align: left;
}

article [itemprop="articleBody"] th {
  background: linear-gradient(135deg, #0d5c67 0%, #08373e 100%);
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

article [itemprop="articleBody"] td {
  background: white;
}

article [itemprop="articleBody"] tr:nth-child(even) td {
  background: #f0f9fa;
}

/* Article Footer */
article > footer {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 3px solid #f0f9fa;
}

.article-footer {
  background: linear-gradient(
    135deg,
    #f0f9fa 0%,
    rgba(127, 198, 206, 0.1) 100%
  );
  padding: 3rem;
  border-radius: 20px;
  border: 2px solid rgba(127, 198, 206, 0.3);
  box-shadow: 0 8px 30px rgba(13, 92, 103, 0.1);
  text-align: center;
}

/* Related Articles */
.related-articles-section {
  max-width: 1000px;
  margin: 6rem auto;
  padding: 0 2rem;
}

.related-articles-section h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 3rem;
  color: #08373e;
  text-align: center;
  position: relative;
}

.related-articles-section h2::after {
  content: "";
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #7fc6ce, #0d5c67);
  border-radius: 2px;
}

.related-articles-section ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.related-articles-section li {
  background: white;
  border: 2px solid #f0f9fa;
  border-radius: 20px;
  transition: all 0.4s ease;
  margin: 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(13, 92, 103, 0.1);
  position: relative;
}

.related-articles-section li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7fc6ce, #0d5c67);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.related-articles-section li:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(13, 92, 103, 0.2);
  border-color: #7fc6ce;
}

.related-articles-section li:hover::before {
  transform: scaleX(1);
}

.related-articles-section a {
  display: block;
  padding: 2.5rem;
  color: #0d5c67;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.5;
  transition: color 0.3s ease;
  border-bottom: none;
}

.related-articles-section a:hover,
.related-articles-section a:focus {
  color: #08373e;
  border-bottom: none;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #08373e 0%, #0d5c67 100%);
  color: white;
  margin-top: 8rem;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7fc6ce, #f0f9fa, #7fc6ce);
}

.footer > div:first-child {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
}

.footer > div:first-child > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer img[alt="Harmoni"] {
  height: clamp(45px, 6vw, 55px);
  filter: brightness(0) invert(1);
}

.footer > div:first-child > div:first-child > a {
  background: linear-gradient(135deg, #7fc6ce 0%, #f0f9fa 100%);
  color: #08373e;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.4s ease;
  white-space: nowrap;
  font-size: 1.1rem;
  box-shadow: 0 6px 20px rgba(127, 198, 206, 0.3);
  border: none;
}

.footer > div:first-child > div:first-child > a:hover,
.footer > div:first-child > div:first-child > a:focus {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(127, 198, 206, 0.4);
  background: linear-gradient(135deg, #f0f9fa 0%, #7fc6ce 100%);
  border-bottom: none;
}

.footer > div:first-child > div:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer > div:first-child > div:last-child > div p {
  font-weight: 700;
  color: #f0f9fa;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer > div:first-child > div:last-child ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer > div:first-child > div:last-child li {
  margin-bottom: 1rem;
}

.footer > div:first-child > div:last-child a {
  color: #7fc6ce;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  border-bottom: 1px solid transparent;
}

.footer > div:first-child > div:last-child a:hover,
.footer > div:first-child > div:last-child a:focus {
  color: #f0f9fa;
  padding-left: 0.75rem;
  border-bottom-color: #7fc6ce;
}

.footer hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, #7fc6ce, transparent);
  margin: 3rem 0;
}

.footer > div:last-child {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer > div:last-child a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: rgba(127, 198, 206, 0.2);
  border-radius: 50%;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
}

.footer > div:last-child a:hover,
.footer > div:last-child a:focus {
  background: #7fc6ce;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(127, 198, 206, 0.4);
  border-color: #f0f9fa;
}

.footer > div:last-child img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }

  .nav-container > div:last-child {
    gap: 2rem;
  }

  .nav-links ul {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-container > div:last-child > a {
    display: none;
  }

  .hamburger-menu {
    display: block;
  }

  .nav-container {
    padding: 1rem;
  }

  main {
    padding: 0 1rem;
  }

  article {
    padding: 0 1rem;
    margin: 2rem auto;
  }

  article h1[itemprop="headline"] {
    max-width: none;
    text-align: left;
  }

  article > header {
    text-align: left;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
  }

  .footer > div:first-child {
    padding: 3rem 1rem 2rem;
  }

  .footer > div:first-child > div:first-child {
    flex-direction: column;
    text-align: center;
  }

  .footer > div:first-child > div:last-child {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .footer > div:last-child {
    padding: 0 1rem 3rem;
    gap: 1.5rem;
  }

  .footer > div:last-child a {
    width: 50px;
    height: 50px;
  }

  .footer > div:last-child img {
    width: 20px;
    height: 20px;
  }

  .related-articles-section {
    padding: 0 1rem;
    margin: 4rem auto;
  }

  .related-articles-section ul {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .related-articles-section a {
    padding: 2rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  article [itemprop="articleBody"] {
    font-size: 1.1rem;
  }

  .mobile-menu a {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  .mobile-menu a:hover,
  .mobile-menu a:focus {
    padding-left: 2rem;
  }

  article [itemprop="articleBody"] h2 {
    margin-top: 3rem;
  }

  article [itemprop="articleBody"] h3 {
    margin-top: 2.5rem;
  }

  .article-footer {
    padding: 2rem;
  }
}

/* Focus and Accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #7fc6ce;
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print Styles */
@media print {
  header,
  .mobile-menu,
  .related-articles-section,
  .footer {
    display: none !important;
  }

  article {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
