/* Header Styles - Curved Modern Design with Background */
/* Updated: 2025-10-20 - Logo z-index fix v2 */
header {
  position: relative;
  text-align: center;
  padding: 0;
  margin: 0;
  margin-top: 0 !important;
  width: 100%;
  max-width: 100vw;
  overflow: visible; /* Allow logo to extend beyond bounds */
}

/* Top Background Section with Image */
.header-top-background {
  position: relative;
  width: 100%;
  max-width: 100vw;
  height: 400px;
  overflow: visible; /* Allow logo to extend beyond */
  margin: 0;
  padding: 0;
  z-index: 100 !important; /* Higher than header-info to ensure logo renders above it */
}

.header-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%; /* Show more of the image, zoom out slightly */
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

/* Better image quality on high-res screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .header-bg-image {
    image-rendering: auto;
    /* Removed scale transform - was causing horizontal bleed on mobile */
  }
}

/* Curved Bottom with SVG */
.curved-bottom {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: 120px;
  background: white;
  clip-path: ellipse(100% 100% at 50% 100%);
  z-index: 1;
  overflow: hidden;
}

/* Logo positioned at apex of curve */
.logo-center {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999 !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  width: 193.6px !important;  /* 10% larger than 176px */
  height: 193.6px !important;
  border-radius: 50% !important;
  border: 3px solid var(--primary-color);
  box-shadow: 0 8px 24px rgba(205, 33, 42, 0.2), 0 0 0 6px white;
  transition: all var(--transition-normal);
  object-fit: cover;
  background: white;
  position: relative;
  z-index: 1;
  overflow: hidden !important;
  display: block !important;
  clip-path: circle(50% at 50% 50%) !important;
  -webkit-clip-path: circle(50% at 50% 50%) !important;
}

.logo:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 12px 32px rgba(205, 33, 42, 0.3), 0 0 0 6px white;
}

/* Info Section Below */
.header-info {
  /* No background - body is white */
  padding: 80px var(--spacing-lg) var(--spacing-md);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.info-item:last-child {
  border-bottom: none;
}

.info-icon {
  font-size: 1.5em;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.info-text {
  flex: 1;
  text-align: left;
  font-size: 1.05em;
  line-height: 1.6;
  color: #2c2c2c;
}

.info-text strong {
  color: #1a1a1a;
  font-weight: 700;
}

.info-text a {
  color: #2ecc71;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.info-text a:hover {
  color: #27ae60;
  border-bottom-color: #2ecc71;
}

/* Responsive Design */
@media (min-width: 1200px) {
  /* Larger header on desktop for better image quality */
  .header-top-background {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .header-top-background {
    height: 300px;
  }
  
  .curved-bottom {
    height: 80px;
  }
  
  .logo-center {
    bottom: -40px;
    width: 171px;
    height: 171px;
  }
  
  .logo {
    width: 165px !important;  /* 10% larger than 150px */
    height: 165px !important;
    border-radius: 50% !important;
    clip-path: circle(50% at 50% 50%) !important;
    -webkit-clip-path: circle(50% at 50% 50%) !important;
  }
  
  .header-info {
    padding: 60px var(--spacing-md) var(--spacing-lg);
  }
  
  .info-item {
    flex-direction: row;
    gap: var(--spacing-sm);
  }
  
  .info-icon {
    font-size: 1.25em;
  }
  
  .info-text {
    font-size: 0.95em;
  }
}

@media (max-width: 480px) {
  .header-top-background {
    height: 250px;
  }
  
  .curved-bottom {
    height: 60px;
  }
  
  .logo-center {
    bottom: -30px;
    width: 138px;
    height: 138px;
  }
  
  .logo {
    width: 132px !important;  /* 10% larger than 120px */
    height: 132px !important;
    border-radius: 50% !important;
    clip-path: circle(50% at 50% 50%) !important;
    -webkit-clip-path: circle(50% at 50% 50%) !important;
  }
  
  .header-info {
    padding: 50px var(--spacing-sm) var(--spacing-md);
  }
  
  .info-item {
    padding: var(--spacing-sm) 0;
  }
  
  .info-icon {
    font-size: 1.1em;
  }
  
  .info-text {
    font-size: 0.9em;
  }
}

/* OLD STYLES BELOW - TO BE REMOVED OR IGNORED */
.hero-old {
  max-width: 650px;
  margin: 0 auto;
  padding: var(--spacing-xl);
  /* More transparent gradient (15% more see-through) */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.10) 30%,
    rgba(255, 255, 255, 0.05) 70%,
    rgba(255, 255, 255, 0.00) 100%
  );
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  /* Light green subtle border */
  border: 1px solid rgba(46, 204, 113, 0.3);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(46, 204, 113, 0.4) 0%,
    rgba(46, 204, 113, 0.15) 50%,
    rgba(46, 204, 113, 0.1) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.hero h1 {
  margin-bottom: var(--spacing-md);
  text-shadow: 0 3px 10px rgba(255, 255, 255, 0.95), 0 1px 4px rgba(0, 0, 0, 0.2);
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin: var(--spacing-md) 0;
}

.delivery-info {
  margin: var(--spacing-lg) 0;
  padding: 0;
  /* No background - will be applied to cards inside */
  line-height: 1.9;
  font-size: 1.05em;
  position: relative;
  z-index: 1;
}

/* Card container for info boxes */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

/* Individual info card with frosted glass effect */
.info-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(248, 253, 250, 0.65) 100%
  );
  backdrop-filter: blur(12px) saturate(180%);
  border-radius: 16px;
  padding: var(--spacing-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 
    0 4px 20px rgba(46, 204, 113, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(46, 204, 113, 0.6) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 28px rgba(46, 204, 113, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.info-card:hover::before {
  opacity: 1;
}

/* Card icon/emoji */
.info-card-icon {
  font-size: 2em;
  margin-bottom: var(--spacing-sm);
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

/* Card title */
.info-card-title {
  color: #1a1a1a;
  font-size: 1.15em;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

/* Card content */
.info-card-content {
  color: #2c2c2c;
  font-size: 0.95em;
  line-height: 1.7;
}

.info-card-content strong {
  color: #1a1a1a;
  font-weight: 600;
}

/* Delivery info specific styling */
.delivery-info strong {
  color: #1a1a1a;
  font-size: 1.1em;
  font-weight: 700;
}

.delivery-info a {
  color: #2ecc71;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.delivery-info a:hover {
  color: #27ae60;
  border-bottom-color: #2ecc71;
}

.delivery-info a::after {
  content: '→';
  font-size: 1.1em;
  transition: transform 0.2s ease;
}

.delivery-info a:hover::after {
  transform: translateX(3px);
}

.address {
  margin-top: 0;
  padding: var(--spacing-lg);
  background: linear-gradient(
    135deg,
    rgba(255, 245, 246, 0.75) 0%,
    rgba(253, 248, 249, 0.65) 100%
  );
  backdrop-filter: blur(12px) saturate(180%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 
    0 4px 20px rgba(205, 33, 42, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  line-height: 1.8;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.address::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(205, 33, 42, 0.6) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.address:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 28px rgba(205, 33, 42, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.address:hover::before {
  opacity: 1;
}

.address strong {
  color: var(--primary-color);
  font-size: 1.05em;
  font-weight: 700;
}

/* Italian Flag Bar */
.flag-bar {
  height: 6px;
  width: 100%;
  display: flex;
  margin-top: var(--spacing-lg);
}

.flag-bar div {
  flex: 1;
}

.flag-bar .green { background: var(--secondary-color); }
.flag-bar .white { background: var(--accent-color); }
.flag-bar .red { background: var(--primary-color); }

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .logo {
    width: 150px;
    height: 150px;
  }

  .hero {
    padding: var(--spacing-md);
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero h2 {
    font-size: 1.25rem;
  }
  
  .info-cards {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  
  .info-card {
    padding: var(--spacing-md);
  }
  
  .info-card-icon {
    font-size: 1.75em;
  }
}

@media (max-width: 480px) {
  .logo {
    width: 120px;
    height: 120px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .delivery-info,
  .address {
    padding: var(--spacing-sm) var(--spacing-md);
  }
  
  .info-card {
    padding: var(--spacing-sm) var(--spacing-md);
  }
  
  .info-card-icon {
    font-size: 1.5em;
    margin-bottom: 6px;
  }
  
  .info-card-title {
    font-size: 1.05em;
  }
  
  .info-card-content {
    font-size: 0.9em;
  }
}