/* ═══════════════════════════════════════
   GAYPE CONSTRUCTORA — Hoja de estilos
═══════════════════════════════════════ */

/* Transiciones nativas entre páginas (progressive enhancement, sin JS) */
@view-transition { navigation: auto; }

/* Capa "base" — misma capa que usa Tailwind, así las utilidades (mx-auto, hidden, etc.)
   siempre pueden ganar sobre estas reglas. Sin esto, un reset sin capa gana SIEMPRE
   sobre cualquier regla de Tailwind sin importar especificidad. */
@layer base {

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}
body {
  font-family: 'Open Sans', sans-serif;
  background: #f7f8fb;
  color: #1e2230;
  overflow-x: hidden;
  line-height: 1.6;
}

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

/* ═══ SCROLL REVEAL ═══ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .7s ease; }
.reveal.from-left { transform: translateX(-50px); }
.reveal.from-right { transform: translateX(50px); }
.reveal.visible { opacity: 1; transform: translate(0, 0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ═══ BLUE BRAND TEXT ═══ */
.brand-text {
  background: linear-gradient(135deg, #5555ff 0%, #2222bb 50%, #1a1a8c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══ NAVBAR ═══ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s ease, box-shadow .4s ease;
  padding: .4rem 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(34, 34, 187, 0.04);
}
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 2px 24px rgba(34, 34, 187, 0.08);
}
.nav-logo { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.nav-logo .logo-icon { height: 90px; width: auto; }
.nav-logo .logo-text { height: 66px; width: auto; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1; }
.nav-logo-text .brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900; font-size: 1.1rem;
  letter-spacing: .14em; color: #2222bb;
}
.nav-logo-text .sub {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400; font-size: .55rem;
  letter-spacing: .3em; color: #7a7d8c;
  text-transform: uppercase; margin-top: .2rem;
}

.nav-link {
  position: relative; color: #1e2230; text-decoration: none;
  font-family: 'Montserrat', sans-serif; font-weight: 600;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  transition: color .3s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -6px; left: 0;
  width: 0; height: 2px; background: #2222bb; transition: width .3s ease;
}
.nav-link:hover, .nav-link.active { color: #2222bb; }
.nav-link.active::after, .nav-link:hover::after { width: 100%; }

#mobile-menu {
  display: none; flex-direction: column;
  background: rgba(255, 255, 255, 0.99);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(34, 34, 187, 0.08);
}
#mobile-menu.open { display: flex; }
.mobile-link {
  display: block; padding: 1rem 1.5rem;
  font-family: 'Montserrat', sans-serif; font-weight: 600;
  font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
  color: #1e2230; text-decoration: none;
  border-bottom: 1px solid rgba(34, 34, 187, 0.06);
  transition: color .2s, padding-left .2s, background .2s;
}
.mobile-link:hover, .mobile-link.active { color: #2222bb; padding-left: 2rem; background: rgba(34, 34, 187, 0.03); }

.hamburger { cursor: pointer; background: none; border: none; padding: .25rem; }
.hamburger span {
  display: block; width: 24px; height: 2px; background: #1e2230;
  margin: 5px 0; transition: transform .3s ease, opacity .3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══ BUTTONS ═══ */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: linear-gradient(135deg, #2222bb, #1a1a8c);
  color: #ffffff; font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .9rem 2rem; border-radius: 4px;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(34, 34, 187, 0.18);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 34, 187, 0.32);
}
.btn-outline {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1.5px solid rgba(34, 34, 187, 0.3); color: #2222bb;
  font-family: 'Montserrat', sans-serif; font-weight: 600;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .9rem 2rem; border-radius: 4px;
  text-decoration: none; background: transparent;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-outline:hover { border-color: #2222bb; background: rgba(34, 34, 187, 0.06); }

/* ═══ PAGE HEADER (interior pages) ═══ */
.page-header {
  position: relative;
  padding: 10.5rem 0 4rem;
  background: linear-gradient(135deg, #1a1a8c 0%, #2222bb 50%, #3333dd 100%);
  color: #ffffff;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page-header::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  top: -200px; right: -150px;
  pointer-events: none;
}
.page-header-inner { position: relative; z-index: 2; }
.page-header h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15; margin-bottom: 1rem;
}
.page-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem; line-height: 1.7;
  max-width: 600px;
}
.breadcrumb {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: #ffffff; }
.breadcrumb-sep { color: rgba(255, 255, 255, 0.4); }

/* ═══ SECTIONS ═══ */
.section-tag {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .25em; text-transform: uppercase;
  color: #2222bb; border-left: 2px solid #2222bb;
  padding-left: .75rem; margin-bottom: 1rem;
}
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; color: #1e2230; line-height: 1.15;
}
.section-subtitle {
  color: #5a5e6e; line-height: 1.75;
  font-size: 1rem; max-width: 600px;
}
.brand-line {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, #2222bb, transparent);
  margin-top: 1rem;
}
.brand-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 34, 187, 0.18), transparent);
}

/* ═══ CARDS ═══ */
.service-card {
  background: #ffffff;
  border: 1px solid rgba(34, 34, 187, 0.08);
  border-radius: 8px; padding: 2rem;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  position: relative; overflow: hidden;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 34, 187, 0.25);
  box-shadow: 0 20px 50px rgba(34, 34, 187, 0.1);
}
.service-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, rgba(34, 34, 187, 0.12), rgba(34, 34, 187, 0.04));
  border: 1px solid rgba(34, 34, 187, 0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; font-size: 1.5rem;
}
.tag-pill {
  font-size: .68rem;
  background: rgba(34, 34, 187, 0.06);
  border: 1px solid rgba(34, 34, 187, 0.15);
  color: #2222bb;
  padding: .25rem .6rem; border-radius: 3px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600; letter-spacing: .08em;
}

/* ═══ STAT CARDS ═══ */
.stat-card {
  text-align: center; padding: 2.5rem 1.5rem;
  border: 1px solid rgba(34, 34, 187, 0.1);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.stat-card:hover {
  border-color: rgba(34, 34, 187, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(34, 34, 187, 0.08);
}
.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  background: linear-gradient(135deg, #2222bb, #5555ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ═══ PROJECT FILTERS / GALLERY ═══ */
.filter-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .5rem 1.25rem;
  border: 1.5px solid rgba(34, 34, 187, 0.18);
  border-radius: 4px; color: #5a5e6e;
  background: transparent; cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover, .filter-btn.active {
  border-color: #2222bb; color: #2222bb;
  background: rgba(34, 34, 187, 0.06);
}
.project-card {
  position: relative; overflow: hidden;
  border-radius: 6px; cursor: pointer;
  aspect-ratio: 4/3; background: #e8eaf3;
  border: 1px solid rgba(34, 34, 187, 0.06);
}
.project-card img {
  width: 100%; height: 100%;
  object-fit: cover; transition: transform .5s ease;
}
.project-card:hover img { transform: scale(1.08); }
.project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26, 26, 140, 0.95) 0%, rgba(34, 34, 187, 0.3) 50%, transparent 100%);
  opacity: 0; transition: opacity .3s ease;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem; color: #ffffff;
}
.project-card:hover .project-overlay { opacity: 1; }

/* ═══ LIGHTBOX ═══ */
#lightbox {
  position: fixed; inset: 0;
  background: rgba(10, 10, 30, 0.95);
  z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 2rem;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 90vw; max-height: 80vh; object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* ═══ VALUE / WHY ITEMS ═══ */
.why-item {
  display: flex; gap: 1.25rem; align-items: flex-start;
  padding: 1.25rem 1rem;
  border-left: 2px solid transparent;
  transition: border-color .3s, background .3s;
  border-radius: 0 4px 4px 0;
}
.why-item:hover {
  border-left-color: #2222bb;
  background: rgba(34, 34, 187, 0.03);
}
.why-num {
  font-family: 'Montserrat', sans-serif;
  font-size: .75rem; font-weight: 800;
  letter-spacing: .15em; color: #2222bb;
  opacity: .7; min-width: 2.5rem; padding-top: .2rem;
}

/* ═══ TESTIMONIALS ═══ */
.testimonial-card {
  background: #ffffff;
  border: 1px solid rgba(34, 34, 187, 0.1);
  border-radius: 8px; padding: 2rem;
  position: relative;
  transition: transform .3s, box-shadow .3s;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(34, 34, 187, 0.08);
}
.testimonial-card::before {
  content: '"';
  position: absolute; top: 1rem; left: 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 5rem; font-weight: 900;
  color: rgba(34, 34, 187, 0.08);
  line-height: 1;
}
.stars { color: #f5b400; letter-spacing: .1em; }

/* ═══ FORMS ═══ */
.input-field {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(34, 34, 187, 0.15);
  border-radius: 4px; padding: .85rem 1rem;
  color: #1e2230;
  font-family: 'Open Sans', sans-serif;
  font-size: .9rem;
  transition: border-color .2s, background .2s, box-shadow .2s;
  outline: none;
}
.input-field:focus {
  border-color: #2222bb;
  box-shadow: 0 0 0 3px rgba(34, 34, 187, 0.1);
}
.input-field::placeholder { color: #9ca3af; }

/* ═══ CERT BADGE ═══ */
.cert-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(34, 34, 187, 0.06);
  border: 1px solid rgba(34, 34, 187, 0.2);
  border-radius: 4px; padding: .4rem .75rem;
  font-family: 'Montserrat', sans-serif;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; color: #2222bb;
}
.cert-badge.on-dark {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ═══ FOOTER ═══ */
footer {
  background: #0f1230;
  border-top: 3px solid #2222bb;
  color: rgba(255, 255, 255, 0.65);
}
.footer-link {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: .87rem;
  transition: color .2s;
}
.footer-link:hover { color: #5555ff; }

/* ═══ PROSE (páginas legales) ═══ */
.prose {
  max-width: 720px;
  margin: 0 auto;
  color: #3a3e4e;
  font-size: .95rem;
  line-height: 1.85;
}
.prose .update-date {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a8fa8;
  margin-bottom: 2.25rem;
}
.prose h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1e2230;
  margin-top: 2.25rem;
  margin-bottom: .65rem;
}
.prose h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  color: #2222bb;
  margin-top: 1.5rem;
  margin-bottom: .4rem;
}
.prose p { margin-bottom: .9rem; }
.prose ul {
  padding-left: 1.4rem;
  margin-bottom: .9rem;
}
.prose ul li { margin-bottom: .3rem; }
.prose a { color: #2222bb; }
.prose a:hover { color: #1a1a8c; }

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f0f1f5; }
::-webkit-scrollbar-thumb { background: rgba(34, 34, 187, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(34, 34, 187, 0.5); }

/* ═══ OBRA CARDS (project grid) ═══ */
.obra-card {
  display: flex; flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(34,34,187,.08);
  text-decoration: none;
  transition: transform .3s ease, box-shadow .3s ease;
}
.obra-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(34,34,187,.14); }
.obra-card-img { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.obra-card-img img { width:100%; height:100%; object-fit:cover; display:block; transition: transform .45s ease; }
.obra-card:hover .obra-card-img img { transform: scale(1.04); }
.obra-card-body { padding: 1.25rem 1.4rem 1.5rem; display:flex; flex-direction:column; gap:.45rem; }
.obra-card-tag {
  font-family: 'Montserrat', sans-serif; font-size:.68rem; font-weight:600;
  letter-spacing:.15em; text-transform:uppercase; color:#2222bb;
}
.obra-card-title {
  font-family: 'Montserrat', sans-serif; font-size:1.05rem; font-weight:700; color:#1e2230; margin:0;
}
.obra-card-meta { font-size:.8rem; color:#8a8fa8; }
.obra-card-link { font-size:.82rem; font-weight:600; color:#2222bb; margin-top:.25rem; }

/* ═══ VIDEO THUMBNAIL ═══ */
.video-thumb-link {
  display: block; position: relative;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(34,34,187,.15);
  cursor: pointer;
}
.video-thumb-play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .75rem;
  background: rgba(15,18,48,.3);
  transition: background .2s;
}
.video-thumb-link:hover .video-thumb-play { background: rgba(15,18,48,.45); }
.video-thumb-play svg { width: 72px; height: 72px; }
.video-thumb-play span {
  font-family: 'Montserrat', sans-serif; font-weight:600; font-size:.85rem;
  color: #fff; letter-spacing:.08em; text-transform:uppercase;
}

/* ═══ SERVICE IMAGE CARDS ═══ */
.service-img-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: 0 4px 24px rgba(34, 34, 187, .10);
}
.service-img-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.service-img-card:hover img { transform: scale(1.04); }
.service-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,18,48,.88) 0%, rgba(15,18,48,.25) 55%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
}

/* ═══ NAVBAR SOCIAL BUTTONS ═══ */
.nav-social {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-left: .5rem;
}
.nav-social-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(34, 34, 187, 0.07);
  border: 1.5px solid rgba(34, 34, 187, 0.18);
  color: #2222bb;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
  flex-shrink: 0;
}
.nav-social-btn:hover {
  background: rgba(34, 34, 187, 0.16);
  border-color: #2222bb;
  transform: translateY(-2px);
}
.nav-social-btn svg { width: 15px; height: 15px; pointer-events: none; }
.nav-social-btn i { font-size: 15px; pointer-events: none; line-height: 1; }

/* ═══ HERO SOCIAL BAR ═══ */
.hero-social-bar {
  position: absolute;
  left: 1.5rem;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  z-index: 10;
}
.hero-social-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #2222bb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  transition: background .2s, transform .2s;
}
.hero-social-icon:hover { background: #1a1a8c; transform: scale(1.1); }
.hero-social-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, #2222bb, transparent);
}
@media (max-width: 767px) { .hero-social-bar { display: none; } }

/* ═══ HERO CAROUSEL ═══ */
.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: clamp(280px, 50vw, 620px);
  background: #0f1230;
  box-shadow: 0 8px 40px rgba(34, 34, 187, 0.15);
  user-select: none;
}
.hero-carousel .carousel-track {
  position: relative;
  height: 100%;
}
.hero-carousel .carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s ease;
  z-index: 1;
}
.hero-carousel .carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.hero-carousel .carousel-slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.carousel-grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 55px 55px;
  pointer-events: none;
}
.carousel-slide-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .5rem; text-align: center; padding: 2rem;
  z-index: 2;
}
.carousel-slide-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(3.5rem, 9vw, 7rem);
  color: rgba(255, 255, 255, 0.1);
  line-height: 1;
}
.carousel-slide-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(.75rem, 1.8vw, 1.1rem);
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: .2em; text-transform: uppercase;
}
.carousel-slide-hint {
  font-size: .7rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: .06em;
  margin-top: .2rem;
}
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
  z-index: 20;
}
.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }
.carousel-prev:hover { background: rgba(255,255,255,.28); transform: translateY(-50%) scale(1.06); }
.carousel-next:hover { background: rgba(255,255,255,.28); transform: translateY(-50%) scale(1.06); }
.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex; gap: .5rem;
  z-index: 20;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none; cursor: pointer; padding: 0;
  transition: background .25s, transform .25s;
}
.carousel-dot.is-active {
  background: #ffffff;
  transform: scale(1.45);
}

/* ═══════════════════════════════════════
   RESPONSIVE — TABLET + MOBILE
═══════════════════════════════════════ */

/* FIX 11 — Scroll offset para secciones con navbar fijo */
#servicios, #obras, #stats { scroll-margin-top: 90px; }

/* ── Tablet 768–1024px ── */
@media (max-width: 1024px) {
  /* FIX 1 — Logo tamaño intermedio en tablet */
  .nav-logo .logo-icon { height: 64px; }
  .nav-logo .logo-text { height: 48px; }

  /* Hero carousel — proporción más cercana a 16:9 */
  .hero-carousel { height: clamp(240px, 52vw, 480px); }
}

/* ── Mobile ≤ 767px ── */
@media (max-width: 767px) {

  /* FIX 1 — Navbar: logo más pequeño evita navbar de ~100px */
  .nav-logo .logo-icon { height: 62px; }
  .nav-logo .logo-text { height: 46px; }
  .hero-social-bar { display: none; }

  /* FIX 2/3 — Secciones: padding más compacto en mobile */
  section { padding-top: 2.75rem !important; padding-bottom: 2.75rem !important; }
  /* Hero mantiene más top padding para limpiar el navbar */
  section[style*="position:relative"] {
    padding-top: 5.5rem !important;
    padding-bottom: 1.25rem !important;
  }

  /* FIX 5 — Page header interior (nosotros, proyecto) */
  .page-header { padding-top: 7rem !important; padding-bottom: 2rem !important; }

  /* FIX 4 — Service cards: 1:1 → 4:3 evita tarjetas enormes */
  .service-img-card { aspect-ratio: 4/3; }

  /* FIX 12 — Hero carousel altura */
  .hero-carousel { height: clamp(200px, 54vw, 420px); }

  /* FIX 6 — Stats labels: letter-spacing excesivo en celdas pequeñas */
  #stats [style*="letter-spacing:.16em"] {
    letter-spacing: .04em !important;
    font-size: .65rem !important;
  }

  /* FIX 7 — Horizontal padding reducido en pantallas estrechas */
  .px-6 { padding-left: 1rem; padding-right: 1rem; }

  /* FIX 8 — Social buttons en footer oscuro: más visibles */
  footer .nav-social-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    color: rgba(255, 255, 255, 0.75) !important;
  }
  footer .nav-social-btn:hover {
    background: rgba(85, 85, 255, 0.35) !important;
    border-color: #5555ff !important;
    color: #fff !important;
  }

  /* FIX 9 — Botones full-width en mobile */
  .btn-primary { width: 100%; justify-content: center; min-width: unset; }
  .btn-outline  { width: 100%; justify-content: center; }

  /* FIX 10 — gap-14 entre columnas apiladas es excesivo */
  .gap-14 { gap: 2rem !important; }

  /* Carta interna de nosotros — grid-cols-2 en ancho restringido */
  .grid.grid-cols-2:not(#stats *) { grid-template-columns: 1fr !important; }
}

/* ── Phones muy pequeños ≤ 390px ── */
@media (max-width: 390px) {
  .nav-logo .logo-icon { height: 54px; }
  .nav-logo .logo-text { height: 40px; }
  section { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  section[style*="position:relative"] { padding-top: 5rem !important; }
  .page-header { padding-top: 6.5rem !important; padding-bottom: 1.5rem !important; }
  .hero-carousel { height: clamp(170px, 52vw, 230px); }
}

/* ═══ PAGE LOADER ═══ */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #f7f8fb;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#page-loader.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; align-items: center; justify-content: center; }
.loader-inner img { animation: loader-pulse 1.2s ease-in-out infinite; }
@keyframes loader-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.88); }
}
@media (prefers-reduced-motion: reduce) {
  .loader-inner img { animation: none; }
  #page-loader { transition: none; }
}

/* ═══ BACK TO TOP ═══ */
#back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 500;
  width: 46px; height: 46px;
  background: #2222bb; color: #fff;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(34,34,187,.35);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s ease, visibility .3s ease, transform .3s ease, background .2s;
}
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background: #1a1a8c; }
#back-to-top:focus-visible { outline: 3px solid #5555ff; outline-offset: 3px; }
@media (max-width: 767px) {
  #back-to-top { bottom: 5.5rem; right: 1.25rem; width: 42px; height: 42px; }
}

/* ═══ SHARE BUTTON ═══ */
.share-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: transparent; color: rgba(255,255,255,.75);
  border: 1.5px solid rgba(255,255,255,.2); border-radius: 999px;
  padding: .5rem 1rem;
  font-family: 'Montserrat', sans-serif; font-weight: 600;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.share-btn:hover { border-color: #5555ff; background: rgba(85,85,255,.12); color: #fff; }
.share-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.share-btn.is-copied { border-color: #22c55e; color: #4ade80; }
