/* Base styles */
:root {
  --primary-color: #1a4d2e;
  --primary-light: #2a6d3e;
  --primary-dark: #0a3d1e;
  --secondary-color: #ff9900;
  --secondary-light: #ffad33;
  --secondary-dark: #cc7a00;
  --text-color: #333333;
  --text-light: #666666;
  --background: #ffffff;
  --background-alt: #f8f9fa;
  --light-bg: #f5f5f5;
  --header-height: 60px;
  --container-max-width: 1200px;
  --container-padding: 1rem;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

/* Cross-browser normalization */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Enhanced touch handling */
@media (hover: none) {
  * {
    cursor: default !important;
  }
  
  a, button, [role="button"], .clickable {
    cursor: pointer !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Legacy browser support */
@supports not (display: grid) {
  .products-grid, .services-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -1rem;
  }
  
  .product-card, .service-card {
    flex: 1 1 300px;
    margin: 1rem;
    min-width: 250px;
  }
}

/* Fix for older Safari versions */
@media not all and (min-resolution:.001dpcm) { 
  @supports (-webkit-appearance:none) {
    .product-card, .service-card {
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
    }
    
    .header {
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
    }
  }
}

/* IE11 specific fixes */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .products-grid, .services-grid {
    display: flex;
    flex-wrap: wrap;
  }
  
  .product-card, .service-card {
    flex: 1 1 300px;
    margin: 1rem;
  }
  
  :root {
    --header-height: 60px;
  }
  
  .header {
    height: 60px;
  }
}

/* Container utilities */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  box-sizing: border-box;
}

/* iOS specific optimizations */
@supports (-webkit-touch-callout: none) {
  body {
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
  }
  
  .header {
    position: -webkit-sticky;
    position: sticky;
  }
  
  .product-card, .service-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
  }
  
  .nav-links {
    -webkit-overflow-scrolling: touch;
  }
}

body, html {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text-color);
  scroll-behavior: smooth;
  background-color: var(--background);
  line-height: 1.6;
}

/* Header and Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo h1 {
  margin: 0;
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.menu-toggle {
  display: none;
}

.lang-toggle {
  background: none;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-light);
  cursor: pointer;
  margin-left: 1.5rem;
  transition: border-color 0.3s ease;
}
.lang-toggle:hover { border-color: var(--primary-color); }
.lang-toggle-it, .lang-toggle-en { transition: color 0.3s ease; }
.lang-toggle .lang-active { color: var(--primary-color); }
.lang-toggle-sep { color: rgba(0,0,0,0.25); }

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile Navigation */
@media screen and (max-width: 850px) {
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1001;
    color: var(--primary-color);
    position: relative;
  }

  .menu-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .nav-links {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: var(--container-padding);
    right: auto;
    bottom: auto;
    width: max-content;
    background-color: var(--background);
    border: 1px solid rgba(0,0,0,0.08);
    border-top: 2px solid var(--primary-color);
    padding: 0.4rem 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 999;
    gap: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
    border-radius: 0 0 8px 8px;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    color: var(--text-color);
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
    width: 100%;
    text-align: left;
    font-weight: 500;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:hover {
    background-color: var(--background-alt);
    color: var(--primary-color);
  }

  .lang-toggle {
    margin-left: auto;
  }
}

/* Main content */
main {
  padding-top: calc(var(--header-height) + 1rem);
  overflow-x: hidden;
}

/* Hero Section */
.hero {
  height: clamp(400px, 60vh, 680px);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem var(--container-padding);
  text-align: center;
  color: white;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0,0,0,0.4), rgba(0,0,0,0.2));
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero-content p {
  font-size: clamp(1rem, 3vw, 1.5rem);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

/* Sections */
.section {
  padding: 5rem var(--container-padding);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #ffffff;
}

.section:nth-child(even) {
  background-color: var(--background-alt);
}

.section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 3rem;
}

/* Products and Services Grid */
.products-grid, .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.product-card, .service-card {
  background: var(--background);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: auto;
  padding: 0;
}


/* Image container */
.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  padding: 0;
  display: block;
  border-radius: 12px 12px 0 0;
  transition: transform 0.3s ease;
}

/* Add hover effect for images */
.card-image:hover {
  transform: scale(1.05);
}

/* Text styling */
.product-card h3, .service-card h3 {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--primary-color);
  width: 100%;
  text-align: center;
  background-color: var(--light-bg);
  border-radius: 0;
  margin: 0;
  padding: 0.6rem 1rem;
}

.products-description,
.services-description,
.about-content {
  width: 100%;
  max-width: 1200px;
  padding: 0 1rem;
  box-sizing: border-box;
}

.products-description p, .services-description p, .about-content p {
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 2rem 0;
  padding: 0;
  text-align: justify;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .card-image {
    height: 160px;
  }

  .products-grid, .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
  }

  .section {
    padding: 3rem 1rem;
  }
}

@media (max-width: 480px) {
  .card-image {
    height: 140px;
  }

  .products-grid, .services-grid {
    grid-template-columns: 1fr;
    padding: 0.5rem;
  }

  .products-description,
  .services-description,
  .about-content {
    padding: 0 0.5rem;
  }

  .product-card h3, .service-card h3 {
    font-size: 1.1rem;
  }

  .products-description p, .services-description p, .about-content p {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
}

/* For larger screens */
@media (min-width: 1200px) {
  .card-image {
    height: 200px;
  }

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

@media (min-width: 768px) and (max-width: 1199px) {
  .card-image {
    height: 180px;
  }
}

/* Hover effects */
.product-card:hover, .service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .product-card, .service-card {
    transform: translateZ(0);
  }
  
  .product-card img, .service-card img {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

/* Tablet optimization */
@media (min-width: 768px) and (max-width: 1024px) {
  .section {
    padding: 4rem 1.5rem;
  }

  .hero-content h2 {
    font-size: 2.5rem;
  }

  .products-description p,
  .services-description p,
  .about-content p {
    font-size: 1.1em;
  }
}

/* Small screens and mobile landscape */
@media (max-width: 480px), (max-height: 500px) and (orientation: landscape) {
  .hero {
    height: auto;
    min-height: 40vh;
  }

  .hero-content {
    padding: 2rem 1rem;
  }

  .section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }

  .products-description p,
  .services-description p,
  .about-content p {
    font-size: 1.1rem;
  }
}

/* High-resolution screens */
@media (min-width: 1920px) {
  .section {
    max-width: 1400px;
  }

  .card-image {
    height: 200px;
  }


}

/* Print styles */
@media print {
  .product-card, .service-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .hero {
    height: auto;
    background: none;
    color: black;
  }
}

/* Services Description */
.services-description {
  text-align: center;
  margin-top: 3rem;
  padding: 0 1rem;
}

.services-description p {
  font-size: 1.2em;
  color: var(--text-color);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  text-align: justify;
}

/* Contact — old container removed, replaced by .contact-cards */


/* Footer */
.footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 2rem;
}

/* Media Queries */
@media (max-width: 1200px) {
  .nav-links {
    gap: 1rem;
  }
}

@media (max-width: 1024px) {
  .nav-links {
    gap: 0.8rem;
  }
  .logo h1 {
    font-size: 1.3rem;
  }
  .logo-img {
    height: 35px;
  }
}

/* For landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    height: 70vh;
  }

  .nav-container {
    padding: 0.3rem;
  }
}

/* Media queries for responsive logo */
@media (max-width: 360px) {
  .logo {
    gap: 0.5rem;
  }
  .logo-img {
    height: 25px;
  }
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  border-radius: 12px;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.service-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.service-description {
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Media Queries for Services */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .service-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .service-title {
    font-size: 1.3rem;
  }
}

/* Cross-browser and system optimizations */
@supports (-webkit-touch-callout: none) {
  html, body {
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

/* System-specific font stacks */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 
               Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', 
               Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Cross-browser smooth scrolling */
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--light-bg);
}

/* Webkit scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

/* Cross-browser flex gap fallback */
.nav-links {
  gap: 1.5rem;
  display: flex;
}
@supports not (gap: 1.5rem) {
  .nav-links > * {
    margin-right: 1.5rem;
  }
  .nav-links > *:last-child {
    margin-right: 0;
  }
}

/* Enhanced performance optimizations */
.product-card, .service-card {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Cross-browser transitions */
.product-card, .service-card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                      box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Touch device optimizations */
@media (hover: hover) and (pointer: fine) {
  .product-card:hover, .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
}

@media (hover: none) and (pointer: coarse) {
  .product-card:active, .service-card:active {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
}

/* Enhanced mobile optimizations */
@media (max-width: 480px) {

  .hero-content h2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }

  .hero-content p {
    font-size: clamp(1rem, 3vw, 1.5rem);
  }
}

/* Override dark mode preferences to maintain light theme */
@media (prefers-color-scheme: dark) {
  :root {
    /* Keep light mode colors */
    --primary-color: #1a4d2e;
    --primary-light: #2a6d3e;
    --primary-dark: #0a3d1e;
    --secondary-color: #ff9900;
    --secondary-light: #ffad33;
    --secondary-dark: #cc7a00;
    --text-color: #333333;
    --text-light: #666666;
    --background: #ffffff;
    --background-alt: #f8f9fa;
    --light-bg: #f5f5f5;
  }

  body {
    background-color: var(--background);
    color: var(--text-color);
  }

  .header {
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-links {
    background: var(--background);
  }

  .product-card, .service-card {
    background: var(--background-alt);
    border: 1px solid rgba(0, 0, 0, 0.1);
  }

  .nav-links a {
    color: var(--text-color);
  }
}

/* Print optimization */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .header {
    position: static;
    box-shadow: none;
  }

  .product-card, .service-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
  }

  .hero {
    height: auto;
    background: none !important;
    color: var(--text-color) !important;
  }
}

/* Safari and iOS specific fixes */
@supports (-webkit-touch-callout: none) {
  html, body {
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
  }

  /* NOTE: backdrop-filter intentionally omitted on .header — it creates a
     new containing block for position:fixed children (e.g. .nav-links),
     causing the mobile menu panel to collapse and appear transparent. */

  .nav-links {
    -webkit-overflow-scrolling: touch;
  }

  .product-card, .service-card {
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  .card-image {
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
  }

  body {
    overscroll-behavior-y: none;
  }
}

/* Fix for Safari flexbox gap */
@supports not (gap: 1rem) {
  .nav-links > * {
    margin-right: 1rem;
  }
  .nav-links > *:last-child {
    margin-right: 0;
  }
  
  .products-grid, .services-grid {
    margin: -0.5rem;
  }
  
  .products-grid > *, .services-grid > * {
    margin: 0.5rem;
  }
}

/* Enhanced touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .product-card:active, .service-card:active {
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .nav-links a {
    padding: 0.8rem;
    margin: 0.2rem 0;
  }

}

/* Dark mode adjustments — site intentionally stays in light mode */
@media (prefers-color-scheme: dark) {
  .menu-toggle {
    color: var(--text-color);
  }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
  .nav-links {
    -webkit-overflow-scrolling: touch;
  }

  @media screen and (max-width: 850px) {
    .nav-links {
      padding-bottom: 4rem; /* Extra padding for iOS safe area */
    }
  }
}

/* Skip navigation link (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
  z-index: 10000;
  border-radius: 0 0 4px 0;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Hero CTA button */
.hero-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.85rem 2.5rem;
  background: var(--secondary-color);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.hero-cta:hover,
.hero-cta:focus {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  outline: none;
}

/* Card description text */
.card-desc {
  font-size: 1rem;
  color: var(--text-light);
  margin: 0.5rem 0.75rem 0.75rem;
  line-height: 1.5;
  text-align: center;
}


/* Contact section link styles */
.contact-info a[href^="tel:"],
.contact-info a[href^="mailto:"] {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.contact-info a[href^="tel:"]:hover,
.contact-info a[href^="tel:"]:focus,
.contact-info a[href^="mailto:"]:hover,
.contact-info a[href^="mailto:"]:focus {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-color);
}


/* ============================================================
   HERO ENTRANCE ANIMATION
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ctaPulse {
  0%   { box-shadow: 0 4px 14px rgba(0,0,0,0.25), 0 0 0 0 rgba(255,153,0,0.45); }
  70%  { box-shadow: 0 4px 14px rgba(0,0,0,0.25), 0 0 0 14px rgba(255,153,0,0); }
  100% { box-shadow: 0 4px 14px rgba(0,0,0,0.25), 0 0 0 0 rgba(255,153,0,0); }
}

.hero-content h1 { animation: fadeUp 0.6s ease both 0.1s; }
.hero-content h2 { animation: fadeUp 0.6s ease both 0.25s; }
.hero-content p  { animation: fadeUp 0.6s ease both 0.4s; }
.hero-cta        { animation: fadeUp 0.6s ease both 0.55s, ctaPulse 2.2s ease-out 1.2s infinite; }

/* ============================================================
   SECTION HEADING DECORATION
   ============================================================ */
.section > h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.6rem;
  margin-bottom: 2rem;
}
.section > h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* ============================================================
   CARD IMAGE HOVER OVERLAY
   ============================================================ */
.product-card::after,
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  border-radius: 12px 12px 0 0;
  background: rgba(26, 77, 46, 0);
  transition: background 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
.product-card:hover::after,
.service-card:hover::after {
  background: rgba(26, 77, 46, 0.12);
}

/* ============================================================
   GOOGLE REVIEWS BADGE
   ============================================================ */
/* .reviews-wrapper removed — badge now lives inside Dove Siamo contact card */

.google-reviews-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 0.85rem 1.5rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.google-reviews-badge:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  transform: translateY(-2px);
}
.reviews-map-pin {
  flex-shrink: 0;
  display: block;
}
.reviews-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.reviews-score {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  line-height: 1;
}
.reviews-stars {
  color: #fbbc04;
  font-size: 1rem;
  letter-spacing: 1px;
}
.reviews-count {
  font-size: 0.8rem;
  color: #666;
}

/* ============================================================
   FOOTER ENHANCEMENT
   ============================================================ */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
}
.footer-brand p,
.footer-contact a {
  margin: 0.2rem 0;
  display: block;
}
.footer-brand p { opacity: 0.85; font-size: 0.9rem; }
.footer-brand strong { font-size: 1rem; opacity: 1; }
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}
.footer-contact a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}
.footer-contact a:hover { color: #fff; }

@media (max-width: 600px) {
  .footer-content { flex-direction: column; align-items: center; text-align: center; }
  .footer-contact { align-items: center; }
}

/* ============================================================
   REDUCED MOTION — disable all animations for users who prefer it
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-content h1,
  .hero-content h2,
  .hero-content p,
  .hero-cta { animation: none; }
  .hero-cta { box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
  .product-card::after,
  .service-card::after { transition: none; }
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  width: 100%;
  background: var(--background-alt);
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 2.5rem 1rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.5rem;
}

.stat-number {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.stat-icon {
  width: clamp(1.6rem, 4vw, 2.4rem);
  height: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--primary-color);
  display: block;
}

/* 3 + 1 centred under middle item */
@media (max-width: 600px) {
  .stats-bar {
    grid-template-columns: repeat(6, 1fr);
  }
  .stats-bar .stat:nth-child(1) { grid-column: 1 / 3; }
  .stats-bar .stat:nth-child(2) { grid-column: 3 / 5; }
  .stats-bar .stat:nth-child(3) { grid-column: 5 / 7; }
  .stats-bar .stat:nth-child(4) { grid-column: 3 / 5; } /* centred under 40+ */
}

/* 2 × 2 grid */
@media (max-width: 400px) {
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 2rem 0.5rem;
  }
  .stats-bar .stat { grid-column: auto; }
  .stat { padding: 0.5rem 1rem; }
}

/* Diamond: 1 alone top · 2 side by side · 1 alone bottom */
@media (max-width: 280px) {
  .stats-bar .stat:nth-child(1) { grid-column: 1 / 3; }
  .stats-bar .stat:nth-child(2) { grid-column: auto; }
  .stats-bar .stat:nth-child(3) { grid-column: auto; }
  .stats-bar .stat:nth-child(4) { grid-column: 1 / 3; }
}

/* ============================================================
   ABOUT PULL-QUOTE
   ============================================================ */
.about-quote {
  border-left: 4px solid var(--primary-color);
  margin: 0 0 1.5rem;
  padding: 0.75rem 1.5rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  color: var(--primary-color);
  font-style: italic;
  text-align: left;
}

/* ============================================================
   CONTACT CARDS
   ============================================================ */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

/* When grid drops to 2 columns, stretch the third card full width */
@media (max-width: 1040px) {
  .contact-cards .contact-card:nth-child(3) {
    grid-column: 1 / -1;
  }
}

.contact-card {
  background: var(--background);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.contact-card-icon {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

.contact-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.5rem;
}

.contact-detail-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
}
.contact-detail-link:hover { color: var(--primary-color); }

.hours-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.95rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.hours-row:last-child { border-bottom: none; }

.hours-days { color: var(--text-color); font-weight: 500; }
.hours-time { color: var(--text-light); }
.hours-closed { color: #c0392b; font-weight: 500; }

.contact-address {
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0 0 1rem;
}

/* Reviews badge inside Dove Siamo card */
.contact-card .google-reviews-badge {
  margin-top: auto;
  align-self: stretch;
  justify-content: center;
}


