* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: #252525;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

a {
  text-decoration: none;
}

.container {
  width: min(1120px, 92%);
  margin: auto;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #eeeeee;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-container {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo {
  color: #222222;
  font-size: 23px;
  font-weight: 800;
}

.logo span,
.hero h1 span {
  color: #198754;
}

nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

nav a {
  color: #444444;
  font-size: 14px;
  font-weight: 600;
}

nav a:hover {
  color: #198754;
}

.hero {
  padding-top: 90px;
  padding-bottom: 90px;
}

.hero-content {
  max-width: 680px;
}

.eyebrow {
  color: #198754;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}

.hero h1 {
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.12;
  margin: 18px 0;
}

.hero p {
  color: #666666;
  font-size: 18px;
  max-width: 520px;
  margin-bottom: 30px;
}

.primary-button,
.details-button {
  display: inline-block;
  background: #198754;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
}

.primary-button:hover,
.details-button:hover {
  background: #146c43;
}

.recipes-section {
  padding-top: 35px;
  padding-bottom: 85px;
}

.section-heading {
  text-align: center;
  margin-bottom: 38px;
}

.section-heading h2 {
  font-size: 34px;
  margin: 8px 0;
}

.section-heading p {
  color: #777777;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

.recipe-card {
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.045);
}

.recipe-image {
  height: 210px;
  background: #f5f7f5;
}

.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-content {
  padding: 20px;
}

.category {
  color: #198754;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.recipe-content h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 10px 0;
}

.recipe-content p {
  color: #777777;
  font-size: 14px;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #555555;
  font-size: 12px;
  margin: 18px 0;
}

.details-button {
  width: 100%;
  text-align: center;
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid #eeeeee;
  text-align: center;
  padding: 25px 0;
  color: #777777;
  font-size: 13px;
}

@media (max-width: 800px) {
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-container {
    padding: 15px 0;
    flex-direction: column;
  }
}

@media (max-width: 550px) {
  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 65px;
    padding-bottom: 60px;
  }

  .hero h1 {
    font-size: 42px;
  }

  nav {
    justify-content: center;
    gap: 16px;
  }
}

/* RECIPE DETAILS PAGE */

.recipe-details {
  padding-top: 35px;
  padding-bottom: 70px;
}

.back-link {
  display: inline-block;
  color: #198754;
  font-weight: 700;
  margin-bottom: 25px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  align-items: center;
}

.detail-image {
  height: 380px;
  background: #f5f7f5;
  border-radius: 16px;
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-content h1 {
  font-size: 36px;
  line-height: 1.2;
}

.detail-content > p {
  color: #666666;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 25px;
}

.nutrition-grid div {
  background: #f8faf8;
  border: 1px solid #eeeeee;
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
}

.nutrition-grid strong,
.nutrition-grid span {
  display: block;
}

.nutrition-grid strong {
  color: #198754;
  font-size: 19px;
}

.nutrition-grid span {
  color: #666666;
  font-size: 11px;
}

.detail-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 45px;
}

.detail-panel {
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 14px;
  padding: 24px;
}

.detail-panel h2 {
  color: #198754;
  font-size: 23px;
}

.detail-panel li {
  padding: 7px 0;
  color: #555555;
}

.detail-panel:last-child {
  grid-column: 1 / -1;
}

@media (max-width: 700px) {
  .detail-layout,
  .detail-sections {
    grid-template-columns: 1fr;
  }

  .detail-image {
    height: 250px;
  }

  .detail-content h1 {
    font-size: 29px;
  }

  .detail-panel:last-child {
    grid-column: auto;
  }
}

/* Hero search bar */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hero-actions .primary-button {
  margin-top: 0;
}

.hero-search {
  width: 230px;
  max-width: 100%;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #ffffff;
  color: #222222;
  font-size: 14px;
  outline: none;
}

.hero-search:focus {
  border-color: #198754;
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: #777777;
  padding: 30px 10px;
}

@media (max-width: 600px) {
  .hero-actions {
    align-items: stretch;
  }

  .hero-search {
    width: 100%;
  }
}

/* Recipe category filters */
.recipe-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 25px 0;
}

.filter-button {
  padding: 10px 18px;
  border: 1px solid #dce5df;
  border-radius: 25px;
  background: #ffffff;
  color: #333333;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s ease;
}

.filter-button:hover,
.filter-button.active {
  background: #198754;
  border-color: #198754;
  color: #ffffff;
}

@media (max-width: 600px) {
  .recipe-filters {
    justify-content: flex-start;
    gap: 8px;
  }

  .filter-button {
    padding: 9px 13px;
    font-size: 13px;
  }
}

/* LANGUAGE SELECTOR */
.language-select {
  padding: 10px 12px;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #ffffff;
  color: #222222;
  font-size: 14px;
  cursor: pointer;
  max-width: 100%;
}

.language-select:focus {
  outline: 2px solid #198754;
  outline-offset: 2px;
}


/* RECIPE FEATURES */
.recipe-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 24px;
}

.filter-toggle,
.favorite-button,
.share-button {
  border: 1px solid #198754;
  background: #ffffff;
  color: #198754;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}

.filter-toggle.active,
.favorite-button:hover,
.share-button:hover {
  background: #198754;
  color: #ffffff;
}

.recipe-content .favorite-button {
  width: 100%;
  margin-bottom: 10px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.related-section {
  margin-top: 48px;
}

.related-section h2 {
  margin-bottom: 20px;
  font-size: 26px;
}

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

.related-card {
  border: 1px solid #eeeeee;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.related-card a {
  color: #252525;
}

.related-card img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.related-card h3 {
  padding: 12px;
  margin: 0;
  font-size: 16px;
}

@media (max-width: 600px) {
  .related-grid {
    grid-template-columns: 1fr;
  }

  .related-card img {
    height: 190px;
  }
}


/* Static information pages */
.page-content {
  max-width: 900px;
  margin: 40px auto;
  padding: 28px;
  background: #fff;
  border-radius: 14px;
  line-height: 1.8;
}
.page-content h1, .page-content h2 { color: #198754; }
.page-content li { margin: 8px 0; }
.language-select {
  padding: 8px 10px;
  border: 1px solid #198754;
  border-radius: 8px;
  background: #fff;
  color: #222;
  max-width: 150px;
}
html[dir="rtl"] .page-content { text-align: right; }
@media (max-width: 600px) {
  .page-content { margin: 20px auto; padding: 18px; }
  .nav-links { flex-wrap: wrap; }
}


/* Responsive recipe photo gallery */
.gallery-section { padding: 35px 0; overflow: hidden; }
.gallery-shell { display:flex; align-items:center; gap:12px; }
.gallery-window { overflow:hidden; flex:1; min-width:0; }
.gallery-track { display:flex; gap:16px; transition:transform .55s ease; will-change:transform; }
.gallery-slide { flex:0 0 calc((100% - 32px) / 3); min-width:0; }
.gallery-slide img { display:block; width:100%; height:230px; object-fit:cover; border-radius:14px; }
.gallery-slide h3 { font-size:15px; margin:10px 3px; color:#222; }
.gallery-arrow { flex:0 0 40px; width:40px; height:40px; border:0; border-radius:50%; background:#198754; color:white; font-size:20px; cursor:pointer; }
.gallery-arrow:hover { background:#146c43; }
.gallery-count { text-align:center; color:#666; font-size:13px; margin-top:12px; }
@media(max-width:700px) {
  .gallery-section { padding:24px 0; }
  .gallery-shell { gap:6px; }
  .gallery-slide { flex-basis:85%; }
  .gallery-slide img { height:210px; }
  .gallery-arrow { flex-basis:34px; width:34px; height:34px; font-size:17px; }
}
@media(prefers-reduced-motion:reduce) {
  .gallery-track { transition:none; }
}
