/* ============================================
   BudemFit.sk Theme - Health & Fitness
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1a1a2e;
  background-color: #fafafa;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: #0ea5e9;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #0284c7;
}

ul, ol {
  list-style: none;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  flex: 1;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #1a1a2e;
  font-weight: 700;
  font-size: 1.25rem;
}

.site-logo:hover {
  color: #22c55e;
}

.logo-image {
  height: 36px;
  width: auto;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Navigation */
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.875rem;
  color: #374151;
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
  color: #22c55e;
  background-color: #f0fdf4;
}

/* Dropdown */
.has-submenu {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  z-index: 110;
}

.has-submenu:hover .submenu {
  display: block;
}

.submenu-link {
  display: block;
  padding: 0.5rem 1rem;
  color: #374151;
  font-size: 0.875rem;
  transition: background-color 0.15s, color 0.15s;
}

.submenu-link:hover {
  color: #22c55e;
  background-color: #f0fdf4;
}

/* Hamburger */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
  background-color: #f3f4f6;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: #374151;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #0ea5e9 100%);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Section --- */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #1a1a2e;
  letter-spacing: -0.01em;
}

/* --- Articles Grid --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* --- Article Card --- */
.article-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.card-image-link {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #e5e7eb;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-card:hover .card-image {
  transform: scale(1.05);
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #22c55e;
  margin-bottom: 0.5rem;
}

.card-category:hover {
  color: #16a34a;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.card-title a {
  color: #1a1a2e;
}

.card-title a:hover {
  color: #22c55e;
}

.card-excerpt {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #9ca3af;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
}

.read-more {
  color: #22c55e;
  font-weight: 600;
  font-size: 0.8125rem;
}

.read-more:hover {
  color: #16a34a;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 1.5rem 0 1rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin-right: 0.25rem;
  color: #d1d5db;
}

.breadcrumb-item a {
  color: #6b7280;
}

.breadcrumb-item a:hover {
  color: #22c55e;
}

.breadcrumb-item.active {
  color: #374151;
  font-weight: 500;
}

/* --- Article Detail --- */
.article-detail {
  padding-bottom: 3rem;
}

.article-hero-image {
  margin: 0 -1rem 2rem;
  border-radius: 12px;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
}

.article-header {
  margin-bottom: 2rem;
  max-width: 720px;
}

.article-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: #1a1a2e;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.meta-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #f0fdf4;
  color: #22c55e;
  font-weight: 600;
  font-size: 0.8125rem;
  border-radius: 9999px;
}

.meta-category:hover {
  background-color: #dcfce7;
  color: #16a34a;
}

.meta-date {
  color: #6b7280;
}

/* Article Content Typography */
.article-content {
  max-width: 720px;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #374151;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: #1a1a2e;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: #1a1a2e;
}

.article-content h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: #1a1a2e;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 0.375rem;
}

.article-content blockquote {
  border-left: 4px solid #22c55e;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background-color: #f0fdf4;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #374151;
}

.article-content pre {
  background-color: #1a1a2e;
  color: #e5e7eb;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.article-content code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875em;
}

.article-content p code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.875em;
}

.article-content img {
  border-radius: 8px;
  margin: 1.5rem 0;
}

.article-content a {
  color: #0ea5e9;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: #0284c7;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.article-content th,
.article-content td {
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.article-content th {
  background-color: #f9fafb;
  font-weight: 600;
}

.article-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* Embedded content (iframes, YouTube, Twitter) */
.article-content iframe {
  max-width: 100%;
  border: none;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.article-content .iframe-wrapper,
.article-content .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  border-radius: 8px;
}

.article-content .iframe-wrapper iframe,
.article-content .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.article-content .twitter-tweet {
  margin: 1.5rem auto !important;
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #e5e7eb;
  max-width: 720px;
}

.tags-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
}

.tag-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background-color: #f3f4f6;
  color: #374151;
  font-size: 0.8125rem;
  border-radius: 9999px;
  transition: background-color 0.15s;
}

.tag-badge:hover {
  background-color: #e5e7eb;
}

/* --- Category Page --- */
.category-header {
  margin-bottom: 2rem;
}

.category-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.category-description {
  font-size: 1.0625rem;
  color: #6b7280;
  max-width: 600px;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  transition: background-color 0.2s, color 0.2s;
}

.pagination-link:not(.disabled) {
  background-color: #22c55e;
  color: #fff;
}

.pagination-link:not(.disabled):hover {
  background-color: #16a34a;
  color: #fff;
}

.pagination-link.disabled {
  color: #d1d5db;
  cursor: default;
}

.pagination-info {
  font-size: 0.875rem;
  color: #6b7280;
}

/* --- 404 Error Page --- */
.error-page {
  padding: 5rem 0;
}

.error-container {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  color: #d1d5db;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1a1a2e;
}

.error-message {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: #22c55e;
  color: #fff;
}

.btn-primary:hover {
  background-color: #16a34a;
  color: #fff;
}

/* --- Footer --- */
.site-footer {
  background-color: #1a1a2e;
  color: #d1d5db;
  margin-top: auto;
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  grid-column: 1 / 2;
}

.footer-logo {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-logo:hover {
  color: #22c55e;
}

.footer-description {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #9ca3af;
  line-height: 1.6;
  max-width: 360px;
}

.footer-nav {
  grid-column: 2 / 3;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e5e7eb;
  margin-bottom: 0.75rem;
}

.footer-links li + li {
  margin-top: 0.375rem;
}

.footer-links a {
  color: #9ca3af;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #22c55e;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid #2d2d44;
  font-size: 0.8125rem;
}

.copyright {
  color: #9ca3af;
}

.powered-by {
  color: #6b7280;
  font-size: 0.75rem;
}

/* --- No Content --- */
.no-content {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
  font-size: 1.0625rem;
}

/* --- Related Articles --- */
.related-articles {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e5e7eb;
}

.related-articles-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #1a1a2e;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* --- Personalized Articles --- */
.personalized-articles {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 2px solid #22c55e;
}

.personalized-articles-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #16a34a;
}

.personalized-articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* --- Vertex AI Articles --- */
.vertex-articles {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 2px solid #8b5cf6;
}

.vertex-articles-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #7c3aed;
}

.vertex-articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* ============================================
   Responsive
   ============================================ */

/* Tablet: 640px - 1024px */
@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .related-articles-grid,
  .personalized-articles-grid,
  .vertex-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .article-title {
    font-size: 1.875rem;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile: < 640px */
@media (max-width: 639px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 1rem;
  }

  .main-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
  }

  .has-submenu .submenu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    min-width: auto;
  }

  .submenu-link {
    padding: 0.5rem 1rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .related-articles-grid,
  .personalized-articles-grid,
  .vertex-articles-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

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

  .section {
    padding: 2rem 0;
  }

  .section-title {
    font-size: 1.375rem;
    margin-bottom: 1.5rem;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .article-content {
    font-size: 1rem;
  }

  .article-hero-image {
    margin: 0 -1rem 1.5rem;
    border-radius: 0;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .pagination {
    flex-direction: column;
    gap: 0.75rem;
  }

  .pagination-link {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .breadcrumb-list {
    font-size: 0.8125rem;
  }

  .category-title {
    font-size: 1.5rem;
  }

  .error-code {
    font-size: 4rem;
  }

  /* Responsive embeds on mobile */
  .article-content iframe {
    width: 100%;
    height: auto;
    min-height: 200px;
  }
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .breadcrumb,
  .article-tags,
  .pagination {
    display: none;
  }

  .article-content {
    max-width: 100%;
  }

  body {
    background: #fff;
  }
}
