/* =========================================================
   FOODLOGISTIC S.A. – ESTILO FINAL (FIX HEADER)
   ========================================================= */

/* -------- VARIABLES -------- */
:root {
  --blue-dark: #0b1e39;
  --blue-main: #142c57;
  --green-main: #2ecc71;
  --green-soft: #e8f7ee;
  --bg-main: #f5f7fa;
  --text-main: #1f2933;
  --text-soft: #6b7280;
  --white: #ffffff;
}

/* -------- RESET -------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* -------- BASE -------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* -------- CONTAINER -------- */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 2.5rem 2rem;
}

/* =========================================================
   HEADER (CORREGIDO)
   ========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue-main));
  box-shadow: 0 4px 18px rgba(0,0,0,0.15);
  padding: 0.4rem 0; /* 👈 reduce altura */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 2rem; /* 👈 compacto */
}

/* 🔥 FIX CLAVE */
.logo {
  height: 55px;   /* 👈 controla el tamaño real */
  width: auto;
  display: block;
}

/* NAV */
.nav a {
  color: #fff;
  margin-left: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--green-main);
  transition: width .3s ease;
}

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

/* =========================================================
   HERO / LANDING
   ========================================================= */

.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(11,30,57,0.75), rgba(11,30,57,0.75)),
    url("https://images.unsplash.com/photo-1578575437130-527eed3abbec?auto=format&fit=crop&w=1600&q=80")
    center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(3px);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  text-align: center;
  color: white;
}

.hero .tag {
  display: inline-block;
  background: rgba(46,204,113,.2);
  color: var(--green-main);
  padding: .35rem .9rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-text {
  color: #dbe3ee;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  font-weight: 600;
}

.eco-msg {
  color: #b7f7d3;
  font-size: .9rem;
}

/* BOTÓN */
.dark-toggle {
  margin-top: 1.2rem;
  background: var(--green-main);
  color: white;
  border: none;
  padding: .7rem 1.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

/* ANIMACIÓN */
.hero-content > * {
  animation: fadeUp .9s ease both;
}
.hero-content h1 { animation-delay: .2s; }
.hero-text { animation-delay: .35s; }
.hero-stats { animation-delay: .5s; }
.eco-msg { animation-delay: .7s; }
.dark-toggle { animation-delay: .9s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   SECCIONES
   ========================================================= */

.section {
  padding: 5rem 0;
}

.section.alt {
  background: #eef2f7;
}

.section-tag {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green-main);
  padding: .35rem .9rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.section-intro {
  max-width: 640px;
  margin-bottom: 3rem;
  color: var(--text-soft);
}

/* SERVICIOS */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 2rem;
}

.service-card {
  background: white;
  border-radius: 16px;
  padding: 2.4rem;
  box-shadow: 0 12px 30px rgba(0,0,0,.07);
  transition: transform .4s, box-shadow .4s;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
}

.service-card li {
  color: var(--text-soft);
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1.4rem;
}

.stat-box {
  padding: 1.8rem;
  background: white;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

/* VIDEOS */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
  gap: 2rem;
}

.video-card {
  background: white;
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

video {
  width: 100%;
  border-radius: 10px;
  margin-top: 1rem;
}

/* CONTACTO */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-form {
  background: white;
  padding: 2.6rem;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,.1);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: .7rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

.contact-form button {
  background: var(--green-main);
  color: white;
  border: none;
  padding: .8rem;
  border-radius: 999px;
  font-weight: 700;
}

/* FOOTER */
.footer {
  background: var(--blue-dark);
  color: #c9d6f2;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 2.5rem;
}

.footer h4 {
  color: white;
}

.footer a {
  display: block;
  margin-top: .5rem;
}

.copy {
  text-align: center;
  padding: 1.5rem;
  font-size: .85rem;
  opacity: .8;
}

/* DARK MODE */
body.dark {
  background: #0b1324;
  color: #e5e7eb;
}

body.dark .section.alt,
body.dark .section {
  background: #0f172a;
}

body.dark .service-card,
body.dark .stat-box,
body.dark .video-card,
body.dark .contact-form {
  background: #0b1e39;
  color: #e5e7eb;
}

body.dark .footer {
  background: #020617;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.3rem;
  }
}

/* -------- COOKIES -------- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #0b1e39;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: none;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  z-index: 999;
}

.cookie-banner p {
  font-size: 0.9rem;
}

.cookie-buttons button {
  margin-left: 0.5rem;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

#acceptCookies {
  background: var(--green-main);
  color: white;
}

.cookie-link {
  color: var(--green-main);
  text-decoration: underline;
  font-weight: 600;
}

#rejectCookies {
  background: transparent;
  border: 1px solid #fff;
  color: white;
}

.checkbox {
  display: block;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 1rem 0;
}

.checkbox input {
  margin-right: 0.5rem;
}

.checkbox a {
  color: var(--green-main);
  text-decoration: underline;
}