/* ============================================
   SEPRE SISO E.A.T. — Estilos corporativos
   ============================================ */

:root {
  --rojo: #c81e1e;
  --rojo-oscuro: #9f1616;
  --ambar: #eab308;
  --ambar-suave: #fef9c3;
  --pizarra: #1e293b;
  --pizarra-suave: #334155;
  --fondo: #f8fafc;
  --blanco: #ffffff;
  --texto: #334155;
  --texto-claro: #64748b;
  --borde: #e2e8f0;
  --sombra: 0 10px 30px rgba(15, 23, 42, 0.08);
  --sombra-suave: 0 4px 14px rgba(15, 23, 42, 0.06);
  --radio: 12px;
  --radio-sm: 8px;
  --nav-h: 72px;
  --transicion: 0.25s ease;
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1140px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--fuente);
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--rojo);
  text-decoration: none;
  transition: color var(--transicion);
}

a:hover {
  color: var(--rojo-oscuro);
}

ul {
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--fondo);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.75rem;
}

.section-eyebrow {
  display: inline-block;
  color: var(--rojo);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.section-header h2,
.subsection-title {
  color: var(--pizarra);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

.section-lead {
  color: var(--texto-claro);
  font-size: 1.05rem;
}

.subsection-title {
  font-size: 1.25rem;
  margin: 2rem 0 1.25rem;
}

.card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-suave);
  padding: 1.75rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radio-sm);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transicion), color var(--transicion), border-color var(--transicion), transform var(--transicion);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--rojo);
  color: var(--blanco);
}

.btn-primary:hover {
  background: var(--rojo-oscuro);
  color: var(--blanco);
}

.btn-whatsapp {
  background: #16a34a;
  color: var(--blanco);
}

.btn-whatsapp:hover {
  background: #15803d;
  color: var(--blanco);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--borde);
  transition: box-shadow var(--transicion);
}

.navbar.scrolled {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--pizarra);
}

.logo:hover {
  color: var(--pizarra);
}

.logo-img {
  width: 48px;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--rojo) 0%, #ef4444 100%);
  color: var(--blanco);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 14px rgba(200, 30, 30, 0.35);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text strong {
  font-size: 1rem;
}

.logo-text small {
  font-size: 0.75rem;
  color: var(--texto-claro);
  font-weight: 600;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  color: var(--pizarra-suave);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--rojo);
  background: rgba(200, 30, 30, 0.06);
}

.nav-cta {
  background: var(--rojo);
  color: var(--blanco) !important;
  margin-left: 0.35rem;
}

.nav-cta:hover {
  background: var(--rojo-oscuro);
  color: var(--blanco) !important;
}

.nav-login {
  background: transparent;
  color: var(--pizarra) !important;
  border: 2px solid var(--rojo);
  margin-left: 0.35rem;
}

.nav-login:hover,
.nav-login.active {
  background: var(--rojo);
  color: var(--blanco) !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--borde);
  border-radius: var(--radio-sm);
  background: var(--blanco);
  cursor: pointer;
  place-items: center;
  gap: 5px;
  flex-direction: column;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pizarra);
  transition: transform var(--transicion), opacity var(--transicion);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: center;
  color: var(--blanco);
  background:
    linear-gradient(120deg, rgba(30, 41, 59, 0.92) 0%, rgba(30, 41, 59, 0.75) 45%, rgba(200, 30, 30, 0.55) 100%),
    radial-gradient(circle at 20% 20%, rgba(234, 179, 8, 0.25), transparent 40%),
    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.04'%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"),
    linear-gradient(160deg, #0f172a, #1e293b 50%, #7f1d1d);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(15, 23, 42, 0.35));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0;
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(234, 179, 8, 0.18);
  color: var(--ambar);
  border: 1px solid rgba(234, 179, 8, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--ambar);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #cbd5e1;
  max-width: 620px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-badges li {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #e2e8f0;
}

/* ---------- Nosotros ---------- */
.nosotros-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.info-card h3 {
  color: var(--pizarra);
  margin-bottom: 0.85rem;
  font-size: 1.25rem;
}

.info-card p {
  margin-bottom: 1rem;
}

.legal-list li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--borde);
  color: var(--texto);
}

.legal-list li:last-child {
  border-bottom: 1px solid var(--borde);
}

.info-card.accent {
  background: linear-gradient(160deg, var(--pizarra) 0%, #0f172a 100%);
  color: #e2e8f0;
  border-color: transparent;
}

.info-card.accent h3,
.info-card.accent h4 {
  color: var(--blanco);
}

.gerente-name {
  color: var(--ambar) !important;
  font-weight: 700;
  font-size: 1.1rem;
}

.team-note {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.team-note h4 {
  margin-bottom: 0.5rem;
}

/* ---------- Servicios / Tabs ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.tab-btn {
  border: 1px solid var(--borde);
  background: var(--blanco);
  color: var(--pizarra-suave);
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transicion);
}

.tab-btn:hover {
  border-color: var(--rojo);
  color: var(--rojo);
}

.tab-btn.active {
  background: var(--rojo);
  border-color: var(--rojo);
  color: var(--blanco);
  box-shadow: 0 8px 18px rgba(200, 30, 30, 0.28);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.35s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.15rem;
}

.service-card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.4rem;
  box-shadow: var(--sombra-suave);
  transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
  border-color: rgba(200, 30, 30, 0.25);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ambar-suave);
  color: var(--pizarra);
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}

.service-card h3 {
  color: var(--pizarra);
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.service-card p {
  color: var(--texto-claro);
  font-size: 0.92rem;
}

/* ---------- Clientes ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.project-card {
  background: var(--pizarra);
  color: var(--blanco);
  border-radius: var(--radio);
  padding: 1.35rem 1.25rem;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ambar);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

.client-item {
  background: var(--fondo);
  border: 1px solid var(--borde);
  border-radius: var(--radio-sm);
  padding: 1rem 1.1rem;
  text-align: center;
  font-weight: 600;
  color: var(--pizarra);
  transition: border-color var(--transicion), background var(--transicion);
}

.client-item:hover {
  border-color: var(--rojo);
  background: #fff5f5;
}

/* ---------- Contacto ---------- */
.contacto-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 650;
  color: var(--pizarra);
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--borde);
  border-radius: var(--radio-sm);
  padding: 0.8rem 0.95rem;
  font: inherit;
  color: var(--pizarra);
  background: var(--blanco);
  transition: border-color var(--transicion), box-shadow var(--transicion);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--rojo);
  box-shadow: 0 0 0 3px rgba(200, 30, 30, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-feedback {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radio-sm);
  font-weight: 600;
  font-size: 0.92rem;
}

.form-feedback.ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.form-feedback.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.contact-info h3 {
  color: var(--pizarra);
  margin-bottom: 1.1rem;
}

.contact-list li {
  margin-bottom: 1.1rem;
}

.contact-list strong {
  display: block;
  color: var(--pizarra);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.contact-list span {
  color: var(--texto);
  font-size: 0.95rem;
}

.map-embed {
  margin-top: 1.25rem;
  border-radius: var(--radio);
  overflow: hidden;
  border: 1px solid var(--borde);
  aspect-ratio: 16 / 11;
  background: var(--fondo);
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Galería ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: var(--radio);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--pizarra);
  aspect-ratio: 4 / 3;
  box-shadow: var(--sombra-suave);
  transition: transform var(--transicion), box-shadow var(--transicion);
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--sombra);
  outline: 2px solid var(--rojo);
  outline-offset: 2px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.85));
  color: var(--blanco);
  font-size: 0.85rem;
  font-weight: 650;
  text-align: left;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-figure {
  max-width: min(960px, 100%);
  max-height: 90vh;
  margin: 0;
  text-align: center;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radio-sm);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.lightbox-figure figcaption {
  color: #e2e8f0;
  margin-top: 0.85rem;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--blanco);
  cursor: pointer;
  border-radius: 999px;
  transition: background var(--transicion);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--rojo);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  font-size: 1.75rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

body.lightbox-open {
  overflow: hidden;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--pizarra);
  color: #cbd5e1;
  padding-top: 3.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer h4 {
  color: var(--blanco);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-brand p {
  margin-top: 0.85rem;
  max-width: 340px;
}

.footer-legal {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.7;
}

.logo-footer .logo-img {
  background: var(--blanco);
  border-radius: 50%;
  padding: 0.2rem;
}

.logo-footer .logo-text strong {
  color: var(--blanco);
}

.logo-footer .logo-text small {
  color: #94a3b8;
}

.footer-links li {
  margin-bottom: 0.55rem;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: var(--ambar);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.1rem 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1100;
  background: #16a34a;
  color: var(--blanco);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.4);
  transition: transform var(--transicion), background var(--transicion);
}

.whatsapp-float:hover {
  background: #15803d;
  color: var(--blanco);
  transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .nosotros-grid,
  .contacto-grid,
  .footer-grid,
  .projects-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contacto-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: grid;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--blanco);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.35rem;
    border-bottom: 1px solid var(--borde);
    box-shadow: var(--sombra);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transicion), opacity var(--transicion);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    padding: 0.9rem 1rem;
    border-radius: var(--radio-sm);
  }

  .nav-cta,
  .nav-login {
    margin-left: 0;
    text-align: center;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 3.5rem 0 3rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nosotros-grid,
  .projects-grid,
  .gallery-grid,
  .footer-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .lightbox-nav {
    display: none;
  }

  .tabs {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
    text-align: center;
  }

  .section {
    padding: 3.5rem 0;
  }

  .whatsapp-float {
    right: 0.85rem;
    bottom: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero-badges li {
    width: 100%;
    text-align: center;
  }

  .cards-grid,
  .clients-grid {
    grid-template-columns: 1fr;
  }
}
