/* ============================================
   SUPERMERCATO ARNOLFO — Main Stylesheet
   ============================================ */

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

:root {
  --green: #1a7a3a;
  --green-dark: #145e2c;
  --green-light: #e8f5ec;
  --green-50: #f0faf3;
  --red: #d42027;
  --red-light: #fef2f2;
  --warm: #faf8f5;
  --warm-dark: #f3efe8;
  --text: #1a1a1a;
  --text-light: #5a5a5a;
  --text-muted: #8a8a8a;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.15);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* --- Section --- */
.section { padding: 100px 0; }
.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}
.section-header { text-align: center; max-width: 640px; margin: 0 auto 60px; }
.section-header h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; margin-bottom: 16px; font-weight: 600; }
.section-header h2 strong { color: var(--green); }
.section-desc { color: var(--text-light); font-size: 1.05rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border: 2px solid rgba(255,255,255,.5);
  backdrop-filter: blur(4px);
}
.btn-outline:hover { background: rgba(255,255,255,.25); border-color: var(--white); }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  padding: 10px 0;
  box-shadow: var(--shadow-sm);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 40px; height: 40px;
  background: var(--green);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 800;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
}
.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  transition: var(--transition);
}
.navbar.scrolled .logo-text { color: var(--text); }
.logo-sub { display: block; font-size: .65rem; font-weight: 500; opacity: .7; letter-spacing: .02em; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-menu a {
  padding: 8px 16px;
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  border-radius: 8px;
  transition: var(--transition);
}
.navbar.scrolled .nav-menu a { color: var(--text-light); }
.nav-menu a:hover { color: var(--white); background: rgba(255,255,255,.1); }
.navbar.scrolled .nav-menu a:hover { color: var(--text); background: var(--green-light); }

.nav-cta {
  background: var(--green) !important;
  color: var(--white) !important;
  padding: 8px 20px !important;
  border-radius: 50px !important;
}
.nav-cta:hover { background: var(--green-dark) !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.navbar.scrolled .nav-toggle span { background: var(--text); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.35) 40%,
    rgba(0,0,0,.5) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
  max-width: 700px;
}
.hero-tag {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 16px;
}
.hero-content h1 {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero-content h1 strong { font-weight: 800; }
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  opacity: .9;
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--white);
  opacity: .6;
  animation: bounce 2s ease infinite;
  transition: var(--transition);
}
.hero-scroll:hover { opacity: 1; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   ABOUT
   ============================================ */
.section-about { background: var(--warm); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-images { position: relative; }
.about-images > img:first-child {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.about-img-secondary {
  position: absolute;
  bottom: -30px; right: -20px;
  width: 65%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  border: 4px solid var(--white);
}
.about-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 600;
}
.about-text h2 strong { color: var(--green); }
.about-text p { color: var(--text-light); margin-bottom: 16px; font-size: 1.02rem; }
.about-text p strong { color: var(--text); font-weight: 600; }

.about-stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.stat { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 800; color: var(--green); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 4px; display: block; }

/* ============================================
   DEPARTMENTS
   ============================================ */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.dept-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
  cursor: pointer;
}
.dept-card-large {
  grid-column: span 1;
  aspect-ratio: 4/3;
}
.dept-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.dept-card:hover img { transform: scale(1.06); }
.dept-card-content {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.1) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: var(--white);
  transition: var(--transition);
}
.dept-card:hover .dept-card-content { background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.2) 60%, transparent 100%); }
.dept-card-content h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.dept-card-content p { font-size: .85rem; opacity: .85; line-height: 1.4; }

/* ============================================
   SERVICES
   ============================================ */
.section-services { background: var(--green-50); padding: 80px 0; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--white);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-icon {
  width: 56px; height: 56px;
  background: var(--green-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--green);
}
.service-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.service-card p { font-size: .88rem; color: var(--text-light); line-height: 1.5; }

/* ============================================
   PAYMENTS
   ============================================ */
.section-payments {
  background: #141816;
  color: var(--white);
}
.section-payments .section-label { color: #8bd19b; }
.section-payments .section-header h2 strong { color: #8bd19b; }
.section-payments .section-desc { color: rgba(255,255,255,.72); }

.payment-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.payment-logo-card {
  min-width: 0;
  min-height: 160px;
  padding: 24px 22px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.payment-logo-card img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: 58px;
  margin: 0 auto;
  object-fit: contain;
}
.payment-logo-card img[alt="Edenred"],
.payment-logo-card img[alt="Buonopasti.it"] {
  max-height: 76px;
}
.payment-logo-card img[alt="Welfare Pellegrini"] {
  max-height: 92px;
}
.payment-logo-card img[alt="Satispay Buoni Pasto"] {
  max-height: 44px;
}
.payment-logo-card img[alt="Toduba"] {
  max-height: 52px;
}
.payment-note {
  margin-top: 24px;
  text-align: center;
  color: rgba(255,255,255,.65);
  font-size: .92rem;
}

/* ============================================
   HOURS & MAP
   ============================================ */
.section-hours { background: var(--warm); }

.hours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}
.hours-info h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 28px;
  font-weight: 600;
}
.hours-info h2 strong { color: var(--green); }

.hours-address {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--text-light);
}
.hours-address svg { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.hours-address strong { color: var(--text); }

.hours-table {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: .95rem;
}
.hours-row:not(:last-child) { border-bottom: 1px solid rgba(0,0,0,.06); }
.hours-time { font-weight: 700; color: var(--green); }

.hours-contact { margin-bottom: 24px; }
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
}
.contact-item:hover { color: var(--green); }
.contact-item svg { color: var(--green); }

.hours-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 400px;
  background: var(--warm-dark);
}
.hours-map iframe { width: 100%; height: 100%; min-height: 400px; }

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.gallery-item-wide {
  grid-column: span 2;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.gallery-item:hover img { transform: scale(1.04); }

/* ============================================
   CONTACT
   ============================================ */
.section-contact { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.contact-info h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 16px;
  font-weight: 600;
}
.contact-info h2 strong { color: var(--green); }
.contact-info > p { color: var(--text-light); margin-bottom: 32px; }

.contact-details { display: flex; flex-direction: column; gap: 20px; }
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}
.contact-detail svg { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.contact-detail strong { display: block; font-size: .85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.contact-detail span { font-size: .95rem; }
a.contact-detail:hover { color: var(--green); }

.cta-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--white);
}
.cta-card img { width: 100%; height: 220px; object-fit: cover; }
.cta-card-content {
  padding: 32px;
}
.cta-card-content h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.cta-card-content p { color: var(--text-light); font-size: .95rem; margin-bottom: 20px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer .nav-logo { margin-bottom: 16px; }
.footer .logo-text { color: var(--white); }
.footer-brand p { font-size: .9rem; line-height: 1.6; max-width: 280px; }
.footer-links h4 { color: var(--white); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; font-size: .9rem; }
.footer-links a { transition: var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem;
  text-align: center;
}

/* ============================================
   ANIMATIONS (scroll reveal)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .dept-card-large { grid-column: span 2; aspect-ratio: 16/9; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .payment-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-item-wide { grid-column: span 1; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .container { padding: 0 20px; }

  /* Nav mobile */
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 0; right: 0;
    width: 280px; height: 100vh; height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px 32px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    box-shadow: -8px 0 32px rgba(0,0,0,.15);
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu a { color: var(--text) !important; font-size: 1.05rem; padding: 12px 16px; width: 100%; }
  .nav-menu a:hover { background: var(--green-light) !important; color: var(--green) !important; }
  .nav-cta { width: auto !important; margin-top: 8px; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-images { max-width: 500px; margin: 0 auto; }
  .about-img-secondary { right: -10px; bottom: -20px; width: 55%; }
  .about-stats { gap: 20px; }

  /* Departments */
  .dept-grid { grid-template-columns: 1fr; }
  .dept-card-large { grid-column: span 1; aspect-ratio: 16/9; }
  .dept-card { aspect-ratio: 16/10; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }

  /* Hours */
  .hours-grid { grid-template-columns: 1fr; }
  .hours-map { min-height: 300px; }

  /* Payments */
  .payment-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gallery-item-wide { grid-column: span 2; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 2.4rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .about-stats { flex-direction: column; align-items: center; gap: 16px; }
  .payment-panel { grid-template-columns: 1fr; }
  .payment-logo-card {
    min-height: 136px;
    padding: 22px 26px;
  }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item-wide { grid-column: span 1; }
}
