<div class="cf-reviews-section" id="cfReviewsSection">
  <div class="cf-reviews-inner">
    <div class="cf-reviews-intro">
      <span class="cf-reviews-eyebrow" data-i18n="eyebrow">Coruña Flat · Opiniones de huéspedes</span>
      <h2 data-i18n="title">Lo que cuentan quienes ya se han alojado con nosotros</h2>
      <p data-i18n="description">
        Una estancia céntrica, cómoda y cuidada se entiende mejor cuando la describen
        quienes ya la han vivido. Aquí puedes ver valoraciones reales de huéspedes.
      </p>
    </div>

    <div class="cf-reviews-highlights">
      <div class="cf-reviews-pill" data-i18n="pill1">Ubicación céntrica</div>
      <div class="cf-reviews-pill" data-i18n="pill2">Estancia cuidada</div>
      <div class="cf-reviews-pill" data-i18n="pill3">Reserva directa</div>
    </div>

    <div class="cf-reviews-card">
      <div class="elfsight-app-3b519748-9b44-4f00-b16b-316b16607f5d"></div>
    </div>
  </div>

  <script src="https://elfsightcdn.com/platform.js" defer></script>

  <script>
    (function () {
      var translations = {
        es: {
          eyebrow: "Coruña Flat · Opiniones de huéspedes",
          title: "Lo que cuentan quienes ya se han alojado con nosotros",
          description: "Una estancia céntrica, cómoda y cuidada se entiende mejor cuando la describen quienes ya la han vivido. Aquí puedes ver valoraciones reales de huéspedes.",
          pill1: "Ubicación céntrica",
          pill2: "Estancia cuidada",
          pill3: "Reserva directa"
        },
        en: {
          eyebrow: "Coruña Flat · Guest reviews",
          title: "What guests say after staying with us",
          description: "A central, comfortable and carefully maintained stay is best understood when described by the people who have already experienced it. Here you can see real guest reviews.",
          pill1: "Central location",
          pill2: "Well-kept stay",
          pill3: "Direct booking"
        }
      };

      function detectLanguage() {
        var path = (window.location.pathname || "").toLowerCase();
        var query = (window.location.search || "").toLowerCase();
        var htmlLang = ((document.documentElement.getAttribute("lang") || "") + "").toLowerCase();

        if (
          path.indexOf("/reviews.html") !== -1 ||
          path.indexOf("/en/") !== -1 ||
          query.indexOf("lang=en") !== -1 ||
          htmlLang.indexOf("en") === 0
        ) {
          return "en";
        }

        return "es";
      }

      function applyTranslations() {
        var section = document.getElementById("cfReviewsSection");
        if (!section) return;

        var lang = detectLanguage();
        var dict = translations[lang] || translations.es;
        var nodes = section.querySelectorAll("[data-i18n]");

        for (var i = 0; i < nodes.length; i++) {
          var key = nodes[i].getAttribute("data-i18n");
          if (dict[key]) {
            nodes[i].textContent = dict[key];
          }
        }

        section.setAttribute("lang", lang);
      }

      if (document.readyState === "loading") {
        document.addEventListener("DOMContentLoaded", applyTranslations);
      } else {
        applyTranslations();
      }
    })();
  </script>

  <style>
    .cf-reviews-section{
      padding: 32px 0 72px;
      clear: both;
    }

    .cf-reviews-inner{
      width: min(1180px, calc(100% - 40px));
      margin: 0 auto;
    }

    .cf-reviews-intro{
      max-width: 760px;
      margin: 0 auto 28px;
      text-align: center;
    }

    .cf-reviews-eyebrow{
      display: inline-block;
      margin-bottom: 14px;
      font-size: 12px;
      line-height: 1;
      letter-spacing: .16em;
      text-transform: uppercase;
      color: rgba(0,0,0,.55);
    }

    .cf-reviews-intro h2{
      margin: 0 0 14px;
      font-size: clamp(32px, 4vw, 50px);
      line-height: 1.08;
      letter-spacing: -.02em;
      color: inherit;
    }

    .cf-reviews-intro p{
      margin: 0;
      font-size: 18px;
      line-height: 1.75;
      color: rgba(0,0,0,.68);
    }

    .cf-reviews-highlights{
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 12px;
      margin: 0 0 30px;
    }

    .cf-reviews-pill{
      padding: 12px 18px;
      border: 1px solid rgba(0,0,0,.10);
      border-radius: 999px;
      background: rgba(255,255,255,.7);
      backdrop-filter: blur(6px);
      font-size: 14px;
      line-height: 1.2;
      color: inherit;
    }

    .cf-reviews-card{
      min-height: 720px;
      padding: 22px;
      background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(250,248,244,.96) 100%);
      border: 1px solid rgba(0,0,0,.08);
      border-radius: 28px;
      box-shadow: 0 18px 50px rgba(0,0,0,.06);
      overflow: hidden;
    }

    .cf-reviews-card > div{
      width: 100%;
    }

    .cf-reviews-card .elfsight-app-3b519748-9b44-4f00-b16b-316b16607f5d{
      min-height: 640px;
    }

    @media (max-width: 767px){
      .cf-reviews-section{
        padding: 20px 0 56px;
      }

      .cf-reviews-inner{
        width: min(100% - 24px, 1180px);
      }

      .cf-reviews-intro{
        margin-bottom: 22px;
      }

      .cf-reviews-intro p{
        font-size: 16px;
        line-height: 1.65;
      }

      .cf-reviews-card{
        min-height: 620px;
        padding: 14px;
        border-radius: 22px;
      }
    }
  </style>
</div>