/* ==========================================================================
   APRILE ABERTURAS — Sistema Visual Arquitectónico (Estructuras Hetch op1 + Framex op2)
   Inicio, catálogo, ficha y contacto
   ========================================================================== */

:root {
  --primary-color: #0b1929;
  --ink: #0b1929;
  --text-color: #4a5968;
  --muted: #5a6b7c;
  --secondery-color: #f4f6f8;
  --surface: #f4f6f8;
  --stone: #eef2f6;
  --divider-color: #dce4ec;
  --dark-divider-color: rgba(255, 255, 255, 0.14);
  --white-color: #ffffff;
  --paper: #ffffff;
  --accent: #0086c4;
  --accent-color: #0086c4;
  --accent-hover: #006b9e;
  --accent-dark: #07223f;
  --btn-gradient: linear-gradient(135deg, #0d9be0 0%, #0086c4 52%, #006da6 100%);
  --pale: #e8f2f8;
  --dark: #0b1929;
  --radius-card: 24px;
  --radius-lg: 30px;
  --shadow-sm: 0 8px 24px rgba(11, 25, 41, 0.05);
  --shadow: 0 18px 42px rgba(11, 25, 41, 0.1);
  --page-width: 1300px;
  --font: 'Montserrat', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: clip;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.68;
  color: var(--text-color);
  background-color: var(--white-color);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
  transition: all 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.5;
}

img {
  max-width: 100%;
  display: block;
}

figure {
  margin: 0;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.15;
  color: var(--primary-color);
  letter-spacing: -0.02em;
}

p {
  line-height: 1.68;
  color: var(--text-color);
}

[hidden] {
  display: none !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 20px;
  top: -80px;
  background: var(--white-color);
  color: var(--primary-color);
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: calc(100% - 40px);
  max-width: var(--page-width);
  margin-inline: auto;
}

/* ==========================================================================
   Efecto de Imagen Arquitectónica (.image-anime de op1/op2)
   ========================================================================== */
.image-anime {
  position: relative;
  overflow: hidden;
}

.image-anime::after {
  content: "";
  position: absolute;
  width: 200%;
  height: 0%;
  left: 50%;
  top: 50%;
  background-color: rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%) rotate(-45deg);
  z-index: 1;
  pointer-events: none;
}

.image-anime:hover::after {
  height: 250%;
  transition: all 600ms linear;
  background-color: transparent;
}

.image-anime img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.image-anime:hover img {
  transform: scale(1.04);
}

/* ==========================================================================
   Títulos de Sección y Pills (Estilo exacto .section-sub-title de op2/framex)
   Cápsula redondeada con punto circular de 5px a la izquierda
   ========================================================================== */
.section-title {
  margin-bottom: 42px;
}

.section-title .section-sub-title,
.section-title h3 {
  position: relative;
  display: inline-block;
  font-family: var(--default-font, var(--font));
  font-size: 14px;
  font-weight: 400;
  text-transform: capitalize;
  letter-spacing: 0;
  line-height: normal;
  color: var(--primary-color);
  background-color: var(--secondery-color);
  border-radius: 100px;
  padding: 8px 16px 8px 32px;
  margin-bottom: 15px;
  border: none;
}

.section-title .section-sub-title::before,
.section-title h3::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent-color);
  border-radius: 50%;
  width: 5px;
  height: 5px;
}

/* En secciones con fondo gris/secundario, el pill pasa a fondo blanco puro (op2) */
.page-projects .section-title h3,
.page-projects .section-title .section-sub-title,
.our-services .section-title h3,
.our-services .section-title .section-sub-title {
  background-color: var(--white-color);
  color: var(--primary-color);
}

.section-title h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.section-title h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-title h1 span,
.section-title h2 span {
  color: var(--accent-color);
}

.section-title p {
  margin-top: 18px;
  margin-bottom: 0;
  font-size: 15.5px;
  color: var(--text-color);
}

.section-title-light h2,
.section-title-light h1 {
  color: var(--white-color);
}

/* En secciones oscuras / hero / cards oscuras: pill traslúcido con blur(30px) exacto de op2 */
.hero-stone .section-title h3,
.hero-stone .section-title .section-sub-title,
.dark-section .section-title h3,
.dark-section .section-title .section-sub-title,
.grandes-proyectos-section .section-title h3,
.grandes-proyectos-section .section-title .section-sub-title,
.section-title-light h3,
.section-title-light .section-sub-title {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  color: var(--white-color);
  border: none;
}

.section-title-light h3::before,
.section-title-light .section-sub-title::before,
.hero-stone .section-title h3::before {
  background-color: var(--accent-color);
}

.section-title-light p {
  color: rgba(255, 255, 255, 0.82);
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 54px;
  flex-wrap: wrap;
}

.section-row .section-title {
  margin-bottom: 0;
  max-width: 660px;
}

/* Botón Principal Estilo Framex (.btn-default con border-radius: 100px) */
.btn-default,
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-gradient);
  color: var(--white-color);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.1;
  border: none;
  padding: 17px 50px 17px 26px;
  border-radius: 100px;
  transition: all 0.4s ease;
  overflow: hidden;
  z-index: 0;
  cursor: pointer;
  white-space: nowrap;
}

.button span {
  display: none;
}

.btn-default::before,
.button::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 16px;
  height: 16px;
  background: url('../images/iconos/arrow-white.svg') no-repeat center / contain;
  transform: translate(-22px, -50%);
  transition: transform 0.35s ease;
}

.btn-default:hover::before,
.button:hover::before {
  transform: translate(-18px, -50%);
}

.btn-default::after,
.button::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--primary-color);
  border-radius: 100px;
  transition: width 0.4s ease;
  z-index: -1;
}

.btn-default:hover,
.button:hover {
  color: var(--white-color);
}

.btn-default:hover::after,
.button:hover::after {
  width: 100%;
}

.btn-default.btn-highlighted {
  background: var(--white-color);
  color: var(--primary-color);
}

.btn-default.btn-highlighted::before {
  filter: invert(1);
}

.btn-default.btn-highlighted:hover::before {
  filter: none;
}

.btn-default.btn-highlighted::after {
  background: var(--btn-gradient);
}

/* ==========================================================================
   Preloader Corporativo con entrada breve y cierre independiente de los medios
   ========================================================================== */
.aprile-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 80% 18%, rgba(121, 209, 255, 0.24) 0%, transparent 52%),
    radial-gradient(circle at 18% 85%, rgba(0, 134, 196, 0.28) 0%, transparent 50%),
    linear-gradient(135deg, #051629 0%, #073262 42%, #0077b6 80%, #0ea5e9 100%);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  animation: aprilePreloaderFallback 0s 1.6s forwards;
}

.aprile-preloader[hidden] { display: none; }

@keyframes aprilePreloaderFallback {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

.aprile-preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.02);
}

.aprile-preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}

.aprile-preloader-orb {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(4, 16, 36, 0.38);
  margin-bottom: 18px;
}

.aprile-preloader-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.14);
  border-top-color: #79d1ff;
  border-right-color: #ffffff;
  animation: aprilePreloaderSpin 1.15s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}

.aprile-preloader-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  animation: aprilePreloaderPulse 1.8s ease-in-out infinite;
}

.aprile-preloader-progress {
  width: 188px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.aprile-preloader-bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #79d1ff 0%, #ffffff 100%);
  transform-origin: left center;
  transform: scaleX(0);
  animation: aprilePreloaderBar .6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.aprile-preloader-text {
  margin-top: 12px;
  color: var(--white-color);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.045em;
}

@keyframes aprilePreloaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes aprilePreloaderPulse {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.88;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes aprilePreloaderBar {
  0% {
    transform: scaleX(0.08);
  }
  65% {
    transform: scaleX(0.84);
  }
  100% {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aprile-preloader-ring,
  .aprile-preloader-mark {
    animation: none;
  }
  .aprile-preloader-bar {
    transform: scaleX(1);
    animation: none;
  }
}

/* ==========================================================================
   Header Transparente y Limpio (Estructura Framex op2/index.html)
   Una sola fila, enlaces cortos sin salto de línea y 1 solo botón CTA a la derecha
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--primary-color);
  color: var(--white-color);
  border-bottom: 1px solid var(--dark-divider-color);
}

.site-header.over-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.site-header.sticky-active {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(11, 25, 41, 0.96);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  animation: headerSlideDown 0.3s ease;
}

@keyframes headerSlideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

.header-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-header.sticky-active .header-inner {
  min-height: 80px;
}

.brand-logo {
  position: relative;
  display: block;
  width: 205px;
  height: 52px;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo img {
  position: absolute;
  width: 236px;
  max-width: none;
  height: 236px;
  left: -15px;
  top: -92px;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
}

.nav-item-wrap {
  position: relative;
}

.header-nav>a,
.nav-item-wrap>a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--white-color);
  white-space: nowrap;
  position: relative;
}

.header-nav>a:hover,
.nav-item-wrap:hover>a,
.header-nav>a[aria-current="page"],
.nav-item-wrap>a[aria-current="page"] {
  color: #66ccff;
}

.nav-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.nav-caret svg {
  display: block;
}

.nav-item-wrap:hover .nav-caret {
  transform: rotate(180deg);
  background: rgba(102, 204, 255, 0.22);
  color: #66ccff;
}

.nav-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 270px;
  background: var(--primary-color);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.35);
  z-index: 120;
}

.nav-item-wrap:hover .nav-submenu,
.nav-item-wrap:focus-within .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-submenu li a {
  display: block;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

.nav-submenu li a:hover {
  color: #66ccff;
  padding-left: 25px;
  background: rgba(255, 255, 255, 0.04);
}

.header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Estricto: el botón móvil NUNCA se muestra en desktop para evitar botones duplicados */
.header-nav .mobile-only-cta {
  display: none !important;
}

.menu-toggle {
  display: none;
  background: var(--accent-color);
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--white-color);
  align-items: center;
  justify-content: center;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
