/* ==========================================================
   Reformas Bellido — CSS GLOBAL LIMPIO Y RESPONSIVE
   Mobile-first · Sin duplicados · Sin bugs
   ========================================================== */

/* =====================
   BASE GLOBAL
===================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f7f9fc;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  color: #004aad;
  font-weight: 700;
}

h1 { font-size: clamp(26px, 5vw, 40px); }
h2 { font-size: clamp(22px, 4.5vw, 32px); }
h3 { font-size: clamp(20px, 4vw, 26px); }

img,
iframe,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =====================
   BOTONES
===================== */

.btn-primary {
  background: #004aad;
  border-color: #004aad;
}

.btn-primary:hover {
  background: #003a87;
  border-color: #003a87;
}

.navbar-brand {
  font-size: 1.25rem;
}

/* =====================
   WHATSAPP FLOTANTE
===================== */

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  border-radius: 50%;
  padding: 10px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(0,0,0,.3);
}

.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: #004aad;
  color: #fff;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: .9rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: opacity .3s ease, transform .3s ease;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* =====================
   BOTÓN LLAMAR FLOTANTE
===================== */

.call-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #004aad;
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.call-float:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,.24);
}
.call-float__icon{ font-size: 18px; line-height: 1; }
.call-float__text{ font-weight: 600; font-size: 14px; }

@media (max-width: 480px) {
  .call-float__text{ display:none; }
  .call-float{ border-radius: 50%; padding: 12px; }
}

@media (max-width: 768px) {
  .whatsapp-tooltip {
    display: none;
  }
}

/* =====================
   COOKIE BAR
===================== */

.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(33,37,41,.95);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  box-shadow: 0 -2px 10px rgba(0,0,0,.2);
}

/* =====================
   EFECTOS SUAVES
===================== */

.hover-zoom {
  transition: transform .25s ease, box-shadow .25s ease;
}

.hover-zoom:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(0,0,0,.3);
}

/* ==========================================================
   CONTENIDO — IMÁGENES Y VIDEO (REGLA ÚNICA)
   ========================================================== */

.contenido img,
.page-content img,
.post-content img,
.article-content img,
.entry-content img,
figure.image img,
.wp-block-image img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: 10px;
}

.contenido iframe,
.page-content iframe,
.post-content iframe,
.article-content iframe,
.entry-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  border: none;
  margin: 16px auto;
  border-radius: 10px;
}

/* Evita desbordes horizontales */
.contenido,
.page-content,
.post-content,
.article-content,
.entry-content {
  overflow-x: hidden;
}

/* =====================
   CKEDITOR / FIGURE
===================== */

figure.image {
  margin: 1rem auto;
  display: table;
  max-width: 100%;
}

figure.image.image-style-align-left {
  float: left;
  margin: 10px 20px 10px 0;
}

figure.image.image-style-align-right {
  float: right;
  margin: 10px 0 10px 20px;
}

figure.image.image-style-align-center {
  margin-left: auto;
  margin-right: auto;
  float: none;
  text-align: center;
}

/* Compatibilidad inline */
img[style*="float:left"] {
  float: left;
  margin: 10px 20px 10px 0;
}

img[style*="float:right"] {
  float: right;
  margin: 10px 0 10px 20px;
}

/* =====================
   GALERÍA PÚBLICA
===================== */

h1.text-primary {
  margin-bottom: 2.5rem;
}

.glightbox img,
.row.g-4 img,
.row.g-3 img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform .3s ease, box-shadow .3s ease;
}

.glightbox img:hover,
.row.g-4 img:hover,
.row.g-3 img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}

/* =====================
   MOBILE FIRST
===================== */

@media (max-width: 768px) {

  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  h3 { font-size: 20px; }

  .btn,
  button {
    width: 100%;
    font-size: 16px;
  }

  figure.image.image-style-align-left,
  figure.image.image-style-align-right,
  img[style*="float:left"],
  img[style*="float:right"] {
    float: none !important;
    margin: 12px auto !important;
  }
}

@media (max-width: 576px) {
  .glightbox img,
  .row.g-4 img,
  .row.g-3 img {
    height: 160px;
  }
}
/* =====================
   FIX: FAQ BORROSA EN PROYECTOS
===================== */
.proyecto-faq,
.proyecto-faq * {
  opacity: 1 !important;
  filter: none !important;
  backdrop-filter: none !important;
  transform: none !important;
}


/* =====================
   ANTES / DESPUÉS
===================== */
.rb-before-after{position:relative;aspect-ratio:16/9;overflow:hidden;background:#111827}
.rb-before-after__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.rb-before-after__after{position:absolute;inset:0;width:55%;overflow:hidden}
.rb-before-after__range{position:absolute;left:12px;right:12px;bottom:12px;width:calc(100% - 24px);z-index:5}
.rb-before-after__label{position:absolute;top:12px;z-index:6;background:rgba(17,24,39,.75);color:#fff;padding:6px 10px;border-radius:999px;font-weight:700;font-size:.9rem;backdrop-filter:saturate(140%) blur(6px)}
.rb-before-after__label--before{left:12px}
.rb-before-after__label--after{right:12px}

.rb-before-after__divider{position:absolute;top:0;bottom:0;width:3px;background:#fff;opacity:.85;z-index:4;box-shadow:0 0 0 1px rgba(0,0,0,.25)}
