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

:root {
  --color-black: #111111;
  --color-white: #ffffff;
  --color-light: #d8d8d8;
  --color-gray: #d9d9d9;
  --color-text: #222222;
  --radius: 12px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

html {
  scroll-behavior: smooth;
}

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

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

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

/* =========================================================
   2) LAYOUT
========================================================= */
.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.section {
  padding: 2.5rem 0;
}

.section h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  margin-bottom: 0.75rem;
}

.section-intro {
  max-width: 680px;
  margin-bottom: 2rem;
  color: #555555;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--color-light);
  border-radius: 999px;
}

.button {
  display: inline-block;
  background: var(--color-black);
  color: var(--color-white);
  border: 1px solid var(--color-black);
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-invert {
  background: var(--color-white);
  color: var(--color-black);
}

/* =========================================================
   3) NAVBAR
========================================================= */
.site-header {
  border-bottom: 1px solid #ededed;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.logo img{
  height: 50px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  font-weight: 600;
  padding: 0.35rem 0.45rem;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: var(--color-black);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-gray);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

/* =========================================================
   4) HERO
========================================================= */

.hero {
  background: linear-gradient(140deg, #f5f5f5 0%, #ffffff 70%);
  padding: 1rem 0;
}


.hero-bottom {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-bottom .button {
  flex-shrink: 0;
}

.hero-bottom .carousel {
  flex: 1;
  margin-top: 1rem;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

#textoInicio {
  flex: 1;
}

#logoInicio {
  flex: 1;
  display: flex;
  justify-content: center;
}

#logoInicio img {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.hero-small {
  padding: 4.5rem 0;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 650px;
  color: #4e4e4e;
  margin-bottom: 1.5rem;
}

/* =========================================================
   4.1) WSP
========================================================= */
.whatsapp-float {
  display: none;
}
.contact-principal {
  text-align: center;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;

  background: #25D366;
  color: #fff;

  padding: 1.25rem 2.5rem;
  border-radius: var(--radius);

  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;

  box-shadow: 0 8px 24px rgba(37, 211, 102, .35);

  transition:
    transform .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

.whatsapp-button svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
  flex-shrink: 0;
}

.whatsapp-button:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, .45);
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.contact-card {
  padding: 1.5rem;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
}

.contact-card a {
  font-weight: 600;
  text-decoration: none;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-links a {
  width: 60px;
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: #f5f5f5;

  transition: transform .2s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
}

.social-links svg {
  width: 28px;
  height: 28px;
}
@media (max-width: 768px) {
  .contact-info {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   5) CARDS
========================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--color-white);
  border: 1px solid #e7e7e7;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

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

.card p {
  color: #555555;
}
/* =========================================================
   6) TRABAJOS
========================================================= */
.comparacion {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.trabajos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.trabajo {
  position: relative;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-cerrar {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 3rem;
  cursor: pointer;
}

.trabajo img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.comparacion img {
  width: 100%;
  max-height: 350px;
  object-fit: contain;
}

.trabajo p {
  padding: 0.5rem 0;
  margin-top: 0.75rem;
  color: #555555; /* mismo gris que section-intro */
  font-size: 0.95rem;
}
.imagen-wrapper {
  position: relative;
  cursor: pointer;
}

.imagen-wrapper::after {
  content: "⤢";
  position: absolute;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  background: rgba(0,0,0,.35);
  color: white;
  font-size: 2rem;

  opacity: 0;
  transition: opacity .2s ease;

  pointer-events: none;
}

.imagen-wrapper img {
  display: block;
  width: 100%;
  transition: filter .2s ease;
}

@media (hover: hover) {
  .imagen-wrapper:hover::after {
    opacity: 1;
  }

  .imagen-wrapper:hover img {
    filter: brightness(.75);
  }
}
/* =========================================================
   7) CTA
========================================================= */
.cta {
  background: var(--color-black);
  color: var(--color-white);
  padding: 4rem 0;
}

.cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

/* =========================================================
   8) FORM
========================================================= */
.form {
  max-width: 700px;
  display: grid;
  gap: 0.7rem;
}

.form label {
  font-weight: 700;
}

.form input,
.form textarea {
  width: 100%;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.form input:focus,
.form textarea:focus {
  outline: 2px solid #bbbbbb;
  outline-offset: 1px;
}

.form .button {
  width: fit-content;
  margin-top: 0.6rem;
}

/* =========================================================
   9) FOOTER
========================================================= */
.site-footer {
  background: #0f0f0f;
  color: var(--color-white);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.footer-grid h3 {
  margin-bottom: 0.7rem;
  font-size: 1rem;
}

.footer-grid p,
.footer-grid a {
  color: #d8d8d8;
  display: block;
  margin-bottom: 0.45rem;
}

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

/* =========================================================
   10) ANIMATIONS
========================================================= */

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}
[data-animate][data-delay] {
  animation-delay: var(--delay);
}

.carousel-slide.in-view {
  animation: floatIn 0.8s ease forwards;
}

/* =========================================================
   11) RESPONSIVE MEDIA QUERIES
========================================================= */
@media (max-width: 980px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .carousel-controls {
    margin-top: 1rem;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid #eeeeee;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 4%;
  }
  #logoInicio{
    display: none;
  }
  .section{
    margin-top: 0.2cm;
    padding-top: 0.1cm;
  }

  .nav-links.open {
    display: flex;
  }

  .cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .carousel-controls {
    display: none;
  }

  .hero,
  .hero-small {
    padding: 4rem 0;
  }

    .comparacion,
    .trabajos {
      grid-template-columns: 1fr;
    }
  
    .comparacion img,
    .trabajos img {
      width: 100%;
      height: auto;
      object-fit: initial;
    }
    .whatsapp-float {
      position: fixed;
      right: 1rem;
      bottom: 1rem;
    
      width: 60px;
      height: 60px;
    
      display: flex;
      align-items: center;
      justify-content: center;
    
      border-radius: 50%;
      background: #25d366;
    
      box-shadow: 0 4px 12px rgba(0,0,0,.25);
    
      z-index: 9999;
    
      transition: transform .2s ease;
    }
    
    .whatsapp-float svg {
      width: 32px;
      height: 32px;
      fill: white;
    }
    
    .whatsapp-float:hover {
      transform: scale(1.08);
    }
  
}
/* =========================================================
   DARK MODE
========================================================= */

.dark {
  --color-black: #ffffff;
  --color-white: #111111;
  --color-light: #1c1c1c;
  --color-gray: #3a3a3a;
  --color-text: #f2f2f2;

  --header-bg: rgba(17, 17, 17, 0.95);
  --border-color: #333333;
  --card-bg: #181818;
  --hero-start: #181818;
  --hero-end: #111111;
  --footer-bg: #000000;
  --text-secondary: #b5b5b5;
}

/* Base */

.dark body {
  background: var(--color-white);
  color: var(--color-text);
}

/* Navbar */

.dark .site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
}
.dark .logo img{
  height: 80px;
}

.dark .nav-links a:hover,
.dark .nav-links a.active {
  border-bottom-color: white;
}

.dark .nav-toggle {
  border-color: var(--border-color);
  color: var(--color-text);
}

.dark .nav-links {
  background: var(--color-white);
}

/* Hero */

.dark .hero {
  background: linear-gradient(
    140deg,
    var(--hero-start) 0%,
    var(--hero-end) 70%
  );
}

.dark .hero p {
  color: var(--text-secondary);
}

/* Secciones */

.dark .section-intro,
.dark .trabajo p,
.dark .card p {
  color: var(--text-secondary);
}

/* Cards */

.dark .card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

/* Contacto */

.dark .contact-card {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
}

.dark .social-links a {
  background: var(--card-bg);
}

/* Formulario */

.dark .form input,
.dark .form textarea {
  background: #181818;
  color: white;
  border-color: var(--border-color);
}

.dark .form input::placeholder,
.dark .form textarea::placeholder {
  color: #888;
}

.dark .form input:focus,
.dark .form textarea:focus {
  outline: 2px solid #555;
}

/* Botones */

.dark .button {
  background: white;
  color: black;
  border-color: white;
}

.dark .button:hover {
  background: #e5e5e5;
}

.dark .button-invert {
  background: transparent;
  color: white;
  border-color: white;
}

/* CTA */

.dark .cta {
  background: #000;
  color: #fff !important;
}

/* Footer */

.dark .site-footer {
  background: var(--footer-bg);
}

.dark .footer-grid p,
.dark .footer-grid a {
  color: #bdbdbd;
}

.dark .footer-grid a:hover {
  color: white;
}

/* Trabajos */

.dark .imagen-wrapper::after {
  background: rgba(255,255,255,.15);
}

/* Lightbox */

.dark .lightbox {
  background: rgba(0,0,0,.92);
}

/* Scrollbar moderna */

.dark ::-webkit-scrollbar {
  width: 10px;
}

.dark ::-webkit-scrollbar-track {
  background: #111;
}

.dark ::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 999px;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #666;
}
#theme-toggle {
  background: transparent;
  border: 1px solid var(--color-gray);
  border-radius: 999px;

  padding: 0.45rem 0.9rem;

  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;

  transition:
    background-color .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

#theme-toggle:hover {
  background: rgba(0,0,0,.05);
  transform: translateY(-1px);
}

.dark #theme-toggle {
  border-color: var(--border-color);
}

.dark #theme-toggle:hover {
  background: rgba(255,255,255,.08);
}




/* =========================================================
   SEO / UX additions
========================================================= */
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }
.dark :focus-visible { outline-color: #8ab4f8; }
.slogan { font-size: 1.15rem; color: var(--color-text) !important; margin-bottom: 0.75rem !important; }
.card-link:hover, .text-link { text-decoration: underline; text-underline-offset: 3px; }
.text-link { font-weight: 700; }
.breadcrumb { font-size: 0.9rem; margin-bottom: 1rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: #777; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.check-list { margin-left: 1.2rem; display: grid; gap: 0.4rem; max-width: 680px; }
.faq details { border: 1px solid #e5e5e5; border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 0.75rem; max-width: 760px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin-top: 0.6rem; color: #555; }
.dark .faq details { border-color: var(--border-color); }
.dark .faq p { color: var(--text-secondary); }
.related { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.section-intro, .section p { color: inherit; }
.section-intro { color: #555555; }
.dark .section-intro { color: var(--text-secondary); }
.nav-links a, #theme-toggle { min-height: 44px; display: inline-flex; align-items: center; }
.footer-grid a { display: flex; min-height: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-animate] { opacity: 1; transform: none; transition: none; }
}

/* Submenú de servicios (escritorio: hover/foco; móvil: lista visible) */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-submenu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 250px;
  flex-direction: column; padding: 0.5rem; z-index: 1001;
  background: var(--color-white); border: 1px solid #e5e5e5;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu { display: flex; }
.nav-submenu a { width: 100%; padding: 0.5rem 0.75rem; border-bottom: none; border-radius: 8px; }
.nav-submenu a:hover { background: rgba(128,128,128,.15); border-bottom: none; }
.dark .nav-submenu { border-color: var(--border-color); }

/* Tarjetas de servicio completamente clicables */
.card:has(.card-link) { position: relative; cursor: pointer; transition: transform .2s ease; }
.card:has(.card-link):hover { transform: translateY(-3px); }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card:has(.card-link:focus-visible) { outline: 3px solid #1a73e8; outline-offset: 2px; }
.card-link:focus-visible { outline: none; }
.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 760px) {
  .nav-toggle { min-height: 44px; }
  .nav-dropdown { flex-direction: column; align-items: flex-start; width: 100%; }
  .nav-submenu {
    display: flex; position: static; min-width: 0; padding: 0 0 0 1rem;
    background: transparent; border: none; box-shadow: none;
  }
}
