:root {
  --text: #0f172a;
  --muted: #475569;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --bg: #f8fafc;
  --surface: #ffffff;
  --ring: rgba(37, 99, 235, 0.28);
}

/* === Base general === */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { text-decoration: none; color: var(--primary); }
img { max-width: 100%; display: block; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Encabezado === */
.site-header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 50;
  border-bottom: 1px solid #e2e8f0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; }
.brand-text { line-height: 1; }
.brand-text strong { font-weight: 800; }
.brand-text span { font-size: 12px; color: #64748b; }

.nav a { color: var(--text); font-weight: 600; }
.nav-links {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 28px;
}

/* === Secciones generales === */
.section { padding: 70px 0; }
.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
  align-items: center;
}
.grid.two.reverse .content-card { order: 2; }
.grid.two.reverse .media-card { order: 1; }

.content-card h2 { margin: 0 0 6px; font-size: 30px; }
.h3 { margin: 6px 0 4px; font-size: 18px; color: #0b132b; }

.ticks { list-style: none; margin: 6px 0 0; padding: 0; }
.ticks li {
  margin: 10px 0;
  padding-left: 28px;
  position: relative;
}
.ticks li:before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 900;
}

.lead { color: #475569; margin-top: 8px; }

/* === Imágenes y efectos === */
.media-card img {
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(2,6,23,.14);
  width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.media-card img.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* === Formularios === */
.contact .contact-form {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 14px 50px rgba(2,6,23,.06);
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin: 8px 0;
  outline: none;
}
.contact-form input:focus, .contact-form textarea:focus {
  box-shadow: 0 0 0 4px var(--ring);
  border-color: var(--primary);
}

/* === Botones === */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: .2s;
}
.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn.primary:hover { background: var(--primary-2); }
.btn.ghost {
  border-color: #cbd5e1;
  color: #0b1220;
  background: #fff;
}
.btn.full { width: 100%; }

/* === Pie de página === */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  text-align: center;
  padding: 26px 0;
}

/* === WhatsApp flotante === */
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.35); }
  60% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@keyframes fadeInUpWhatsApp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #fff;
  font-size: 28px;
  box-shadow: 0 14px 40px rgba(2,6,23,.22);
  z-index: 60;
  animation: fadeInUpWhatsApp 1.2s ease forwards, pulse 12s infinite ease-in-out;
  opacity: 0;
  transition: transform 0.3s ease;
}
.whatsapp:hover { transform: scale(1.1); }
.whatsapp:active {
  transform: scale(0.95);
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
body.loaded .whatsapp { opacity: 1; }

/* === Carrusel === */
.obras-carousel .carousel {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 14px 40px rgba(2,6,23,.06);
}
.obras-carousel .slides { position: relative; height: 360px; }
.obras-carousel .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.obras-carousel .slide.active { opacity: 1; }
.obras-carousel img { width: 100%; height: 100%; object-fit: cover; }
.obras-carousel figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.55));
  color: #fff;
  padding: 10px 12px;
  font-size: 14px;
}
.obras-carousel .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,23,42,.6);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.obras-carousel .nav:hover { background: rgba(15,23,42,.8); }
.obras-carousel .nav.prev { left: 10px; }
.obras-carousel .nav.next { right: 10px; }

@media (max-width: 560px) {
  .obras-carousel .slides { height: 240px; }
}

/* === Responsive general === */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    right: 12px;
    top: 68px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    flex-direction: column;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(2,6,23,.1);
  }
  .nav-links.show { display: flex; }
  .brand-logo { width: 42px; height: 42px; }
}

/* === Hero === */
.hero-clean {
  min-height: 72vh;
  background-image: linear-gradient(rgba(6,16,40,0.55), rgba(6,16,40,0.55)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-clean .hero-content { padding: 60px 0; }
.hero-clean h1 {
  font-size: 42px;
  line-height: 1.05;
  margin: 0 0 10px;
  font-weight: 800;
  text-shadow: 0 10px 34px rgba(0,0,0,.38);
}
.hero-clean .sub {
  max-width: 800px;
  color: #e5e7eb;
  margin: 0 0 18px;
}
@media (max-width: 980px) {
  .hero-clean { min-height: 62vh; }
}

/* === Ajuste móvil === */
@media (max-width: 768px) {
  .grid.two {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .content-card, .media-card { text-align: center; }
  .content-card h2 { font-size: 26px; }
  .lead { font-size: 15px; line-height: 1.5; }
  .media-card img {
    width: 100%;
    max-height: 320px;
    border-radius: 14px;
  }
  .grid.two.reverse .content-card { order: 2; }
  .grid.two.reverse .media-card { order: 1; }
}

/* === Corrección final de alineado en listas móviles === */
@media (max-width: 768px) {
  .content-card { text-align: left !important; } /* fuerza el texto a la izquierda */
  .ticks { text-align: left; padding-left: 0; margin-left: 0; }
  .ticks li { text-align: left; margin-left: 0; padding-left: 28px; }
}

/* === Ajuste visual mejorado del logo Sotelco SpA === */
.brand-logo {
  width: 90px !important;    /* Aumenta tamaño visible del logo */
  height: 90px !important;
  object-fit: contain;
  border-radius: 8px;
  transition: all 0.3s ease; /* Transición suave al cambiar tamaño */
}

@media (max-width: 980px) {
  .brand-logo {
    width: 60px !important;  /* Logo más visible en móviles */
    height: 60px !important;
  }
}

/* === SEO Visual y Accesibilidad === */
.hero-clean h1, .hero-clean h2 {
  text-shadow: 0 3px 8px rgba(0,0,0,0.45);
}
.sub {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #f0f4f8;
}
