
/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* --- CSS Variables --- */
:root {
  --navy: #1B2A4A;
  --navy-light: #2C3E5A;
  --teal: #0E8C7F;
  --teal-light: #10A394;
  --teal-dark: #0A6E64;
  --gold: #C5A55A;
  --white: #FFFFFF;
  --off-white: #F8F9FA;
  --light-bg: #F0F4F3;
  --light-teal-bg: #E8F4F2;
  --text-dark: #2D2D2D;
  --text-body: #4A4A4A;
  --text-light: #6B7280;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(27,42,74,0.08);
  --shadow-md: 0 4px 12px rgba(27,42,74,0.1);
  --shadow-lg: 0 8px 30px rgba(27,42,74,0.12);
  --shadow-xl: 0 20px 60px rgba(27,42,74,0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-heading: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --max-width: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text-body);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-dark); }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--navy); line-height: 1.2; font-weight: 400; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); margin-bottom: 0.6rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.4rem; font-family: var(--font-body); font-weight: 600; }
p { margin-bottom: 1rem; }
.lead { font-size: 1.15rem; color: var(--text-dark); line-height: 1.8; }
.small { font-size: 0.875rem; color: var(--text-light); }
.label-tag {
  display: inline-block; padding: 4px 14px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--light-teal-bg); color: var(--teal-dark);
}
.label-tag--gold { background: #FDF6E3; color: #8B6914; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--bg { background: var(--off-white); }
.section--teal-bg { background: var(--light-teal-bg); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy p { color: rgba(255,255,255,0.85); }
.grid { display: grid; gap: 32px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.text-center { text-align: center; }

/* --- Header / Navigation --- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.nav-wrapper {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px; height: 72px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 38px; height: 38px; background: var(--teal); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.logo-icon svg { width: 22px; height: 22px; fill: var(--white); }
.logo-text { font-family: var(--font-heading); font-size: 1.5rem; color: var(--navy); }
.logo-text span { color: var(--teal); }

.nav-menu { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-menu a {
  display: block; padding: 8px 16px; font-size: 0.9rem; font-weight: 500;
  color: var(--text-dark); border-radius: var(--radius-sm); transition: all var(--transition);
}
.nav-menu a:hover, .nav-menu a.active { color: var(--teal); background: var(--light-teal-bg); }

/* Dropdown */
.nav-item { position: relative; }
.nav-dropdown {
  display: none; position: absolute; top: 100%; left: 0; min-width: 260px;
  background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 12px 0; z-index: 100; border: 1px solid var(--border);
}
.nav-item:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  padding: 10px 20px; font-size: 0.85rem; border-radius: 0;
}
.nav-dropdown a:hover { background: var(--light-teal-bg); }

/* Language Switcher */
.lang-switch {
  display: flex; align-items: center; gap: 4px; margin-left: 16px;
  padding: 4px; background: var(--off-white); border-radius: 50px;
}
.lang-switch a {
  padding: 4px 12px; font-size: 0.8rem; font-weight: 600; border-radius: 50px;
  color: var(--text-light);
}
.lang-switch a.active { background: var(--white); color: var(--navy); box-shadow: var(--shadow-sm); }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
}
.menu-toggle span {
  display: block; width: 24px; height: 2px; background: var(--navy);
  margin: 5px 0; transition: all var(--transition); border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
  position: relative; padding: 160px 0 100px; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, var(--teal-dark) 100%);
  color: var(--white);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--white); font-size: clamp(2.4rem, 5vw, 3.8rem); max-width: 800px; }
.hero .lead { color: rgba(255,255,255,0.9); max-width: 650px; font-size: 1.2rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; background: rgba(255,255,255,0.12); border-radius: 50px;
  font-size: 0.85rem; font-weight: 500; color: rgba(255,255,255,0.9); margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.15);
}
.hero-ctas { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

/* Hero Internal Pages */
.hero--sm {
  padding: 140px 0 60px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}
.hero--sm h1 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.btn--primary { background: var(--teal); color: var(--white); }
.btn--primary:hover { background: var(--teal-dark); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.4); }
.btn--outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); color: var(--white); }
.btn--outline-dark { background: transparent; color: var(--navy); border: 2px solid var(--border); }
.btn--outline-dark:hover { border-color: var(--teal); color: var(--teal); }
.btn--sm { padding: 10px 20px; font-size: 0.85rem; }
.btn--lg { padding: 16px 36px; font-size: 1.05rem; }
.btn svg { width: 18px; height: 18px; }

/* --- Cards --- */
.card {
  background: var(--white); border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border); transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: transparent; }
.card-img {
  width: 100%; height: 220px; object-fit: cover;
  background: linear-gradient(135deg, var(--light-teal-bg), var(--off-white));
}
.card-body { padding: 28px; }
.card-body h3 { margin-bottom: 8px; }
.card-body p { font-size: 0.95rem; color: var(--text-light); margin-bottom: 16px; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 0.9rem; color: var(--teal);
}
.card-link:hover { gap: 10px; }

/* Service Card */
.service-card {
  padding: 36px; background: var(--white); border-radius: var(--radius-md);
  border: 1px solid var(--border); transition: all var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-lg); border-color: var(--teal); transform: translateY(-4px); }
.service-icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: var(--light-teal-bg); display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 28px; height: 28px; color: var(--teal); }

/* --- Image Placeholder --- */
.img-placeholder {
  width: 100%; aspect-ratio: 16/10; border-radius: var(--radius-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; font-size: 0.85rem; color: var(--text-light);
  position: relative; overflow: hidden;
}
.img-placeholder--saffron { background: linear-gradient(135deg, #F5E6D3, #E8C87A, #D4A843); }
.img-placeholder--carmine { background: linear-gradient(135deg, #F2D5D5, #C0616E, #8B2E3B); }
.img-placeholder--curcumin { background: linear-gradient(135deg, #FEF3C7, #F59E0B, #D97706); }
.img-placeholder--chlorophyll { background: linear-gradient(135deg, #D1FAE5, #34D399, #059669); }
.img-placeholder--lab { background: linear-gradient(135deg, #E0E7FF, #818CF8, #4F46E5); }
.img-placeholder--extraction { background: linear-gradient(135deg, #FEE2E2, #FB7185, #E11D48); }
.img-placeholder--spray { background: linear-gradient(135deg, #DBEAFE, #60A5FA, #2563EB); }
.img-placeholder--micro { background: linear-gradient(135deg, #E0E7FF, #A78BFA, #7C3AED); }
.img-placeholder--mix { background: linear-gradient(135deg, #ECFCCB, #A3E635, #65A30D); }
.img-placeholder--food { background: linear-gradient(135deg, #FEF3C7, #FBBF24, #D97706); }
.img-placeholder--neutral { background: linear-gradient(135deg, #F1F5F9, #CBD5E1, #94A3B8); }

/* --- Stats Bar --- */
.stats-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0; background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); overflow: hidden;
  position: relative; margin-top: -50px; z-index: 10;
}
.stat-item {
  padding: 32px 24px; text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-heading); font-size: 2.4rem; color: var(--teal); display: block;
}
.stat-label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }

/* --- Spec Table --- */
.spec-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.spec-table th, .spec-table td {
  padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.95rem;
}
.spec-table th { 
  background: var(--navy); color: var(--white); font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.spec-table tr:nth-child(even) { background: var(--off-white); }
.spec-table tr:hover { background: var(--light-teal-bg); }

/* --- CTA Banner --- */
.cta-banner {
  padding: 60px 40px; background: linear-gradient(135deg, var(--navy), var(--teal-dark));
  border-radius: var(--radius-lg); color: var(--white); text-align: center;
  position: relative; overflow: hidden;
}
.cta-banner h2 { color: var(--white); margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto 24px; }

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 0; margin-bottom: 16px; list-style: none;
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.breadcrumbs li { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.breadcrumbs li + li::before { content: '›'; margin-right: 8px; }
.breadcrumbs a { color: rgba(255,255,255,0.7); }
.breadcrumbs a:hover { color: var(--white); }

/* --- Contact Form --- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text-dark);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.95rem; color: var(--text-dark);
  transition: border-color var(--transition); background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,140,127,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-check { display: flex; flex-direction: row; align-items: center; gap: 6px; width: 100%; }
.form-check input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
.form-check label { flex: 1; font-size: 0.85rem; color: var(--text-light); font-weight: 400; line-height: 1.4; cursor: pointer; }
/* --- Footer --- */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,0.7); padding: 60px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand p { font-size: 0.9rem; margin-top: 16px; line-height: 1.6; }
.footer-col h4 {
  color: var(--white); font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 16px; font-family: var(--font-body);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  padding: 20px 0; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 16px; font-size: 0.8rem;
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { color: rgba(255,255,255,0.5); }
.footer-legal a:hover { color: var(--white); }

/* --- Scroll Animations --- */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }

/* --- Product Detail Layout --- */
.product-header { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.product-specs { margin-top: 40px; }
.product-apps { margin-top: 40px; }
.product-cta-box {
  padding: 32px; background: var(--light-teal-bg); border-radius: var(--radius-md);
  border: 1px solid rgba(14,140,127,0.2);
}
.product-e-number {
  display: inline-block; padding: 6px 16px; background: var(--navy);
  color: var(--white); font-size: 0.85rem; font-weight: 600;
  border-radius: var(--radius-sm); margin-bottom: 16px;
}

/* --- About / Team --- */
.value-card {
  padding: 32px; border-left: 4px solid var(--teal); background: var(--white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
}
.timeline-item {
  padding-left: 32px; border-left: 2px solid var(--border); padding-bottom: 32px;
  position: relative;
}
.timeline-item::before {
  content: ''; position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--teal); border: 2px solid var(--white);
}

/* --- Knowledge Center --- */
.article-card .card-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 0.8rem; color: var(--text-light); margin-bottom: 12px;
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .nav-menu { display: none; }
  .menu-toggle { display: block; }
  .nav-menu.open {
    display: flex; flex-direction: column; position: absolute;
    top: 72px; left: 0; right: 0; background: var(--white);
    padding: 16px 24px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-dropdown { position: static; box-shadow: none; border: none; padding-left: 16px; display: none; }
  .nav-item:hover .nav-dropdown { display: block; }
  .lang-switch { margin-left: 0; margin-top: 8px; }
  .hero { padding: 130px 0 70px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-header { grid-template-columns: 1fr; }
  .stats-bar { margin-top: -30px; }
}

@media (max-width: 640px) {
  .section { padding: 50px 0; }
  .hero { padding: 120px 0 60px; }
  .hero-ctas { flex-direction: column; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cta-banner { padding: 40px 24px; }
}

/* Form messages */
.form-message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.form-message.success {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #A5D6A7;
}
.form-message.error {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #EF9A9A;
}








/* Fix: inline grid responsive */
@media (max-width: 768px) {
  [style*="grid-template-columns: 250px"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:250px"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
}




/* Grid de 2 columnas → 1 columna en móvil */
@media (max-width: 768px) {
  .grid--2 {
    grid-template-columns: 1fr !important;
  }

  /* El grid interior del formulario (Nombre/Empresa)
     también colapsa a 1 columna */
  .form-group .grid--2,
  form .grid--2 {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* Evitar que cualquier elemento hijo desborde */
  .container {
    overflow-x: hidden;
  }

  /* Checkbox: asegurar que el label no se salga */
  }

}

/* === RESPONSIVE MÓVIL === */
@media screen and (max-width: 768px) {
  .grid--2 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  form .grid--2 {
    gap: 0 !important;
  }
}
