/* ===========================
   MEDIA QUERIES (RESPONSIVE DESIGN)
   =========================== */

/* Phones (screens up to 767px wide) */
@media (max-width: 767px) {

  /* Obra (Work) Page - Overall container */
  .obra-page {
    padding: 2rem 1.5rem;
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
  }

  /* Description text for work page */
  .obra-description {
    font-size: 1.1rem;
    color: #444;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
  }

  /* Gallery layout for work page */
  .obra-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Responsive grid */
    gap: 1.5rem;
    padding: 1rem 0;
  }

  /* Image styling within the work page gallery */
  .obra-gallery img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    transition: transform 0.3s ease;
  }

  .obra-gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  }

  /* Heading for the work page (e.g., "Nuestras Obras") */
  .obra-page h1 {
    font-size: 3.2rem;
    color: #ef4e50;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
  }

  /* Call to action section specific to work page */
  .call-to-action-work {
    background: linear-gradient(135deg, #ef4e50, #93291e);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 10px;
    margin-top: 3rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

  .call-to-action-work h2 {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
  }

  .call-to-action-work p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    color: #eee;
  }

  .call-to-action-work .btn {
    background-color: #fff;
    color: #ef4e50;
    font-weight: 700;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .call-to-action-work .btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  }

  /* Search form settings */
  .search-form {
    flex-direction: column;
    gap: 0.8rem;
  }

  .search-form input[type="search"] {
    font-size: 1rem;
    padding: 0.8rem 1rem;
  }


  .search-form button {
    width: 100%;
    font-size: 1rem;
    padding: 0.8rem 1rem;
  }


  /* Search Results Section */
  .search-results-section {
    padding: 3rem 0;
    max-width: 1200px;
    margin: 0 auto;
  }

  .search-results-section h2 {
    font-size: 2.5rem;
    color: #ef4e50;
    text-align: center;
    margin-bottom: 2.5rem;
  }

  .search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding: 0 2rem;
  }

  .search-results-section .result-item {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: #2c2c2c;
    min-height: 180px;
  }

  .search-results-section .result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }

  .search-results-section .result-item h3 {
    font-size: 1.4rem;
    color: #ef4e50;
    margin-bottom: 0.8rem;
    line-height: 1.3;
  }

  .search-results-section .result-item h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
  }

  .search-results-section .result-item h3 a:hover {
    color: #b31221;
  }

  .search-results-section .result-item p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    flex-grow: 1;
    /* Para que el texto ocupe el espacio restante */
    margin-bottom: 1rem;
  }

  .search-results-section .result-item .read-more {
    font-size: 0.85rem;
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
  }

  .search-results-section .result-item .read-more:hover {
    color: #0056b3;
    text-decoration: underline;
  }

  /* General Body & Main Adjustments */
  body {
    line-height: 1.6;
    color: #333;
    /* Slightly softer dark grey for general text */
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    /* Prevent horizontal scroll issues */
  }

  .service-page-main,
  .services-overview-page-main {
    padding-top: 90px;
    /* Adjust for fixed header height */
    padding-bottom: 50px;
    /* Add some padding at the bottom */
  }

  /* --- Shared Heading Styles --- */
  h1,
  h2,
  h3 {
    font-family: 'Montserrat', sans-serif;
    color: #2c2c2c;
    /* Consistent dark grey for main headings */
    font-weight: 700;
    margin-bottom: 1.5rem;
  }

  h1 {
    font-size: 3.2rem;
    line-height: 1.1;
  }

  h2 {
    font-size: 2.6rem;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 3rem;
    color: #ef4e50;
    /* Your primary accent color for section titles */
    font-weight: 800;
    position: relative;
    /* For potential underline effect */
    display: inline-block;
    /* For potential underline effect */
  }

  /* 
    h2::after {
      content: '';
      display: block;
      width: 60px;
      height: 4px;
      background-color: #ef4e50;
      margin: 1rem auto 0;
      border-radius: 2px;
    } */


  h3 {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #555;
  }

  /* --- Buttons --- */
  .btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    /* Smoother transitions for buttons */
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
  }

  .btn.primary {
    background-color: #ef4e50;
    color: white;
    border-color: #ef4e50;
  }

  .btn.primary:hover {
    background-color: #b31221;
    border-color: #b31221;
    transform: translateY(-3px);
    /* More noticeable lift */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    /* Stronger shadow on hover */
  }

  .btn.secondary {
    background-color: transparent;
    color: white;
    border-color: white;
  }

  .btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    /* Slightly more opaque hover */
    transform: translateY(-3px);
    /* More noticeable lift */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  }


  /* ==================================
      SERVICES OVERVIEW PAGE (services.html)
      ================================== */

  .services-overview-page-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
    text-align: center;
  }

  .services-overview-page-main {
    color: #ef4e50;
    /* Ensure primary red for main title */
    font-size: 3.5rem;
    /* Larger for the main page title */
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .services-overview-description {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 4rem;
    /* More space before grid */
    line-height: 1.7;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }

  .services-grid-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    /* Consistent space between cards */
    padding: 0 1rem;
  }

  .service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    background-color: #fff;
    border-radius: 12px;
    /* Softer rounded corners */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    /* Slightly stronger initial shadow */
    padding: 2.5rem 2rem;
    /* Increased padding */
    transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
    /* Smoother, bouncier transition */
    min-height: 350px;
    /* Ensure consistent card height, increased */
    text-align: center;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
    /* Optimize for animation */
  }

  .service-card:hover {
    transform: translateY(-15px);
    /* More pronounced lift */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    /* Stronger, wider shadow on hover */
  }

  .service-card img {
    width: 90px;
    /* Consistent icon size */
    height: 90px;
    object-fit: contain;
    margin-bottom: 1.8rem;
    /* More space below icon */
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.15));
    /* Soft shadow for icons */
  }

  .service-card h3 {
    font-size: 1.4rem;
    color: #ef4e50;
    /* Primary red for service names */
    margin-bottom: 0.8rem;
    font-weight: 700;
  }

  .service-card p {
    font-size: 0.95rem;
    color: #666;
    /* Slightly lighter text for descriptions */
    line-height: 1.6;
    flex-grow: 1;
    /* Allows paragraph to take available space */
    margin-bottom: 1.5rem;
  }

  .service-card span {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: block;
    /* Ensures it takes its own line */
  }


  /* ==================================
      INDIVIDUAL SERVICE PAGE (e.g., service-detail.html)
      ================================== */

  .service-page-main {
    max-width: 1200px;
    margin: 0 auto;
  }

  .service-hero {
    text-align: center;
    margin-bottom: 4rem;
  }

  .service-hero h1 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.1;
    font-family: 'Montserrat', sans-serif;
  }

  .service-hero p {
    font-size: 1.25rem;
    color: #dfdfdf;
    max-width: 900px;
    margin: 0 auto 2rem;
    font-family: 'Montserrat', sans-serif;
  }

  .service-hero .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
  }

  /* Content blocks with image and text */
  .service-content-block,
  .service-process-block,
  .service-benefits-block,
  .service-applications-block {
    display: flex;
    flex-direction: column;
    align-items: center;


    gap: 3rem;
    margin-bottom: 5rem;
    padding: 3rem 0;
    border-bottom: 1px solid #eee;
    /* Separator between blocks */
  }

  .service-content-block:last-of-type,
  .service-process-block:last-of-type,
  .service-benefits-block:last-of-type,
  .service-applications-block:last-of-type {
    border-bottom: none;
    /* No border for the last block */
    margin-bottom: 0;
  }

  .content-wrapper {
    flex: 1;
    align-items: center;
    text-align: center;
  }

  .content-wrapper h2 {
    /*       text-align: left; */
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    /*       text-align: center; */
  }

  .content-wrapper h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background-color: #ef4e50;
    margin: 0.5rem 0 0;
    border-radius: 2px;
    margin-left: auto;
    margin-right: auto;
  }

  .content-wrapper p {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 1.2rem;
    line-height: 1.7;
  }

  .image-block {
    flex: 0 0 45%;
    /* Fixed width for image block */
    text-align: center;
  }

  .image-block img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    /* More rounded images */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* Pronounced shadow */
  }

  /* Reverse layout for alternating blocks */
  .service-content-block.reverse-layout {
    flex-direction: row-reverse;
  }

  /* Process Steps (Numbered list style) */
  .process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
  }

  .process-steps .step {
    background-color: #f8f8f8;
    padding: 2rem;
    border-left: 5px solid #ef4e50;
    /* Red accent bar */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .process-steps .step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  }

  .process-steps .step h3 {
    font-size: 1.3rem;
    color: #2c2c2c;
    margin-bottom: 0.8rem;
  }

  .process-steps .step p {
    font-size: 0.95rem;
    color: #666;
  }

  /* Benefits list */
  .benefit-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
  }



  .benefits-grid {
    display: flex;
    /* Change from grid to flex for single column */
    flex-direction: column;
    /* Stack items vertically */
    gap: 1.5rem;
    /* Adjust gap for list items */
    max-width: 100%;
    /* Allow it to take full width on small screens */
    padding: 0 1rem;
    /* Add some horizontal padding to prevent items from touching edges */
  }

  .benefit-item {
    background-color: #fff;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;

    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    margin: 0 auto;
    width: 100%;

  }

  .benefit-item h3,
  .benefit-item p {
    text-align: center;
    /* Explicitly center text within these elements */
  }

  /*     .benefit-item img {
      margin-bottom: 0.5rem;
    } */

  .benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  }

  .benefit-item img,
  /* If your icon is an <img> */
  .benefit-item .icon {
    /* If your icon is wrapped in a div with class 'icon' */
    /* If img is block, margin auto will center it */
    display: block;
    /* Ensure it's treated as a block for margin: auto to work */
    margin-left: auto;
    margin-right: auto;
    /* You might also need to adjust its width if it's too wide */
    max-width: 80px;
    /* Example: set a max-width for the icon/image */
    height: auto;
  }

  .benefit-item h3 {
    font-size: 1.1rem;
    color: #2c2c2c;
    margin-bottom: 0.5rem;
  }

  .benefit-item p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
  }

  /* Call to Action Section (Reused from other pages) */
  .call-to-action-section {
    background: linear-gradient(135deg, #ef4e50, #93291e);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    border-radius: 10px;
    margin-top: 5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }

  .call-to-action-section h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1.5rem;
  }

  .call-to-action-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    color: #eee;
  }

  .call-to-action-section .btn {
    background-color: #fff;
    color: #ef4e50;
    font-weight: 700;
    padding: 0.9rem 2.2rem;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .call-to-action-section .btn:hover {
    background-color: #f0f0f0;
  }

  /* Content from back_styles.css (shorter file - base) */
  /* Reset básico */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: 'Helvetica Neue', sans-serif;
    /* font-family: 'Montserrat', sans-serif;
      font-weight: 400; */
    color: #2c2c2c;
    background-color: #fff;
    line-height: 1.6;
  }

  /* HEADER */
  header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ef4e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    z-index: 1000;
    /* transition: top 0.3s ease-in-out; */
    transition: top 0.3s ease-in-out, opacity 0.3s ease, visibility 0.3s ease;
  }

  header.scrolled {
    top: -100px;
  }

  /* Barra negra fija arriba */
  .top-bar {
    /*       position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 30px;
      z-index: 11000;
      background-color: #0c0f12;
      color: #eee;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 2rem; */

    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;


  }


  /* Header fijo justo debajo de la barra negra */
  header#main-header {
    position: fixed;
/*     top: -40px; */
    left: 0;
    width: 100%;
    height: 60px;
    background: #ef4e50;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 2rem;
    transition: top 0.3s ease-in-out;
  }

  /* Evitar que el contenido quede tapado */
  body>*:not(.top-bar):not(header#main-header) {
    padding-top: 0px;
    /* suma de 30px de barra + 60px de header */
  }

  .top-bar .contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .top-bar .icon {
    width: 18px;
    height: 18px;
    filter: brightness(100%) invert(100%);
    /* blanco */
  }

  .top-bar a {
    color: #eee;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .top-bar a:hover {
    color: #ef4e50;
    /* rojo JPC */
  }





  .logo {
    display: flex;
    align-items: center;
    height: auto;
    max-height: 60px;
    padding: 0.5rem 0;
  }

  .logo img {
    max-height: 50px;
    width: auto;
    height: auto;
  }


  .menu a {
    position: relative;
    text-decoration: none;
    color: #1F1F1F;
    font-weight: 600;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
    padding-bottom: 4px;
    transition: color 0.3s ease;
  }

  .menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background-color: #ffffff;
    transition: width 0.3s ease;
  }

  .menu a:hover {
    color: #ffffff;
  }

  .menu a:hover::after {
    width: 100%;
  }


  .menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1100;
  }

  .menu-toggle div {
    width: 100%;
    height: 3px;
    background-color: #1f1f1f;
    border-radius: 2px;
    transition: all 0.3s linear;
  }



  nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
  }

  nav a {
    text-decoration: none;
    color: #1f1f1f;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.05em;
  }

  nav a:hover {
    border-bottom: 2px solid #000;
  }

  /* HERO */
  .hero {
    background: #f2f2f2;
    padding: 12rem 2rem 6rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
  }

  .hero p {
    font-size: 1.2rem;
    color: #ffffff;
  }


  .service-hero .hero-content {
    text-align: center;
    z-index: 2;
    max-width: 400px;
    padding: 0 2rem;

    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;

    overflow: hidden;
  }



  body,
  html {
    margin: 0;
    padding: 0;
    font-size: 16px;
    width: 100%;
    overflow-x: hidden;
  }

  /* En tu styles.css */
  body.search-active .tu-contenedor-con-scroll {
    overflow: hidden !important;
  }


  .home_img {
    background-image: url('/img/homescreen.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    width: 100vw;
    height: 35vh;
    padding-top: 90px;
    box-sizing: border-box;
  }



  .team_img {
    background-image: url('/img/JPC.jpeg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    width: 100vw;
    height: calc(100vh - 90px);
    padding-top: 90px;
    box-sizing: border-box;
  }




  #qui-som {
    max-width: 80vw;
    margin: 0 auto 3rem;
    padding: 6rem 2rem 1rem 2rem;
  }

  .qui-som-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
  }

  .text-block {
    text-align: left;
  }

  .text-block h2 {
    margin-bottom: 1rem;
  }

  .logo-img{
    margin-top: 2rem;
  }

  .text-block p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #2c2c2c;
  }

  .logo-below-text {
    display: block;
    margin: 2rem auto 0 auto;
    width: 35rem;
    height: auto;
  }

  .photo-block {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    height: auto;
  }

  .photo-obrero {
    display: none;
  }

  .red-line {
    height: 4px;
    background-color: #ef4e50;
    width: 100%;
  }

  .qui-som {
    font-size: 10rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-align: left;
    padding-left: 1rem;
    color: #000;
  }


  .qui-som-paragraph {
    font-size: 2rem !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-align: left;
    padding-left: 1rem;
    line-height: 1.4;
    color: #000;
  }

  .red-banner {
    display: flex;
    background-color: #ef4e50;
    color: #ffffff;
    font-family: 'Helvetica Neue', sans-serif;
    padding: 1.5rem 10rem;
    height: 24rem;
    align-items: center;
  }

  .left-text,
  .right-text {
    width: 50%;
    display: flex;
    align-items: center;
  }

  .left-text {
    font-size: 5rem;
    font-weight: 800;
    justify-content: flex-start;
    text-align: left;
    padding-left: 1rem;
    padding-bottom: 2rem;
    text-align: center;
  }

  .right-text {
    font-size: 1.75rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    justify-content: flex-start;
    text-align: left;
    padding-left: 1rem;
  }

  /* SECTION BASE */
  section {
    padding: 5rem 2rem 3rem;
    max-width: 80rem;
    margin: auto;
  }


  .red_title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    color: #ef4e50;
    /* letter-spacing: 4px; */
    padding-top: 2rem;
    padding-bottom: 1rem;
    margin-left: 1.7rem;
  }


  .white_title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    padding-left: 1rem;
    color: white;
    padding-bottom: 3.5rem;
  }

  /* SERVEIS GRID */
  .serveis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1.5rem;
    list-style: none;
    padding: 0;
  }

  .serveis-grid li {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    background: #d8d9d8;
    border: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.0625rem 0.125rem #0000000d;
    height: 100%;
    min-height: 22rem;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  }

  .serveis-grid li:hover {
    background: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
  }

  .serveis-grid li img.servei-icon {
    max-width: 80% !important;
    min-width: 100px !important;
    height: auto !important;
    margin-bottom: 1rem !important;
    /* display: block !important; */
    object-fit: contain !important;
    vertical-align: bottom !important;
  }

  .serveis-grid li h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ef4e50;
    text-align: center;
    text-transform: uppercase;
    margin-top: auto;
    margin-bottom: 3rem;
    line-height: 1.3;
  }

  .serveis-grid li a {
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #646464;
    text-transform: uppercase;
    font-size: 0.75rem;
    position: absolute;
    bottom: 1.25rem;
    left: 0;
    right: 0;
    text-align: center;
  }

  .serveis-grid li a:hover {
    color: #a70e2a;
    text-decoration: underline;
  }

  .oferta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 4rem 2rem 2rem;
    gap: 1rem;
  }

  .oferta .titol {
    flex: 1;
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.05;
    text-align: left;
    padding: 0;
    margin: 0;
  }

  .oferta .titol span {
    display: inline-block;
    margin-right: 0;
    padding-right: 0;
    letter-spacing: 0;
  }

  .oferta {
    flex: 1;
    font-size: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    margin: 0;
    padding: 0;
  }


  .text {
    flex: 1;
    font-size: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 200;
    line-height: 1.4;
    text-align: left;
    margin: 0;
    padding: 0;

  }

  /*     .contact-line{
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 0.5rem;
      width: fit-content;
      margin: 0 auto; 
      font-size: 1rem;
    } */


  /* --- Base Styles for the contact bar --- */
  .contact-line {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 8px;
  }

  /* --- Icon styling --- */
  .phone-icon {
    width: 36px;
    height: auto;
    margin-right: 10px;
    flex-shrink: 0;
  }

  /* --- Text and link styling --- */
  .text {
    font-family: Arial, sans-serif;
    font-weight: bold;
  }

  .text a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1.2rem;
  }


  .carousel-section {
    background: linear-gradient(135deg, #ef4e50, #93291e);
    padding: 4rem 1rem;
    text-align: center;
    color: #fff;
    position: relative;
  }

  .carousel-header h2 {
    font-size: 3.5rem;
    margin-bottom: 3rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #fff;
  }

  .carousel-container {
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    max-height: 650px;
  }

  .carousel-track {
    display: flex;
    gap: 1rem;
    /* separación entre slides */
    transition: transform 0.5s ease-in-out;
  }

  .carousel-slide {
    flex: 0 0 calc((100% - 2rem) / 3);
    /* 3 columnas con espacio entre */
    position: relative;
  }

  .carousel-slide img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: block;
    object-fit: cover;
  }

  .info-button {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4e50;
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    text-decoration: none;
  }

  .info-button:hover {
    background: #ef4e50;
    color: #fff;
    transform: translateX(-50%) translateY(-4px);
    /* se eleva */
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  }

  .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 120px;
    background-color: rgba(255, 255, 255, 0.75);
    /* Translucent white */
    color: #ef4e50;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    /* Optional: glass effect */
  }

  /* Carousel button hover effect */
  .carousel-btn:hover {
    background-color: #fff;
    transform: scale(1.03) translateY(-50%);
  }

  /* Previous button positioning */
  .carousel-btn.prev {
    left: 1rem;
  }

  /* Next button positioning */
  .carousel-btn.next {
    right: 1rem;
  }

  /* Modal for legal and cookie information */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    /* Semi-transparent overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* Ensures modal is on top */
    opacity: 0;
    /* Hidden by default */
    pointer-events: none;
    /* Prevents interaction when hidden */
    transition: opacity 0.5s ease, transform 0.4s ease;
    /* Smooth fade-in/out */
    transform: scale(0.95);
    /* Slight scale for animation */
  }

  /* State for showing the modal */
  .modal.show {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }

  /* Modal content box styling */
  .modal-content {
    background: #fff;
    padding: 2rem 3rem;
    max-width: 600px;
    max-height: 80vh;
    /* Limits height to viewport height */
    overflow-y: auto;
    /* Enables scrolling for long content */
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    color: #2c2c2c;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: translateY(-20px) scale(0.96);
    /* Initial transform for animation */
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
  }

  /* Modal content animation when shown */
  .modal.show .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  /* Modal content headings */
  .modal-content h2 {
    color: #ef4e50;
    margin-bottom: 1rem;
    font-weight: 800;
  }

  /* Modal content paragraphs */
  .modal-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 600;
  }

  /* Horizontal rule in modal content */
  .modal-content hr {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #ccc;
  }

  /* Close button for the modal */
  .close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #fffcfc;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
  }

  /* Close button hover effect */
  .close-btn:hover {
    color: #ffffff;
    /* Changes color and rotates */
    transform: rotate(90deg);
  }

  /* General button styling */
  .btn {
    background-color: #ef4e50;
    color: white;
    border: none;
    padding: 0.6rem 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }

  /* Button hover effect */
  .btn:hover {
    background-color: #b31221;
    transform: scale(1.05);
  }

  /* Secondary button styling */
  .btn.secondary {
    background-color: #f4f4f4;
    color: #ef4e50;
    border: 2px solid #ef4e50;
  }

  /* Secondary button hover effect */
  .btn.secondary:hover {
    background-color: #ef4e50;
    color: #fff;
  }


  /* FOOTER */
  footer {
    background-color: #0c0f12;
    color: #eee;
    padding: 3rem 2rem;
    font-family: 'Montserrat', sans-serif;
  }

  .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    /* Allows wrapping on smaller screens */
    gap: 2rem;
  }

  .footer-logo-block,
  .footer-contact,
  .footer-links,
  .footer-social {
    flex: 1;
    min-width: 200px;
    /* Ensures minimum width before wrapping */
  }

  .footer-logo-block img {
    max-height: 60px;
    margin-bottom: 1rem;
  }

  .footer-column img{
    margin-top: 2rem;
  }

  .footer-logo-block p {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.6;
  }

  .footer-contact h3,
  .footer-links h3,
  .footer-social h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .footer-contact p,
  .footer-contact a {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    display: block;
  }

  .footer-contact a:hover {
    color: #ef4e50;
  }

  .footer-links ul {
    list-style: none;
    padding: 0;
  }

  .footer-links ul li {
    margin-bottom: 0.5rem;
  }

  .footer-links ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
  }

  .footer-links ul li a:hover {
    color: #ef4e50;
  }

  .social-icons {
    display: flex;
    gap: 1rem;
  }

  .social-icon {
    color: #ccc;
    font-size: 1.5rem;
    transition: color 0.3s ease;
  }

  .social-icon:hover {
    color: #ef4e50;
  }

  .footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #222;
    font-size: 0.85rem;
    color: #888;
  }

  .footer-bottom p {
    margin: 0;
    color: #888;
  }

  .footer-legal-links a {
    color: #888;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
  }

  .footer-legal-links a:hover {
    color: #eee;
  }

  .search-container {
    position: relative;
    display: flex;
    align-items: center;
  }

  .search-icon {
    font-size: 1.3rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
  }

  .search-icon:hover {
    color: #f0f0f0;
  }

  .search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .search-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .search-overlay form {
    display: flex;
    width: 60%;
    max-width: 700px;
    position: relative;
  }

  .search-overlay input[type="search"] {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    border: none;
    border-radius: 5px;
    outline: none;
    background-color: #fff;
    color: #333;
  }

  .search-overlay button[type="submit"] {
    background-color: #ef4e50;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin-left: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
  }

  .search-overlay button[type="submit"]:hover {
    background-color: #b31221;
  }

  .search-close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
  }

  .search-close-btn:hover {
    color: #f0f0f0;
  }

  .search-results-section {
    padding: 3rem 0;
    max-width: 1200px;
    margin: 0 auto;
  }

  .search-results-section h2 {
    font-size: 2.5rem;
    color: #ef4e50;
    text-align: center;
    margin-bottom: 2.5rem;
  }

  .search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding: 0 2rem;
  }

  .search-results-section .result-item {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: #2c2c2c;
    min-height: 180px;
  }

  .search-results-section .result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }

  .search-results-section .result-item h3 {
    font-size: 1.4rem;
    color: #ef4e50;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    text-align: center;
  }

  .search-results-section .result-item h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;

  }

  .search-results-section .result-item h3 a:hover {
    color: #b31221;
  }

  .search-results-section .result-item p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 1rem;
  }

  .search-results-section .result-item .read-more {
    font-size: 0.85rem;
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
  }

  .search-results-section .result-item .read-more:hover {
    color: #0056b3;
    text-decoration: underline;
  }


  /* Dropdown menu container for mobile */
  nav ul.menu {
    position: fixed;
    /* Reemplaza 'ALTURA_DE_TU_HEADER' con el valor exacto que obtuviste (ej: 75px) */
    top: 60px;
    /* Ejemplo: top: 75px; */
    right: 0;
    width: 220px;
    /* Asegúrate de ajustar también la altura calculada para que el menú ocupe el resto de la pantalla */
    height: calc(100vh - 92px);
    /* Ejemplo: height: calc(100vh - 75px); */
    background-color: #ef4e50f2;
    backdrop-filter: blur(6px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem 0;
    gap: 1.25rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 10500;
    box-shadow: -5px 0 15px #00000026;
    border-left: 4px solid #b71c2a;
  }


  /* State when mobile menu is active/shown */
  nav ul.menu.active {
    transform: translateX(0);
    /* Slides into view */
    align-items: center;
  }

  /* List items within mobile menu */
  nav ul.menu li {
    width: 90%;
    text-align: center;
  }


  nav ul.menu li:last-child {
    /* Selecciona el último LI en el HTML (la lupa) */
    order: -1;
    /* Esto lo coloca al principio dentro del menú flex */
  }

  /* Links within mobile menu */
  nav ul.menu li a {
    color: #ef4e50;
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
    padding: 0.5rem 0;
    background-color: #fff;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }

  /* Mobile menu link hover effect */
  nav ul.menu li a:hover {
    background-color: #f8f0f1;
    color: #b71c2a;
  }

  /* Hamburger button for mobile menu */
  .menu-toggle {
    display: flex;
    /* Show hamburger on mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    cursor: pointer;
    z-index: 11000;
    position: absolute;
    top: 50%;
    right: 1.5rem;
    background: transparent;
    border: none;
    padding: 0;
    transform: translateY(-50%);
  }

  /* Individual bars of the hamburger icon */
  .menu-toggle div {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: 1px;
  }

  /* Styling for hamburger bars when menu is active (transforms into an 'X') */
  .menu-toggle.active div:nth-child(1),
  .menu-toggle.active div:nth-child(3) {
    background-color: #fff;
  }

  .menu-toggle.active div:nth-child(1) {
    transform: rotate(45deg);
  }

  .menu-toggle.active div:nth-child(2) {
    opacity: 0;
    /* Hides middle bar */
  }

  .menu-toggle.active div:nth-child(3) {
    transform: rotate(-45deg);
  }

  .header-right-actions {
    gap: 0.8rem;
    /* Espacio más compacto entre el icono de búsqueda y el menú móvil */
    margin-left: auto;
  }

  .search-icon {
    /* Restaura o define un fondo y borde si quieres que se vea como un botón */
    background-color: transparent;
    /* O el color que desees para el fondo del botón */
    border: 1px solid #1F1F1F;
    /* Un borde para darle forma de botón, ajusta color y grosor */
    border-radius: 5px;
    /* Bordes redondeados para un look más suave */

    /* Elimina márgenes y rellenos predeterminados que pueden desalinear */
    margin: 0;

    /* Centra el ícono dentro del botón */
    display: flex;
    align-items: center;
    /* Alinea verticalmente el contenido (la lupa) */
    justify-content: center;
    /* Alinea horizontalmente el contenido (la lupa) */

    /* Ajusta el padding para controlar el tamaño del botón y alinearlo con los enlaces */
    padding: 0.6rem 0.8rem;
    /* Ajusta estos valores para que coincida con la altura de tus enlaces */

    /* Asegura que el ícono tenga el tamaño y color correctos */
    font-size: 1.1rem;
    /* Ajusta el tamaño de la lupa */
    color: #1F1F1F;
    /* Color de la lupa */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    /* Transición suave para efectos hover */
  }

  .search-icon:hover {
    background-color: #ef4e50;
    /* Fondo al pasar el ratón */
    color: #ffffff;
    /* Color de la lupa al pasar el ratón */
    border-color: #ef4e50;
    /* Color del borde al pasar el ratón */
  }

  /* Asegura que el ícono dentro del botón también se alinee bien */
  .search-icon i {
    line-height: 1;
    /* Esto es crucial para que el ícono ocupe exactamente su altura */
  }


  .search-overlay form {
    width: 90%;
    height: 30%;
  }

  /* General mobile adjustments */
  body {
    font-size: 14px;
    /* Smaller base font size for readability */
  }

  header {
    padding: 1rem 1rem;
  }

  .logo img {
    max-height: 45px;
  }

  .desktop-nav {
    display: none;
    /* Hide desktop nav on mobile */
  }


  /* Qui Som (About Us) section */
  #qui-som {
    max-width: 90vw;
    padding: 4rem 1rem 1rem;
  }

  .qui-som-content {
    grid-template-columns: 1fr;
    /* Stack content on mobile */
    gap: 1.5rem;
  }

  .text-block,
  .photo-block {
    text-align: center;
    justify-content: center;
  }

  .logo-below-text {
    width: 100%;
    max-width: 20rem;
    margin: 1rem auto 0;
  }

  .qui-som {
    font-size: 3rem;
    /* Smaller for mobile */
    text-align: center;
    padding-left: 0;
  }

  .qui-som-paragraph {
    font-size: 1.1rem !important;
    text-align: center;
    padding-left: 0;
    padding-top: 2rem;
  }

  /* Red Banner */
  .red-banner {
    flex-direction: column;
    height: auto;
    padding: 2rem 1rem;
    text-align: center;
  }

  .left-text,
  .right-text {
    width: 100%;
    font-size: 2.5rem;
    /* Adjust font size for mobile */
    justify-content: center;
    padding-left: 0;
    padding-top: 2rem;
  }

  .right-text {
    font-size: 1.2rem;
    /* Adjust font size for mobile */
    padding-top: 1rem;
    text-align: center;
  }

  /* Sections */
  section {
    padding: 3rem 1rem;
  }

  .white_title {
    font-size: 2rem;
    padding-left: 0;
    padding-bottom: 2rem;
  }

  /* Services Grid */
  .serveis-grid {
    grid-template-columns: 1fr;
    /* Single column on mobile */
    gap: 1rem;
  }

  .serveis-grid li {
    min-height: 20rem;
    padding: 1rem;
  }

  .serveis-grid li h3 {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  /* Oferta Section */
  .oferta {
    flex-direction: column;
    padding: 2rem 1rem;
    align-items: center;
  }

  .oferta .titol {
    font-size: 2.8rem;
    text-align: center;
  }

  .oferta .text {
    font-size: 1.1rem;
    text-align: center;
  }

  .galeria {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.2rem;
    width: 20rem;
    margin: 0 auto;
    box-sizing: border-box;
    justify-items: center;
  }

  .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15rem;
    height: 5rem;
    padding: 0.5rem;
  }

  .logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Carousel */
  .carousel-section {
    padding: 2rem 0.5rem;
  }

  .carousel-header h2 {
    font-size: 2rem;
    margin-bottom: 0rem;
    padding-top: 2rem;
  }

  .carousel-slide {
    flex: 0 0 100%;
    /* Single slide per view on mobile */
  }

  .carousel-btn {
    width: 30px;
    height: 80px;
    font-size: 1.5rem;
  }

  .carousel-btn.prev {
    left: 0.5rem;
  }

  .carousel-btn.next {
    right: 0.5rem;
  }

  /* Modal */
  .modal-content {
    width: 90%;
    padding: 1.5rem 2rem;
    max-height: 90vh;
  }

  .modal-content h2 {
    font-size: 1.8rem;
  }

  .modal-content p {
    font-size: 0.9rem;
  }

  .close-btn {
    font-size: 2rem;
  }

  /* Buttons */
  .btn {
    padding: 0.7rem 1.6rem;
    font-size: 0.9rem;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-logo-block,
  .footer-contact,
  .footer-links,
  .footer-social {
    min-width: unset;
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .footer-social .social-icons {
    justify-content: center;
  }

  .footer-bottom {
    padding-top: 1rem;
    margin-top: 2rem;
  }

  .footer-legal-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-legal-links a {
    margin: 0;
  }

  /* Obra Page */
  .obra-page {
    padding: 1.5rem 1rem;
  }

  .obra-description {
    font-size: 1rem;
    margin: 0 auto 1.5rem;
  }

  .obra-gallery {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .obra-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
  }

  .call-to-action-work {
    padding: 3rem 1.5rem;
  }

  .call-to-action-work h2 {
    font-size: 2rem;
  }

  .call-to-action-work p {
    font-size: 1rem;
    margin: 0 auto 2rem;
  }

  .service-page-main

  /* .red_title */
    {
    font-size: 2.2rem;
    margin-bottom: 2rem;
  }
  
  .service-hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .service-hero .btn {
    padding: 0.8rem 1.8rem;
    font-size: 0.95rem;
  }

  .services-overview-page-main {
    padding: 3rem 1rem;
  }

  .services-overview-page-main

  /* .red_title */
    {
    font-size: 2.2rem;
    margin-bottom: 2rem;
  }

  .services-overview-description {
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
  }

  .services-grid-overview {
    gap: 1.5rem;
  }

  .service-card {
    padding: 1.8rem 1rem;
    min-height: 280px;
  }

  .service-card h3 {
    font-size: 1.2rem;
  }

  .service-card p {
    font-size: 0.9rem;
  }

  .service-card span {
    font-size: 0.85rem;
  }

  .service-content-block,
  .service-process-block,
  .service-benefits-block,
  .service-applications-block,
  .call-to-action-section {
    padding: 3rem 1rem;
  }

  .content-wrapper .image-block img {
    border-radius: 8px;
  }

  .process-steps .step,
  .benefit-item {
    padding: 1.5rem;
  }

  .process-steps .step h3,
  .benefit-item h3 {
    font-size: 1.2rem;
  }

  .process-steps .step p,
  .benefit-item p {
    font-size: 0.85rem;
  }

  .service-content-block {
    flex-direction: column;
  }

  /* Stack content on mobile */
  .service-content-block.reverse-layout {
    flex-direction: column;
  }

  /* Keep stacked even if reverse */
  .image-block {
    flex: 0 0 100%;
    margin-bottom: 1.5rem;
  }

  .content-wrapper h2 {
    font-size: 1.8rem;
    text-align: center;
  }

  .content-wrapper p {
    text-align: center;
  }

  .call-to-action-section h2 {
    font-size: 2.2rem;
  }

  .call-to-action-section p {
    font-size: 1rem;
  }

  .call-to-action-section .btn {
    padding: 0.8rem 1.8rem;
    font-size: 0.95rem;
  }

}

/* Tablets (screens between 768px and 1024px wide) */
@media (min-width: 768px) and (max-width: 1024px) {
  header {
    padding: 1.2rem 1.5rem;
  }

  .logo img {
    max-height: 50px;
  }

  nav ul {
    gap: 1.5rem;
  }

  nav a {
    font-size: 0.9rem;
  }

  .hero {
    padding: 10rem 2rem 5rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  #qui-som {
    max-width: 90vw;
    padding: 5rem 1.5rem 1.5rem;
  }

  .qui-som {
    font-size: 6rem;
  }

  .qui-som-paragraph {
    font-size: 1.5rem !important;
  }

  .red-banner {
    padding: 1.5rem 5rem;
    height: 20rem;
  }

  .left-text {
    font-size: 3.5rem;
  }

  .right-text {
    font-size: 1.4rem;
  }

  section {
    padding: 4rem 1.5rem;
  }

  .serveis-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
  }

  .serveis-grid li {
    min-height: 20rem;
  }

  .serveis-grid li h3 {
    font-size: 1.1rem;
  }

  .oferta .titol {
    font-size: 3.5rem;
  }

  .oferta .text {
    font-size: 1.3rem;
  }

  .galeria {
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on tablet */
    max-width: 90%;
  }

  .carousel-header h2 {
    font-size: 2.8rem;
  }

  .carousel-slide {
    flex: 0 0 calc((100% - 1rem) / 2);
    /* 2 columns on tablet */
  }

  .carousel-btn {
    width: 35px;
    height: 100px;
  }

  .modal-content {
    max-width: 75%;
    padding: 2rem 2.5rem;
  }

  .footer-content {
    padding: 0 1.5rem;
  }

  /* Obra Page */
  .obra-page {
    padding: 1.5rem 1.5rem;
  }

  .obra-gallery {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .obra-page h1 {
    font-size: 2.8rem;
  }

  .call-to-action-work {
    padding: 3.5rem 2rem;
  }

  .call-to-action-work h2 {
    font-size: 2.5rem;
  }

  .service-page-main {
    padding: 4rem 1.5rem;
  }

  .service-hero h1 {
    font-size: 3.2rem;
  }

  .service-hero p {
    font-size: 1.1rem;
  }

  .services-overview-page-main {
    padding: 4rem 1.5rem;
  }

  .services-overview-page-main {
    font-size: 2.8rem;
  }

  .services-overview-description {
    font-size: 1.05rem;
  }

  .services-grid-overview {
    gap: 2rem;
  }

  .service-card {
    padding: 2rem 1.5rem;
    min-height: 300px;
  }

  .service-card h3 {
    font-size: 1.3rem;
  }

  .service-card p {
    font-size: 0.9rem;
  }

  .service-card span {
    font-size: 0.85rem;
  }

  .service-content-block,
  .service-process-block,
  .service-benefits-block,
  .service-applications-block,
  .call-to-action-section {
    padding: 3.5rem 1.5rem;
  }

  .image-block img {
    border-radius: 10px;
  }

  .process-steps .step,
  .benefit-item {
    padding: 1.8rem;
  }

  .process-steps .step h3,
  .benefit-item h3 {
    font-size: 1.25rem;
  }

  .process-steps .step p,
  .benefit-item p {
    font-size: 0.9rem;
  }

  .call-to-action-section h2 {
    font-size: 2.5rem;
  }

  .call-to-action-section p {
    font-size: 1.1rem;
  }



  .galeria {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.2rem;
    width: 20rem;
    margin: 0 auto;
    box-sizing: border-box;
    justify-items: center;
  }

  .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15rem;
    height: 5rem;
    padding: 0.5rem;
  }

  .logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

}

/* Desktop (screens 1025px and wider) */
@media (min-width: 1025px) {
  header {
    justify-content: space-between;
    /* Mantiene el logo a la izquierda y el resto a la derecha */
  }

  .header-right-actions {
    margin-left: auto;
    /* Empuja el search-container y menu-toggle (oculto) a la derecha del todo */
    gap: 2rem;
    /* Espacio entre el search-icon y otros elementos */
  }

  .desktop-nav {
    display: block;
    /* O 'flex' si es tu display original */
    /* Puede que necesites ajustar la nav para que esté bien alineada */
    /* Por ejemplo, si tienes un search-icon también visible, esto puede necesitar flexbox */
  }

  nav ul.menu {
    /* Asegura que el menú de escritorio se muestra correctamente */
    position: static;
    top: auto;
    right: auto;
    width: auto;
    height: auto;
    background-color: transparent;
    backdrop-filter: none;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    gap: 2rem;
    transform: translateX(0);
    transition: none;
    box-shadow: none;
    border-left: none;
    z-index: auto;

    display: flex;



  }

  nav ul.menu li {
    width: auto;
    text-align: left;
  }

  nav ul.menu li a {
    background-color: transparent;
    color: #1f1f1f;
    padding: 0;
    box-shadow: none;
  }

  nav ul.menu li a:hover {
    background-color: transparent;
    color: #ffffff;
  }

  .menu-toggle {
    display: none;
    /* Oculta el botón de hamburguesa en escritorio */
  }
}