/*
Theme Name: Siegoi
Theme URI: https://www.siegoi.it/
Author: Local Project
Author URI: https://www.siegoi.it/
Description: Tema WordPress moderno e minimalista per Trattoria Ai Siegoi.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: siegoi
*/

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #1f1f1f;
  --muted: #616161;
  --brand: #8c2f1d;
  --brand-dark: #5f1f13;
  --border: #e8e1d8;
  --radius: 14px;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
  --container: 1120px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

.siegoi-container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

.screen-reader-text:focus {
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  background: #fff;
  color: #000;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(250, 247, 242, 0.85);
  border-bottom: 1px solid var(--border);
  overflow: visible;
}

.header-top {
  font-size: 0.88rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.header-top .siegoi-container {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.header-top__sep {
  margin: 0 0.4rem;
}

.header-top__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.header-top__phone:hover {
  color: var(--brand-dark);
}

.header-top__phone svg {
  flex-shrink: 0;
}

.header-main .siegoi-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.9rem 0;
  position: relative;
  min-height: 118px;
  padding-left: 320px;
}

.site-branding {
  position: absolute;
  left: 0;
  top: 10px;
  z-index: 40;
}

.site-branding .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.floating-logo-link {
  display: inline-flex;
  align-items: center;
}

.site-branding .custom-logo {
  max-height: 114px;
  width: auto;
}

.site-title {
  margin: 0;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.main-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.main-navigation li {
  position: relative;
}

.main-navigation .sub-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  box-shadow: var(--shadow);
  padding: 0.4rem;
  display: none;
  z-index: 20;
}

.main-navigation .sub-menu li {
  width: 100%;
}

.main-navigation .sub-menu a {
  width: 100%;
  border-radius: 0.45rem;
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
  display: block;
}

.main-navigation a {
  display: inline-block;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  font-weight: 500;
  color: #3a3a3a;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  background: #f1e8dd;
  color: var(--brand-dark);
}

.menu-toggle {
  display: none;
  border: 0;
  background: #f1e8dd;
  color: var(--brand-dark);
  border-radius: 0.6rem;
  padding: 0.55rem 0.75rem;
  font-weight: 700;
}

.hero {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) 0 clamp(4rem, 8vw, 6rem);
  color: #fff;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  will-change: opacity;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, rgba(15, 8, 5, 0.62) 0%, rgba(15, 8, 5, 0.4) 40%, rgba(15, 8, 5, 0.1) 100%),
    linear-gradient(to top, rgba(15, 8, 5, 0.4) 0%, transparent 35%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-dots {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}

.hero-dot.is-active,
.hero-dot:hover {
  background: #fff;
  border-color: #fff;
}

.hero-copy {
  max-width: 740px;
}

.hero-site-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 12px rgba(0, 0, 0, 0.4);
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-copy p {
  margin: 0 0 1.35rem;
  color: #fff;
  max-width: 45ch;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 0 14px rgba(0, 0, 0, 0.35);
}

.hero-badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.hero-badge--stars {
  background: rgba(255, 193, 7, 0.2);
  color: #ffd54f;
  border: 1px solid rgba(255, 193, 7, 0.35);
}

.hero-badge--stars svg {
  color: #ffc107;
}

.hero-badge--price {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font-weight: 600;
}

.button-primary {
  background: var(--brand);
  color: #fff;
}

.button-primary:hover {
  background: var(--brand-dark);
}

.button-lg {
  padding: 0.9rem 1.6rem;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.image-placeholder {
  width: 100%;
  min-height: 220px;
  border-radius: calc(var(--radius) - 4px);
  border: 1px dashed rgba(255, 255, 255, 0.65);
  padding: 1.1rem;
  display: grid;
  align-content: center;
  gap: 0.35rem;
  color: #fff;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.image-placeholder__label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.image-placeholder__size {
  font-size: 0.98rem;
  font-weight: 600;
}

.image-placeholder__hint {
  font-size: 0.83rem;
  opacity: 0.95;
}

.image-placeholder--hero {
  min-height: 360px;
  background: linear-gradient(135deg, #8c2f1d 0%, #bf5a33 55%, #e6a96f 100%);
}

.image-placeholder--warm {
  min-height: 280px;
  background: linear-gradient(135deg, #6d2518 0%, #ab4c2f 65%, #e1ae7a 100%);
}

.image-placeholder--light {
  min-height: 280px;
  color: #3b2a20;
  border-color: #d5ba9f;
  background: linear-gradient(140deg, #f8ebda 0%, #edd9bf 100%);
}

.image-placeholder--brand {
  min-height: 280px;
  background: linear-gradient(130deg, #7f2a1b 0%, #8c2f1d 45%, #cf7e4f 100%);
}

.image-placeholder--dark {
  min-height: 280px;
  background: linear-gradient(135deg, #2f2622 0%, #5f3a2b 50%, #a06445 100%);
}

.image-placeholder--map {
  min-height: 220px;
  margin-top: 1rem;
  background: linear-gradient(135deg, #8c2f1d 0%, #b86b46 55%, #e8d8be 100%);
}

.placeholder-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-photo {
  padding: 0.65rem;
  margin: 0;
}

.gallery-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius) - 8px);
}

.gallery-photo figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.55rem;
}

.section-map .siegoi-container {
  width: 100%;
  max-width: none;
}

.section-map {
  padding-bottom: 0;
}

.map-card {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.4rem clamp(1.25rem, 5vw, 5.5rem);
}

.map-embed {
  margin-top: 1rem;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-embed iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
}

.map-info {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  background: #f9f4ed;
}

.map-info p {
  margin: 0 0 0.5rem;
  color: #43342b;
}

.map-info .button {
  margin-top: 0.35rem;
}

.section {
  padding: clamp(2.8rem, 6vw, 4.6rem) 0;
}

.section-title {
  margin: 0 0 1.1rem;
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  line-height: 1.2;
}

.section-intro {
  color: var(--muted);
  margin: 0 0 1.7rem;
}

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

.speciality-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius) - 8px);
  margin-bottom: 0.85rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

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

.card h3 {
  margin: 0.2rem 0 0.55rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.split .card {
  height: 100%;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer {
  margin-top: 0;
  border-top: 1px solid var(--border);
  background: #3b2a20;
  color: #e8ddd0;
}

.site-footer .siegoi-container {
  padding: 2.4rem 0 1.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-info h3 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.footer-info p {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: #c9bba8;
  line-height: 1.5;
}

.footer-info a {
  color: #e8ddd0;
  text-decoration: underline;
  text-decoration-color: rgba(232, 221, 208, 0.3);
  text-underline-offset: 2px;
}

.footer-info a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.1rem;
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-note {
  margin: 0;
  color: #9a8b78;
  font-size: 0.85rem;
}

.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.site-footer nav a {
  display: inline-block;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  color: #c9bba8;
  font-size: 0.85rem;
}

.site-footer nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.post-card h2,
.post-card h3 {
  margin-top: 0;
  line-height: 1.25;
}

.entry-content {
  max-width: 75ch;
}

/* Reviews section */
.section-reviews {
  background: #f5efe7;
}

.reviews-platforms {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.review-platform {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.25s, border-color 0.25s;
  flex: 1;
  min-width: 180px;
}

.review-platform:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(140, 47, 29, 0.1);
}

.review-platform__info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.review-platform__rating {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.review-platform__max {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

.review-platform__stars {
  display: flex;
  gap: 1px;
}

.review-platform__count {
  font-size: 0.8rem;
  color: var(--muted);
}

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

.review-card {
  margin: 0;
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.review-card__stars {
  display: flex;
  gap: 2px;
}

.review-card__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #43342b;
  flex: 1;
}

.review-card__author {
  font-size: 0.82rem;
  color: var(--muted);
}

.review-card__author strong {
  color: var(--text);
  font-weight: 600;
}

.review-card__author span {
  color: var(--muted);
}

.review-card {
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.review-platform {
  transition: box-shadow 0.25s ease-out, border-color 0.25s ease-out, transform 0.2s ease-out;
}

.review-platform:hover {
  transform: translateY(-1px);
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.contact-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f5efe7;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.contact-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.contact-card a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: rgba(140, 47, 29, 0.3);
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.contact-card a:hover {
  color: var(--brand-dark);
  text-decoration-color: var(--brand-dark);
}

.contact-card__link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.contact-cta {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.contact-social {
  text-align: center;
  padding: 1.5rem 0;
}

.contact-social h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-social__links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-social__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.contact-social__link:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(140, 47, 29, 0.1);
  transform: translateY(-1px);
}

/* Page header */
.page-header {
  margin-bottom: 1.5rem;
}

/* Footer social links */
.footer-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #c9bba8;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
}

.footer-social__link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Fade-in scroll animation */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .grid-3,
  .split {
    grid-template-columns: 1fr;
  }

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

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

  .placeholder-gallery {
    grid-template-columns: 1fr;
  }

  .header-main .siegoi-container {
    min-height: 98px;
    padding-left: 260px;
  }

  .site-branding .custom-logo {
    max-height: 96px;
  }

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

@media (max-width: 840px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-navigation {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    width: 100%;
    transition: max-height 0.4s ease, opacity 0.3s ease;
  }

  .main-navigation.is-open {
    max-height: 600px;
    opacity: 1;
  }

  .header-main .siegoi-container {
    flex-wrap: wrap;
    padding-left: 0;
    min-height: 0;
  }

  .site-branding {
    position: static;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 0.45rem;
  }

  .site-branding .custom-logo {
    max-height: 78px;
  }

  .main-navigation ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.5rem 0 0;
  }

  .main-navigation .sub-menu {
    position: static;
    display: block;
    margin-left: 0.5rem;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    padding: 0.2rem 0 0.2rem 0.6rem;
    min-width: 0;
  }

  .main-navigation a {
    border-radius: 0.6rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    min-height: 440px;
  }

  .hero-badges {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .reviews-platforms {
    flex-direction: column;
  }

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

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-slide {
    transition: none;
  }

  .card,
  .review-card,
  .review-platform,
  .contact-card,
  .contact-social__link {
    transition: none;
  }

  .card:hover,
  .review-card:hover,
  .contact-card:hover {
    transform: none;
  }
}
