:root {
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --text: #374151;
  --muted: #6b7280;
  --border: #e5e7eb;
  --brand: #ef4444;
  --brand-contrast: #ffffff;
  --brand-secondary: #3b82f6;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.narrow { max-width: 850px; margin: 0 auto; }

.section { position: relative; }
.section-pad { padding: 72px 0; }
.section-alt { background: linear-gradient(135deg, var(--bg-alt) 0%, rgba(37,99,235,0.03) 100%); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 16px; }
h1 { font-size: 42px; letter-spacing: -0.02em; }
h2 { font-size: 32px; letter-spacing: -0.01em; }
h3 { font-size: 22px; }
.lead { font-size: 18px; color: var(--muted); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px; /* Larger touch target */
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 16px; /* Prevents zoom on iOS */
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
  min-height: 44px; /* Better touch target */
}
.button:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.button-primary {
  background: var(--brand);
  color: var(--brand-contrast);
  border-color: transparent;
}
.button-primary:hover { filter: brightness(1.05); }

/* Header */
.site-header {
  position: sticky;
  top: 0; z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 220px; }
.logo { display: inline-flex; align-items: center; gap: 20px; font-weight: 800; letter-spacing: -0.02em; }
/* Remove or comment out the old logo styles */
/* .logo-mark { ... } */
/* .logo-text { ... } */

/* Add new image logo styles */
.logo-image {
  height: 200px; /* Set to 200px height as requested */
  width: 400px; /* Set to 400px width as requested */
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
  object-fit: contain; /* Maintain aspect ratio */
}

/* Optional: Add responsive sizing */
@media (max-width: 768px) {
  .logo-image {
    height: 80px; /* Smaller on mobile but still proportional */
    width: 160px;
  }
  .header-inner {
    height: 100px; /* Smaller header height on mobile */
  }
}

.primary-nav { position: relative; }
/* Mobile navigation improvements */
.nav-toggle { 
  display: none; 
  align-items: center; 
  gap: 8px; 
  height: 44px; /* Better touch target */
  padding: 0 16px; 
  border-radius: 8px; 
  border: 1px solid var(--border); 
  background: #fff; 
  font-size: 16px;
  min-width: 60px; /* Better touch target */
}
.nav-list { display: flex; gap: 20px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: var(--muted); font-weight: 600; }
.nav-list a:hover { color: var(--text); }
.nav-cta a { color: rgba(255,255,255,0.92);margin-left: 6px; }

/* Hero */
.hero { min-height: 68vh; display: grid; place-items: center; overflow: hidden; }
.hero-media { 
  position: absolute; 
  inset: 0; 
  background: 
    linear-gradient(180deg, rgba(220,38,38,0.8), rgba(37,99,235,0.6)), 
    var(--hero-image, url('img/banner.jpg')) center/cover no-repeat;
  background-blend-mode: overlay;
  opacity: 1;
}
.hero-content { 
  position: relative; 
  text-align: center; 
  color: #ffffff; 
  padding: 48px 32px; 
  background: rgba(37, 99, 235, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 { font-size: 48px; color: #ffffff; text-shadow: 0 2px 8px rgba(0,0,0,0.45); }
.hero .lead { color: rgba(255,255,255,0.92); max-width: 700px; margin: 0 auto; text-shadow: 0 1px 6px rgba(0,0,0,0.4); }
.hero-actions { margin-top: 18px; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { border: 1px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); background: #fff; position: relative; overflow: hidden; }
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('/img/local-network.jpg') center/cover no-repeat;
  opacity: 0.12;
  pointer-events: none;
}
.feature * { position: relative; z-index: 1; }
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; }

/* Feature cards: neutral style (no brand colors) */
.feature:nth-child(1)::before { background-image: url('/img/local-network.jpg'); }
.feature:nth-child(2)::before { background-image: url('/img/compliance-documentation.jpg'); }
.feature:nth-child(3)::before { background-image: url('/img/reliability-lead-times.jpg'); }
.feature:nth-child(4)::before { background-image: url('/img/scalable-portfolio.jpg'); }

/* Media blocks */
.media-block { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; margin: 42px 0; }
.media-block.reverse { grid-template-columns: 1fr; }
.media-block.reverse .media { order: 2; }
.media-block .media { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.media-block .media img { width: 100vw; height: 420px; object-fit: cover; border-radius: 0; box-shadow: none; }
.media-block .content { 
  padding: 32px; 
  border-radius: 20px; 
  position: relative;
  overflow: hidden;
}

/* Media block content: neutral white cards below full-bleed image */
#products .media-block .content {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 16px;
}

.media-block .content p { color: var(--muted); }

/* Collage placeholder below Products */
.collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1100px;
  width: 100%;
  margin: 24px auto 0;
  align-items: stretch;
}
.collage.two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}
.collage.vertical {
  grid-template-columns: 1fr;
}
.collage-item {
  background: linear-gradient(135deg, rgba(148,163,184,0.2), rgba(148,163,184,0.08));
  border: 1px dashed var(--border);
  border-radius: 0;
  min-height: 0;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* Specific sizes per collage variant */
.collage:not(.two):not(.vertical) .collage-item { height: 220px; }
.collage.two .collage-item { height: 220px; }
.collage.vertical .collage-item { height: 450px; }

/* Ensure collage images fill their frames */
.collage-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fill and crop as needed */
  object-position: center;
  border-radius: 0;
}

/* Full-bleed, full-screen photos */
.full-bleed { margin-top: 32px; }
.full-bleed-photo {
  width: 100vw;
  height: 4400vh; /* increased height */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
}
.full-bleed-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Contact form */
.contact-form { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: 14px; color: var(--text); }
input, textarea { width: 100%; padding: 12px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; color: var(--text); background: #fff; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand-secondary) 40%, transparent); border-color: var(--brand-secondary); }
.error { color: #b00020; font-size: 13px; min-height: 18px; margin: 0; }
.form-actions { margin-top: 10px; }

.business-info { margin-top: 60px; text-align: center; }
.business-info h3 { margin-bottom: 8px; }
.business-info .business-line { margin: 0; color: var(--muted); font-weight: 500; }
.business-info .business-line a { color: var(--brand-secondary); text-decoration: none; border-bottom: 1px dotted rgba(37,99,235,0.6); }
.business-info .business-line a:hover { color: var(--brand); border-bottom-color: currentColor; }

/* Map container styling */
.map-container {
  margin-top: 24px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Contact section specific styling */
#contact.section-pad {
  padding-top: 24px; /* Reduce space above heading */
  padding-bottom: 24px; /* Small blue space below map before footer */
}

/* Contact with more color - blue-only gradient */
#contact.section-alt {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.85), rgba(37, 99, 235, 0.55));
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: none;
}

/* Footer */
.site-footer { 
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.90), rgba(37, 99, 235, 0.70));
  color: #ffffff; 
  margin-top: 0; 
}
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding: 36px 0; }
.footer-col h4 { color: #fff; margin-bottom: 10px; }
.footer-nav, .social { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-nav a, .social a { color: #f1f5f9; }
.footer-nav a:hover, .social a:hover { color: #ffffff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.25); padding: 14px 0 26px; font-size: 14px; color: #e2e8f0; }
.footer-bottom a { color: #ffffff; }

/* Utilities */
.ctas { margin-top: 18px; }

/* Responsive */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .media-block, .media-block.reverse { grid-template-columns: 1fr; }
  .media-block.reverse .media { order: 0; }
}

@media (max-width: 768px) {
  /* Header improvements */
  .header-inner { height: 100px; }
  .nav-toggle { display: inline-flex; }
  .nav-list { 
    position: absolute; 
    right: 0; 
    top: calc(100% + 8px); 
    background: #fff; 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 20px; 
    flex-direction: column; 
    gap: 12px; 
    min-width: 240px; 
    box-shadow: var(--shadow); 
    display: none; 
  }
  .nav-list.open { display: flex; }
  .nav-cta { order: 99; }
  .nav-list a { padding: 8px 0; font-size: 16px; }
  .nav-list li:first-child a { margin-top: 4px; }

  /* Typography improvements */
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
  .lead { font-size: 16px; }

  /* Hero improvements */
  .hero { min-height: 60vh; }
  .hero h1 { font-size: 32px; line-height: 1.2; }
  .hero .lead { font-size: 16px; padding: 0 20px; }
  .hero-content { 
    padding: 32px 24px; 
    margin: 0 16px;
    border-radius: 16px;
  }

  /* Section spacing */
  .section-pad { padding: 48px 0; }
  
  /* Container padding */
  .container { padding: 0 16px; }

  /* Feature grid */
  .feature-grid { 
    grid-template-columns: 1fr; 
    gap: 16px; 
  }
  .feature { 
    padding: 20px; 
    border-radius: 12px; 
  }

  /* Media blocks */
  .media-block, .media-block.reverse { 
    grid-template-columns: 1fr; 
    gap: 20px; 
    margin: 32px 0; 
  }
  .media-block .content { 
    padding: 24px; 
    border-radius: 16px; 
  }
  .media-block .media img { 
    height: 240px; 
    border-radius: 0; 
  }

  /* Form improvements */
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .contact-form { 
    padding: 20px; 
    border-radius: 12px; 
  }
  input, textarea { 
    padding: 14px 12px; 
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Footer improvements */
  .footer-top { 
    grid-template-columns: 1fr; 
    gap: 24px; 
    padding: 24px 0; 
  }
  
  /* Map improvements for mobile */
  .map-container {
    margin-top: 20px;
    border-radius: 12px;
  }
  
  .map-container iframe {
    height: 250px;
  }
  .footer-bottom { 
    padding: 12px 0 20px; 
    text-align: center; 
  }

  /* Business info */
  .business-info { 
    margin-top: 24px; 
    padding: 0 10px; 
  }

  /* Responsive watermarks for mobile */
  #about::before,
  #services::before,
  #products::before,
  #contact::before {
    width: 200px;
    height: 200px;
  }
  .business-info .business-line { 
    font-size: 14px; 
    line-height: 1.5; 
  }
}

/* iPhone 12 Pro Max specific improvements */
@media (max-width: 428px) {
  .hero h1 { font-size: 28px; }
  .hero .lead { font-size: 15px; }
  .hero-content { 
    padding: 24px 20px; 
    margin: 0 12px;
    border-radius: 12px;
  }
  .section-pad { padding: 40px 0; }
  .container { padding: 0 12px; }
  .media-block .media img { height: 200px; }
  .feature { padding: 16px; }
  .contact-form { padding: 16px; }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
  .hero { min-height: 50vh; }
  .hero-content { padding: 32px 0; }
  .section-pad { padding: 32px 0; }
} 

/* Alignment fixes for section titles and text */
#about,
#services,
#products,
#contact {
  text-align: center;
}

/* Watermark styling for sections */
/* About section watermark */
#about {
  position: relative;
}

#about::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/simbolo-marca-de-agua_chacoexport_1200x400_gris.png') center/cover no-repeat;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

#about .container {
  position: relative;
  z-index: 1;
}

/* Readability overlays on sections with strong backgrounds */
#about .container.narrow {
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
#about .container.narrow h2,
#about .container.narrow p { color: #ffffff; }
#about .container.narrow .button { border-color: transparent; }

/* Intentionally no special background for Services title */

/* Products section watermark */
#products {
  position: relative;
}

#products::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 350px;
  height: 350px;
  background: url('/img/marca-agua.png') center/contain no-repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

#products .container {
  position: relative;
  z-index: 1;
}

/* Contact section watermark */
#contact {
  position: relative;
}

#contact::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: url('/img/marca-agua.png') center/contain no-repeat;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

#contact .container {
  position: relative;
  z-index: 1;
}

#about h2,
#services h2,
#products h2,
#contact h2 {
  margin-left: auto;
  margin-right: auto;
}

/* Keep form inputs readable */
#contact input,
#contact textarea {
  text-align: left;
}

/* Services section specific styling - make it bigger */
#services.section-alt {
  padding: 80px 0; /* Increased padding for more space */
  position: relative;
}

#services::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: url('img/simbolo-marca-de-agua_chacoexport_1200x400_blanco.png') center/contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

#services .container {
  position: relative;
  z-index: 1;
}

#services .container {
  padding: 0 40px; /* More horizontal padding */
}

#services h2 {
  margin-bottom: 40px; /* More space after the heading */
  font-size: 36px; /* Slightly larger heading */
}

#services .feature-grid {
  gap: 24px; /* Increased gap between feature cards */
  margin-top: 20px; /* Space above the grid */
}

#services .feature {
  padding: 32px 24px; /* More padding inside feature cards */
  min-height: 180px; /* Minimum height for better proportions */
}