/* ==========================================================================
   Les Joly Delices — stylesheet
   ========================================================================== */

:root {
  --cream: #fbf3e7;
  --cream-dark: #f2e3cd;
  --pink: #eeb4bb;
  --pink-dark: #e08b96;
  --brown: #6b4226;
  --brown-dark: #3d2b1f;
  --gold: #c9973b;
  --white: #ffffff;
  --text: #4a382c;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(61, 43, 31, 0.08);
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Poppins", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--brown-dark);
  margin: 0 0 0.5em;
  line-height: 1.2;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--pink-dark);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(224, 139, 150, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--brown-dark);
  border: 2px solid var(--brown-dark);
}

.btn-outline:hover {
  background: var(--brown-dark);
  color: var(--white);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pink-dark);
}

.section {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-title h2 {
  font-size: 2.2rem;
}

.section-title p {
  color: var(--brown);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 243, 231, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--cream-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brown-dark);
}

.logo span {
  color: var(--pink-dark);
  font-style: italic;
}

.main-nav ul {
  display: flex;
  gap: 32px;
  align-items: center;
}

.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.main-nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--pink-dark);
  transition: width 0.2s ease;
}

.main-nav > ul > li > a:hover::after,
.main-nav > ul > li.active > a::after {
  width: 100%;
}

.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 130%;
  left: 0;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 220px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.dropdown li a:hover {
  background: var(--cream);
  color: var(--pink-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--brown-dark);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 60px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: 3rem;
  margin: 14px 0 20px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--brown);
  margin-bottom: 30px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  background: linear-gradient(135deg, var(--pink) 0%, var(--gold) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6.5rem;
  box-shadow: var(--shadow);
}

/* ---------- Photo placeholders ---------- */
.photo-placeholder {
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--white);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.cat-dolci { background: linear-gradient(135deg, #f6c6cf, #e08b96); }
.cat-biscotti { background: linear-gradient(135deg, #e8c07a, #c9973b); }
.cat-torte { background: linear-gradient(135deg, #c99a7c, #6b4226); }
.cat-lievitati { background: linear-gradient(135deg, #f0d9a8, #d9a55c); }

.recipe-photo-large {
  aspect-ratio: 16 / 9;
  font-size: 5rem;
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 32px;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card-body {
  padding: 20px 22px 24px;
}

.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.card-body p {
  font-size: 0.92rem;
  color: var(--brown);
  margin: 0 0 14px;
}

.card-meta {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--pink-dark);
  font-weight: 600;
}

.category-card {
  text-align: center;
  padding: 34px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card .photo-placeholder {
  width: 90px;
  height: 90px;
  aspect-ratio: auto;
  border-radius: 50%;
  margin: 0 auto 18px;
  font-size: 2.2rem;
}

.category-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.category-card p {
  font-size: 0.85rem;
  color: var(--brown);
  margin: 0;
}

/* ---------- Filters (ricette.html) ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 44px;
}

.filter-btn {
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid var(--cream-dark);
  background: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--brown);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--pink-dark);
}

.filter-btn.active {
  background: var(--brown-dark);
  border-color: var(--brown-dark);
  color: var(--white);
}

/* ---------- Recipe detail ---------- */
.recipe-hero {
  padding: 40px 0 20px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--brown);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--pink-dark);
  font-weight: 600;
}

.recipe-title {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.recipe-intro {
  color: var(--brown);
  max-width: 700px;
  margin-bottom: 24px;
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
  margin-bottom: 40px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-item span.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pink-dark);
  font-weight: 700;
}

.meta-item span.value {
  font-weight: 600;
  color: var(--brown-dark);
}

.recipe-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 50px;
  align-items: start;
}

.ingredients-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 100px;
}

.ingredients-box h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.ingredients-box ul li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--cream-dark);
  font-size: 0.92rem;
}

.ingredients-box ul li:last-child {
  border-bottom: none;
}

.ingredients-box .qty {
  font-weight: 600;
  color: var(--pink-dark);
  white-space: nowrap;
}

.steps ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 54px;
  margin-bottom: 26px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--pink-dark);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tip-box {
  margin-top: 30px;
  background: var(--cream-dark);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 20px 24px;
}

.tip-box h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

/* ---------- About page ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 50px;
  align-items: center;
}

.about-photo {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  font-size: 5rem;
}

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.value-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.value-item h4 {
  font-size: 1.05rem;
}

/* ---------- Contact page ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--cream-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--cream);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-note {
  font-size: 0.8rem;
  color: var(--brown);
  margin-top: 10px;
}

.contact-info h3 {
  margin-top: 28px;
}

.contact-info h3:first-child {
  margin-top: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown-dark);
  color: var(--cream);
  padding: 60px 0 24px;
  margin-top: 60px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: var(--cream);
}

.footer-brand .logo span {
  color: var(--pink);
}

.footer-brand p {
  color: #cbb8a6;
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
}

.footer-links h4,
.footer-social h4 {
  color: var(--cream);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cbb8a6;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--pink);
}

.social-icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-icons a {
  padding: 8px 16px;
  border: 1px solid #6b573f;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--cream);
}

.social-icons a:hover {
  background: var(--pink-dark);
  border-color: var(--pink-dark);
}

.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: #a78e77;
  border-top: 1px solid #6b573f;
  padding-top: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner,
  .about-inner,
  .contact-inner,
  .recipe-content {
    grid-template-columns: 1fr;
  }

  .ingredients-box {
    position: static;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.open {
    max-height: 480px;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 24px 20px;
  }

  .main-nav li {
    border-bottom: 1px solid var(--cream-dark);
  }

  .main-nav li a {
    display: block;
    padding: 14px 0;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    display: none;
    padding: 0 0 10px 12px;
  }

  .has-dropdown.open .dropdown {
    display: block;
  }

  .nav-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .grid-4,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
