
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    html,
    body {
      font-family: Arial, sans-serif;
      scroll-behavior: smooth;
    }

    input,
    textarea,
    button,
    select {
      font-family: inherit;
    }

    body {
      overflow-x: hidden;
    }

    header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100px;
      background: #333;
      color: #fff;
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1rem 2rem;
    }

    .logo-img {
      width: 100px;
      height: auto;
    }

    nav {
      display: flex;
      gap: 2rem;
      justify-content: center;
      flex: 1;
      align-items: center;
    }

    nav a {
      color: white;
      text-decoration: none;
      font-weight: bold;
      position: relative;
      padding: 2.0rem 0;
      font-size: 1.2rem;

    }

    section {
      scroll-margin-top: 120px;
      /* al menos la altura del header + margen */
    }

    nav a::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -6px;
      width: 0%;
      height: 4px;
      background-color: #888;
      transition: width 0.3s;
      border-radius: 2px;
    }

    nav a:hover::after,
    nav a:focus::after {
      width: 100%;
    }

    /* Selector de idioma */
    .lang-selector {
      position: relative;
      display: inline-block;
    }

    .current-lang {
      background: #e9dddd;
      color: #333;
      border: 2px solid #888;
      border-radius: 5px;
      padding: 0.4rem 0.8rem;
      font-weight: bold;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .current-lang .flag {
      width: 20px;
      height: auto;
    }

    .lang-menu {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      background: rgba(51, 51, 51, 0.95);
      border-radius: 5px;
      margin-top: 0.2rem;
      min-width: 120px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
      z-index: 2000;
    }

    .lang-menu li {
      padding: 0.4rem 0.6rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      color: white;
    }

    .lang-menu li:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    /* Hamburguesa/X */
    .hamburger,
    .close-menu {
      display: none;
      background: none;
      border: none;
      font-size: 2rem;
      color: white;
      cursor: pointer;
      z-index: 1001;
    }

    section {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      padding: 2rem;
    }

    section h2 {
      font-size: 36px;
      /* tamaño uniforme y grande */
      margin-bottom: 1.5rem;
      font-weight: 700;
      color: #222;
      /* armoniza con subtítulos */
    }

    section img {
      width: 80%;
      max-width: 600px;
      height: 300px;
      margin-bottom: 1.5rem;
      background: #ccc;
    }

    .hero-shadow {
      text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
    }


    #inicio {
      background: #f2f2f2;
    }

    #sobre-nosotros {
      background: #e6e6e6;
    }

    #servicios {
      background: #d9d9d9;

      padding-bottom: 4rem;
    }

    #proyectos {
      background: #cccccc;
    }

    #contacto {
      background: #bfbfbf;
    }

    /* ======================== Móvil ======================== */
    /* ======================== Móvil ======================== */
    @media(max-width:768px) {
      header {
        justify-content: space-between;
        flex-wrap: wrap;
      }

      .logo-img {
        width: 60px;
        margin-bottom: 0;
      }

      nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 100vh;

        /* Fondo: transparente en los primeros 100px y negro sólido después */
        background: linear-gradient(to bottom, rgba(51, 51, 51, 0) 0px, rgba(51, 51, 51, 0) 100px, rgba(51, 51, 51, 1) 100px, rgba(51, 51, 51, 1) 100%);

        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 1.5rem;
        transition: all 0.4s ease;
        z-index: 998;
        transform: translateX(100%);

        /* Espacio para que los links comiencen más abajo */
        padding-top: 120px;
        overflow-y: auto;
      }

      nav a {
        color: white;
        text-decoration: none;
        font-weight: bold;
        position: relative;
        padding: 0.5rem 0;
        font-size: 1.2rem;

      }

      nav.show {
        transform: translateX(0);
      }

      .hamburger {
        display: block;
      }

      .close-menu {
        display: none;
        position: fixed;
        top: 1rem;
        right: 2rem;
        font-size: 2rem;
        color: white;
        cursor: pointer;
        z-index: 1001;
      }

      section img {
        width: 100%;
        height: 200px;
      }

      .lang-selector {
        margin-top: 2rem;
      }

      .lang-menu {
        max-height: 300px;
        overflow-y: auto;
      }
    }



    /* ========================== Scroll top ========================== */
    #topBtn {
      position: fixed;
      bottom: 30px;
      right: 30px;
      display: none;
      background: #333;
      color: white;
      border: none;
      padding: 0.8rem 1rem;
      cursor: pointer;
      border-radius: 5px;
    }

    #topBtn:focus {
      outline: 2px solid yellow;
    }

    /* CSS */
    #scrollArrow {
      position: fixed;
      bottom: 30px;
      right: 30px;
      width: 50px;
      height: 50px;
      background: #333;
      color: #fff;
      display: none;
      justify-content: center;
      align-items: center;
      border-radius: 10px;
      cursor: pointer;
      font-size: 1.5rem;
      z-index: 1000;
      transition: background 0.3s;
    }

    #scrollArrow:hover {
      background: #555;
    }

    #cookie-icon img {
      width: 24px;
      /* prueba 20px, 24px o 30px */
      height: 24px;
    }

    /* ========================== Focus accesibilidad ========================== */
    a:focus,
    button:focus {
      outline: 4px solid;
      outline-color: white;
      outline-offset: 3px;
      border-radius: 4px;
    }

    /* ================= COOKIE MODAL ESTILO MODERNO ================= */

    .cookie-card {
      background: white;
      max-width: 600px;
      width: 90%;
      padding: 2rem;
      border-radius: 16px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      animation: fadeUp 0.4s ease;
    }

    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .cookie-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.8rem 0;
      border-bottom: 1px solid #eee;
    }

    .cookie-row:last-child {
      border-bottom: none;
    }

    .cookie-title {
      font-weight: 600;
      color: #333;
    }

    .cookie-desc {
      font-size: 0.85rem;
      color: #666;
      margin-top: 0.2rem;
    }

    /* ===== Toggle Switch ===== */

    .switch {
      position: relative;
      width: 46px;
      height: 24px;
    }

    .switch input {
      display: none;
    }

    .slider {
      position: absolute;
      inset: 0;
      background: #ccc;
      border-radius: 50px;
      transition: 0.3s;
      cursor: pointer;
    }

    .slider::before {
      content: "";
      position: absolute;
      width: 18px;
      height: 18px;
      left: 3px;
      top: 3px;
      background: white;
      border-radius: 50%;
      transition: 0.3s;
    }

    .switch input:checked+.slider {
      background: #000;
    }

    .switch input:checked+.slider::before {
      transform: translateX(22px);
    }

    /* ===== Botones ===== */

    .cookie-buttons {
      margin-top: 1.5rem;
      display: flex;
      gap: 0.6rem;
      justify-content: flex-end;
      flex-wrap: wrap;
    }

    .cookie-btn {
      padding: 0.6rem 1.4rem;
      border-radius: 50px;
      border: none;
      cursor: pointer;
      font-weight: 600;
      transition: 0.3s;
    }

    .cookie-btn.reject {
      background: #777;
      color: white;
    }

    .cookie-btn.save {
      background: #333;
      color: white;
    }

    .cookie-btn.accept {
      background: black;
      color: white;
    }

    .cookie-btn:hover {
      transform: scale(1.05);
    }

    .services-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 2rem 4rem;
      text-align: left;
      margin-top: 2rem;
      position: relative;
      /* necesario para ::before */
    }

    /* Línea vertical central */
    .services-grid::before {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      left: 50%;
      width: 1px;
      background: rgba(0, 0, 0, 0.15);
      /* línea suave */
      transform: translateX(-50%);
    }

    /* Cada tarjeta de servicio */
    .service-card {
      padding-bottom: 1rem;

    }

    .service-card h3 {
      font-size: 1.2rem;
      margin-bottom: 0.3rem;
      color: #222;
    }

    /* Línea debajo del título solo para h3 “Electricidad” */
    .service-card h3[data-es="Electricidad"] {
      position: relative;
      display: inline-block;
    }

    .service-card h3 {
      position: relative;
      display: inline-block;
      /* para que la línea siga solo el ancho del texto */
      margin-bottom: 0.5rem;
      /* un pequeño espacio debajo */
    }

    .service-card h3::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -6px;
      height: 1px;
      /* línea fina */
      width: 80%;
      /* no ocupa todo el ancho */
      border-radius: 2px;
      /* esquinas suaves */
      background: linear-gradient(to right, rgba(50, 50, 50, 0.4), rgba(50, 50, 50, 0));
      /* gris suave que se desvanece */
    }

    .service-card p {
      font-size: 0.95rem;
      color: #444;
      line-height: 1.5;
    }

    /* Responsive: una columna en móvil */
    @media (max-width: 768px) {
      .services-grid {
        grid-template-columns: 1fr;
      }

      .services-grid::before {
        display: none;
        /* ocultamos la línea vertical en móvil */
      }
    }
