/* ═══════════════════════════════════════════
   DITEV — Components
   Nav · Footer · Buttons · Cards · Forms · Misc
   ═══════════════════════════════════════════ */

/* ══════════════════════════
   NAV
══════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: box-shadow var(--ease);
}

.nav--scrolled {
  box-shadow: var(--shadow-md);
}

.nav__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav__logo-mark {
  width: 40px;
  height: 40px;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--navy);
  line-height: 1;
}

.nav__logo-text em {
  font-style: normal;
  color: var(--red);
}

.nav__logo-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-400);
  line-height: 1;
  margin-top: 2px;
}

/* Links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav__link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--grey-700);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
  white-space: nowrap;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--navy);
  transform: scaleX(0);
  transition: transform var(--ease);
  border-radius: 1px;
}

.nav__link:hover,
.nav__link.active {
  color: var(--navy);
}

.nav__link:hover::after,
.nav__link.active::after {
  transform: scaleX(1);
}

/* CTA */
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--red);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-sm);
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  white-space: nowrap;
  margin-left: 0.75rem;
}

.nav__cta:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
  box-shadow: var(--shadow-navy);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
  transition: var(--ease);
}

.nav__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.nav__drawer {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 2px solid var(--navy);
  padding: 1rem var(--gutter) 1.5rem;
  box-shadow: var(--shadow-md);
}

.nav__drawer.open { display: flex; }

.nav__drawer .nav__link {
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
}

.nav__drawer .nav__cta {
  margin-left: 0;
  margin-top: 0.5rem;
  justify-content: center;
}

/* ══════════════════════════
   FOOTER
══════════════════════════ */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 4rem var(--gutter) 3rem;
  max-width: var(--max-width);
  margin-inline: auto;
}

.footer__brand .nav__logo-text {
  color: var(--white);
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.footer__brand .nav__logo-sub { margin-top: 3px; }

.footer__brand p {
  font-size: 0.875rem;
  line-height: 1.65;
  margin-top: 1rem;
  max-width: 280px;
}

.footer__heading {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer__list li { margin-bottom: 0.5rem; }

.footer__list a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--ease);
}

.footer__list a:hover { color: var(--white); }

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 0.6rem;
}

.footer__contact-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--red);
  width: 16px;
  height: 16px;
}

.footer__contact-item a {
  color: rgba(255,255,255,0.7);
  transition: color var(--ease);
}
.footer__contact-item a:hover { color: var(--white); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.4rem var(--gutter);
  max-width: var(--max-width);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.footer__orbinox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

.footer__orbinox strong { color: rgba(255,255,255,0.7); }

/* ══════════════════════════
   BUTTONS
══════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--ease);
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Primary (red) */
.btn--primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn--primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--red-glow);
}

/* Secondary (navy) */
.btn--secondary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn--secondary:hover {
  background: var(--navy-medium);
  border-color: var(--navy-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-navy);
}

/* Outline navy */
.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

/* Outline white (sobre fondos oscuros) */
.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

.btn--outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

.btn--lg {
  padding: 1rem 2.2rem;
  font-size: 0.95rem;
}

.btn--sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
}

/* ══════════════════════════
   CARDS
══════════════════════════ */

/* Segment card */
.segment-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: 2.2rem 1.8rem;
  transition: all var(--ease-slow);
  position: relative;
  overflow: hidden;
}

.segment-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform var(--ease-slow);
}

.segment-card:hover {
  border-color: var(--grey-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.segment-card:hover::before { transform: scaleX(1); }

.segment-card__icon {
  width: 52px;
  height: 52px;
  color: var(--navy);
  margin-bottom: 1.2rem;
}

.segment-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.segment-card p {
  font-size: 0.9rem;
  color: var(--grey-600);
  line-height: 1.65;
}

/* Product card */
.product-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--ease-slow);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-card__thumb {
  background: var(--grey-100);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--grey-200);
  transition: background var(--ease);
}

.product-card:hover .product-card__thumb {
  background: var(--grey-200);
}

.product-card__thumb svg {
  width: 72px;
  height: 72px;
  color: var(--navy);
  opacity: 0.5;
}

.product-card__body {
  padding: 1.4rem 1.4rem 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__family {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--red);
  margin-bottom: 0.4rem;
}

.product-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.product-card p {
  font-size: 0.875rem;
  color: var(--grey-600);
  line-height: 1.6;
  flex: 1;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--grey-200);
}

.product-card__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-400);
  background: var(--grey-100);
  padding: 3px 8px;
  border-radius: 3px;
}

/* Stat card */
.stat-card {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-card__number {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-card__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--grey-500);
}

/* ══════════════════════════
   FORMS
══════════════════════════ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--grey-700);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius-sm);
  color: var(--grey-800);
  font-size: 0.9rem;
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0,51,102,0.08);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-group select { appearance: none; cursor: pointer; }

.form-error {
  font-size: 0.8rem;
  color: var(--red);
  margin-top: 0.3rem;
  display: none;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--red);
}

.form-group.has-error .form-error { display: block; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ══════════════════════════
   BADGE / TAG
══════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
}

.badge--navy {
  background: rgba(0,51,102,0.1);
  color: var(--navy);
  border: 1px solid rgba(0,51,102,0.2);
}

.badge--red {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(204,0,0,0.2);
}

.badge--dot::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
}

/* ══════════════════════════
   ICON BOX
══════════════════════════ */
.icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-box--navy { background: rgba(0,51,102,0.08); color: var(--navy); }
.icon-box--red  { background: var(--red-dim); color: var(--red); }

.icon-box svg { width: 26px; height: 26px; }

/* ══════════════════════════
   DIVIDER
══════════════════════════ */
.divider {
  border: none;
  height: 1px;
  background: var(--grey-200);
  margin-block: 2rem;
}

/* ══════════════════════════
   ALERT / NOTICE
══════════════════════════ */
.alert {
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert--success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ══════════════════════════
   RESPONSIVE — Nav
══════════════════════════ */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta   { display: none; }
  .nav__hamburger { display: flex; }

  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 560px) {
  .footer__top {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .form-row { grid-template-columns: 1fr; }
}

/* ── Ficha técnica — botón descarga ────────────────────────────────────────── */
.datasheet-btn-wrap {
  margin-bottom: 1.25rem;
}

.datasheet-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}

.datasheet-btn:hover {
  background: var(--navy);
  color: var(--white);
}

/* ── Ficha técnica — botón inline por tarjeta de válvula ─────────────────── */
.ds-btn-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 0.28rem 0.6rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.ds-btn-inline:hover {
  background: var(--red);
  color: var(--white);
}

.ds-btn-inline svg {
  flex-shrink: 0;
}
