/* ============================================================
   AQUAPONICS Costa del Sol — static replica stylesheet
   Dark neutral theme (gray palette):
     --blue       #b8c0ca  (links / accents, light gray)
     --blue2      #e3e7ed  (link hover)
     --blue-deep  #414852  (button / hero / CTA backgrounds, gray)
     --text       #e8ebf2  (body text, light)
     --muted      #98a2b6  (secondary text)
     --bg         #000000  (main background, dark)
     --topbar     #0a0e14 / #8b94a3
     --footer     #0a0e14 / #e8ebf2 / #8b94a3
     --accent     #ef6d00  (CTA orange)
   ============================================================ */

:root {
  --blue: #b8c0ca;
  --blue2: #e3e7ed;
  --blue-deep: #414852;
  --blue-soft: #252a32;
  --text: #e8ebf2;
  --muted: #98a2b6;
  --bg: #000000;
  --bg-soft: #ffffff;
  --black: #000000;
  --topbar-bg: #0a0e14;
  --topbar-text: #8b94a3;
  --footer-bg: #0a0e14;
  --footer-text: #e8ebf2;
  --footer-link: #8b94a3;
  --accent: #ef6d00;
  --accent-dark: #de6906;
  --green: #7cb342;
  --border: #252e3d;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --maxw: 1180px;
  --font: "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--blue-deep); color: #fff;
  padding: 8px 14px; z-index: 2000; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--bg);
  color: var(--topbar-text);
  font-size: 0.85rem;
  position: sticky; top: 0; z-index: 1002;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 16px; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
.topbar a { color: var(--topbar-text); }
.topbar a:hover { color: var(--accent); }
.topbar .tb-left, .topbar .tb-right { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.topbar .icon { margin-right: 5px; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 38px; z-index: 1000;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 74px; }
.brand { display: flex; align-items: center; }
.brand img { height: 52px; width: auto; }

.main-nav { display: flex; align-items: center; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav > ul > li { position: relative; }
.main-nav a.nav-link {
  display: block; padding: 10px 16px; color: var(--text); font-weight: 500; font-size: 0.98rem;
  border-radius: 6px;
}
.main-nav a.nav-link:hover { color: var(--accent); }
.main-nav li.active > a.nav-link { color: var(--green); font-weight: 700; }

/* dropdown */
.has-dropdown .dropdown {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); padding: 8px 0; opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: all .18s ease; z-index: 1100;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block; padding: 9px 18px; color: var(--text); font-size: 0.94rem;
}
.dropdown a:hover { color: var(--accent); background: var(--blue-soft); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, #1b212a 0%, #2b333f 55%, #151a21 100%);
}
.hero.slide-bg { background-size: cover; background-position: center; }
.hero .overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(9,11,15,.85) 0%, rgba(25,30,38,.6) 60%, rgba(25,30,38,.28) 100%); }
.hero .container { position: relative; z-index: 2; min-height: 62vh; display: flex; align-items: center; }
.hero-inner { max-width: 720px; padding: 70px 0; }
.hero h1, .hero .hero-title { color: #fff; font-size: clamp(2rem, 5.4vw, 3.6rem); margin-bottom: .4em; }
.hero .hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.5rem); color: rgba(255,255,255,.92); margin-bottom: 1.4em; font-weight: 400; }
.hero .op4 { color: #ffd77a; }

/* page hero (inner pages) */
.page-hero {
  position: relative; color: #fff; background-size: cover; background-position: center;
  background-color: var(--blue-deep);
}
.page-hero .overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(9,11,15,.85) 0%, rgba(25,30,38,.7) 100%); }
.page-hero .container { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 72px; text-align: center; }
.page-hero h1 { color: #fff; margin-bottom: .35em; font-size: calc(clamp(2rem, 5vw, 3.2rem) + 3pt); }
.page-hero p { color: rgba(255,255,255,.92); font-size: 1.12rem; max-width: 680px; margin: 0; }
.breadcrumbs { display: none; }
.breadcrumbs a { color: #fff; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 6px; font-weight: 600;
  background: #556b2f; color: #fff; border: 0; cursor: pointer; font-size: 1rem;
  transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn.blue { background: #556b2f; }
.btn.blue:hover { background: var(--accent); }
.btn.outline { background: transparent; border: 2px solid #fff; }
.btn.outline:hover { background: rgba(255,255,255,.12); }
.btn.sm { padding: 8px 16px; font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-soft); color: #1a1a1a; }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head.left { text-align: left; margin-left: 0; }
.kicker { display: block; color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; margin-bottom: 8px; }
.section-head h2 { margin-bottom: .35em; font-size: calc(clamp(1.6rem, 3.4vw, 2.3rem) + 2pt); }
.section.alt .section-head h2 { color: var(--black); }
.section.alt h2, .section.alt h3, .section.alt h4 { color: #141414; }
.section.alt p { color: #3b3b3b; }
.section.alt .kicker { color: #5a5a5a; }
.section.alt .section-head p { color: #4a4a4a; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.35); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .card-img { aspect-ratio: 4/3; background: #232c3a; overflow: hidden; }
.card .card-img img { width: 100%; height: 100%; object-fit: cover; }
/* product cards: fit whole product photo (white bg) into the box, no crop/zoom */
.card-product .card-img { background: #fff; }
.card-product .card-img img { object-fit: contain; }
.card .card-body { padding: 20px; }
.card .card-body h3 { font-size: 1.12rem; margin-bottom: .4em; }
.card .card-body h3 a { color: var(--text); }
.card .card-body h3 a:hover { color: var(--accent); }
.card .card-body p { color: var(--muted); margin: 0; font-size: .95rem; }
.card .tag { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--blue); font-weight: 700; margin-bottom: 8px; }

.feature { padding: 28px 22px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.feature .f-icon { width: 46px; height: 46px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 14px; }
.feature h3 { font-size: 1.05rem; margin-bottom: .35em; }
.feature h3 a:hover { color: var(--accent); }
.feature p { color: var(--muted); margin: 0; font-size: .93rem; }

/* steps */
.steps { counter-reset: step; }
.step { display: flex; gap: 20px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: 0; }
.step .n {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; background: var(--blue-deep);
  color: #fff; font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: .25em; }
.step p { color: var(--muted); margin: 0; }

/* people */
.person { text-align: center; }
.person .card-img { aspect-ratio: 1/1; }
.person .card-img img { object-fit: cover; object-position: top; }
.person .name { font-weight: 700; margin: 0; font-size: 1.02rem; }
.person .role { color: var(--muted); font-size: .85rem; margin: 2px 0 0; }

/* members / clients logos */
.members { display: flex; gap: 28px; align-items: center; justify-content: center; flex-wrap: wrap; }
.members img { max-height: 56px; width: auto; opacity: .9; }

/* ---------- Product / project cards ---------- */
.price { color: var(--accent); font-weight: 700; font-size: 1.15rem; }
.meta-line { font-size: .9rem; color: var(--muted); }

/* list bullet blocks */
.bullets { display: grid; gap: 16px; }
.bullet { display: flex; gap: 14px; }
.bullet .b-dot { color: var(--blue); font-weight: 700; flex: 0 0 auto; }
.bullet h4 { margin: 0 0 .2em; font-size: 1.02rem; }
.bullet p { margin: 0; color: var(--muted); font-size: .95rem; }

/* prose */
.prose { max-width: 800px; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; }
.prose blockquote {
  margin: 1.2em 0; padding: 16px 22px; border-left: 4px solid var(--blue);
  background: var(--blue-soft); border-radius: 0 8px 8px 0; color: var(--text);
}

/* hero slideshow */
.hero[data-hero] .hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero[data-hero] .hero-slide .container { min-height: 62vh; display: flex; align-items: center; }
.hero-dots { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 5; }
.hero-dot { width: 34px; height: 4px; border: 0; border-radius: 4px; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; transition: background .2s; }
.hero-dot.active { background: #fff; }

/* video background section */
.video-section { position: relative; overflow: hidden; padding: 0; background: #1b212a; }
.video-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.video-overlay { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(10,12,16,.88) 0%, rgba(22,26,33,.55) 100%); z-index: 1; }
.video-section .container { position: relative; z-index: 2; padding-top: 80px; padding-bottom: 80px; }
.video-section .section-head h2 { color: #fff; }
.video-section .section-head p { color: rgba(255,255,255,.92); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--blue-deep); color: #fff; padding: 56px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); }
.cta-band .cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 56px 0 0; font-size: .94rem; }
.site-footer .container { padding-bottom: 20px; }
.site-footer a { color: var(--footer-link); }
.site-footer a:hover { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .82rem; color: var(--footer-link); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-logo { max-height: 46px; margin-bottom: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; position: relative; z-index: 1005; cursor: pointer; }
  .main-nav {
    position: fixed; top: 0; right: -100%; width: min(84vw, 340px); height: 100vh;
    background: var(--bg); flex-direction: column; align-items: stretch; padding: 80px 20px 20px;
    transition: right .25s ease; box-shadow: -8px 0 30px rgba(0,0,0,.15); overflow-y: auto;
  }
  .main-nav.open { right: 0; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a.nav-link { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .has-dropdown .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; min-width: 0; padding-left: 14px; display: none; }
  .has-dropdown.open .dropdown { display: block; }
  .nav-close { position: absolute; top: 18px; right: 18px; }
  .nav-toggle.nav-close span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.nav-close span:nth-child(2) { opacity: 0; }
  .nav-toggle.nav-close span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .site-header { top: 34px; }  /* pegado bajo el topbar movil (altura real ~34.4px) */

  /* email -> solo icono mailto en vertical (linea no se rompe) */
  .topbar .tb-left span:first-child { display: flex; align-items: center; }
  .topbar .tb-left span:first-child .icon { margin-right: 0; }
  .topbar .tb-left span:first-child a { font-size: 0; line-height: 0; }
  .topbar .tb-left span:first-child a::after { content: "\2709"; font-size: 1rem; line-height: 1; color: var(--topbar-text); }
  .topbar .tb-left span:first-child a:hover::after { color: var(--accent); }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0; }
  .topbar .container { justify-content: space-between; flex-wrap: nowrap; gap: 8px; min-height: 0; padding: 6px 6px; }
  .topbar .tb-left, .topbar .tb-right { gap: 8px; flex-wrap: nowrap; white-space: nowrap; }
  .topbar .tb-left span { display: inline-flex; align-items: center; white-space: nowrap; }
  .topbar .tb-right span { white-space: nowrap; }
  .hero .container { min-height: 56vh; }
  .cta-band .cta-inner { justify-content: center; text-align: center; }
}

/* ---------- Pantalla de luz (lightbox) al hacer click en persona ---------- */
.person .card-img img { cursor: zoom-in; }
.lightbox {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,.92); z-index: 5000; align-items: center; justify-content: center;
  animation: lb-fade .25s ease;
}
.lightbox.open { display: flex; }
.lightbox .lb-figure { display: flex; flex-direction: column; align-items: center; max-width: 92vw; max-height: 92vh; }
.lightbox .lb-figure img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lightbox .lb-caption { color: #eee; text-align: center; margin-top: 14px; padding: 0 10px; }
.lightbox .lb-caption .lb-name { font-weight: 700; font-size: 1.05rem; color: #fff; margin: 0; }
.lightbox .lb-caption .lb-role { color: #cfcfcf; font-size: .92rem; margin: 3px 0 0; }
.lightbox .lb-close {
  position: absolute; top: 18px; right: 26px; color: #fff; font-size: 42px; line-height: 1;
  cursor: pointer; background: none; border: 0; font-weight: 300; z-index: 5;
}
.lightbox .lb-close:hover { color: var(--accent); }
.lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%); color: #fff; background: rgba(255,255,255,.08);
  border: 0; font-size: 34px; width: 52px; height: 64px; cursor: pointer; border-radius: 8px; z-index: 5;
}
.lightbox .lb-prev { left: 14px; } .lightbox .lb-next { right: 14px; }
.lightbox .lb-prev:hover, .lightbox .lb-next:hover { background: rgba(255,255,255,.2); }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
/* Project detail template */
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.project-meta .pill { display: inline-block; background: var(--blue-soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: .82rem; color: var(--muted); }
.project-meta .pill strong { color: var(--text); font-weight: 600; margin-right: 4px; }
.project-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.project-gallery a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.project-gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; transition: transform .2s ease; }
.project-gallery a:hover img { transform: scale(1.05); }
.count-green { color: var(--green); font-weight: 700; }
