﻿*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: 'Britannic';
  src: url('../fonts/britanic-bold.woff2') format('woff2'),
       url('../fonts/britanic-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #273071;
  --color-accent: #f25d12;
  --color-text: #1a1a1a;
  --color-white: #ffffff;
  --color-light: #f5f4f2;
  --color-gray: #555;
  --color-dark: #0c0c1a;

  --font-body: 'Fira Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Titillium Web', system-ui, -apple-system, sans-serif;
  --font-display: 'Britannic', 'Titillium Web', serif;

  --container-max: 1200px;
  --header-h: 72px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.12);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

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

ul {
  list-style: none;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  --color: var(--color-primary);
  font-family: inherit;
  display: inline-block;
  padding: 0 28px;
  height: 2.8em;
  line-height: 2.7em;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid var(--color);
  transition: color 0.5s;
  z-index: 1;
  font-size: 0.95rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  color: var(--color);
  background: transparent;
}

.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  background: var(--color);
  height: 200px;
  width: 250px;
  border-radius: 50%;
  top: 100%;
  left: 100%;
  transition: all 0.7s;
}

.btn:hover {
  color: #fff;
}

.btn:hover::before {
  top: -40px;
  left: -40px;
}

.btn:active::before {
  background: var(--color-accent);
  transition: background 0s;
}

.btn--primary {
  --color: var(--color-accent);
}

.btn--outline {
  --color: var(--color-white);
}
.btn--outline:hover {
  border-color: var(--color-white);
}

.btn--hero {
  --color: var(--color-primary);
}

.section {
  padding: 96px 0;
}

.section__title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: 16px;
  color: var(--color-primary);
}

.section__desc {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
  font-size: 1.1rem;
  color: var(--color-gray);
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: var(--color-white);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header.scrolled .header__logo {
  color: var(--color-primary);
}

.header.scrolled .header__nav a {
  color: var(--color-primary);
}

.header.scrolled .header__nav a:hover,
.header.scrolled .header__nav a.active {
  background: rgba(39, 48, 113, 0.08);
}

.header.scrolled .header__hamburger span {
  background: var(--color-primary);
}

.header.scrolled .dropdown-menu {
  background: var(--color-white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.header.scrolled .dropdown-menu a {
  color: var(--color-primary);
}

.header.scrolled .dropdown-menu a:hover {
  background: rgba(39, 48, 113, 0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.header__logo {
  display: flex;
  align-items: center;
  color: var(--color-white);
  height: 40px;
}

.brand-text {
  font-family: 'Britannic', serif;
}

.header__logo-text {
  font-family: 'Britannic', serif;
  font-size: 2.7rem;
  letter-spacing: 3px;
  color: inherit;
  text-decoration: none;
}

.header__nav ul {
  display: flex;
  gap: 8px;
}

.header__nav li {
  position: relative;
}

.header__nav a {
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-white);
  border-radius: var(--radius);
  position: relative;
  transition: background var(--transition);
}

.header__nav a:hover,
.header__nav a.active {
  background: rgba(255, 255, 255, 0.15);
}

.header__nav a.btn-nav {
  background: var(--color-accent);
  color: var(--color-primary);
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius);
}

.header__nav a.btn-nav:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.header.scrolled .header__nav a.btn-nav {
  background: var(--color-accent);
  color: var(--color-primary);
}

.header.scrolled .header__nav a.btn-nav:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.header__nav .dropdown > a {
  cursor: pointer;
}

.header__nav .dropdown-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  min-width: 240px;
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 100;
  padding: 8px 0;
}

.header__nav .dropdown-menu a {
  display: block;
  padding: 10px 20px;
  border-radius: 0;
  white-space: nowrap;
  font-size: 0.85rem;
}

.header__nav .dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.header__nav .dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header__nav .dropdown-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.7rem;
  transition: transform var(--transition);
}

.header__nav .dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.header__hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition);
  transform-origin: center;
}

.header__hamburger.active span {
  background: var(--color-white);
}

.header__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.header__hamburger.active span:nth-child(2) {
  opacity: 0;
}
.header__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}
.hero__video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero__overlay { display: none; 
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(39,48,113,0.85) 0%, rgba(39,48,113,0.6) 100%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 0 24px;
}
.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.1;
}
.hero__subtitle {
  font-size: clamp(1.3rem, 2.6vw, 1.625rem);
  max-width: 560px;
  margin-bottom: 36px;
  opacity: 0.9;
}

.hero__glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 45% 55% 60% 40% / 50% 40% 60% 50%;
  padding: 45px 60px;
  display: inline-block;
  position: relative;
}
.hero__glass::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50% 50% 40% 60% / 55% 45% 55% 45%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: -1;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* EMPRESA */
.empresa {
  background: var(--color-light);
}

/* ============================================================
   TIMELINE — CSS Timeline with Curves
   ============================================================ */
.timeline {
  margin: 80px 0;
}

.timeline__title {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 60px;
  color: var(--color-primary);
}

.timeline__track {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 0;
}

/* Central line */
.timeline__track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, 
    var(--color-primary) 0%, 
    var(--color-accent) 50%, 
    var(--color-primary) 100%);
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline__item {
  position: relative;
  width: 44%;
  padding: 24px 28px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline__item:nth-child(odd) {
  margin-left: auto;
}

.timeline__item:nth-child(even) {
  margin-right: auto;
}

.timeline__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Dot on the line */
.timeline__item::before {
  content: '';
  position: absolute;
  top: 28px;
  width: 16px;
  height: 16px;
  background: var(--color-accent);
  border: 3px solid var(--color-white);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--color-primary);
}

.timeline__item:nth-child(odd)::before {
  left: -48px;
}

.timeline__item:nth-child(even)::before {
  right: -48px;
}

/* Curved connector from dot to card */
.timeline__item::after {
  content: '';
  position: absolute;
  top: 36px;
  width: 42px;
  height: 2px;
  background: var(--color-primary);
}

.timeline__item:nth-child(odd)::after {
  left: -42px;
  border-radius: 10px 0 0 10px;
}

.timeline__item:nth-child(even)::after {
  right: -42px;
  border-radius: 0 10px 10px 0;
}

.timeline__year {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-accent);
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--color-accent), #ff8c42);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.timeline__item p {
  font-size: 0.9rem;
  color: var(--color-gray);
  line-height: 1.5;
  margin: 0;
}

/* Mobile: switch to single column */
@media (max-width: 768px) {
  .timeline__track::before {
    left: 20px;
  }
  .timeline__item {
    width: calc(100% - 60px);
    margin-left: 60px !important;
    margin-right: 0 !important;
  }
  .timeline__item::before {
    left: -40px !important;
    right: auto !important;
  }
  .timeline__item::after {
    left: -34px !important;
    right: auto !important;
    border-radius: 10px 0 0 10px !important;
  }
}

/* SERVICIOS */
.servicios__grid {
  display: grid;
  grid-template-columns: repeat(3, 555px);
  gap: 25px;
  justify-content: center;
  padding: 64px 0;
}

/* Servicio cards - Uiverse quick-chicken-16 effect */
.servicio-card {
  width: 426px;
  height: 580px;
  background: #313131;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  transition: 0.2s ease-in-out;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.servicio-card img {
  width: 100%;
  height: 100%;
  position: absolute;
  transition: 0.2s ease-in-out;
  z-index: 1;
  object-fit: cover;
}

.servicio-card__text {
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  transition: 0.2s ease-in-out;
  z-index: 2;
  position: absolute;
  text-align: center;
  padding: 20px;
}

.servicio-card__btn {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-accent);
  padding: 10px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.servicio-card__btn:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: scale(1.05);
}

.servicio-card__btn .head {
  font-size: 16px;
  font-weight: 700;
  color: inherit;
}

.servicio-card__text span {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
  max-width: 280px;
}

.servicio-card:hover > .servicio-card__text {
  opacity: 1;
}

.servicio-card:hover > img {
  height: 100%;
  filter: blur(7px) brightness(0.4);
  animation: anim 3s infinite;
}

.servicio-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 1;
}

.servicio-card:hover::after {
  opacity: 1;
}

@keyframes anim {
  0% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0); }
}

.servicio-card:hover {
  transform: scale(1.04) rotate(-1deg);
}



/* ============================================================
   BTN WRAPPER — Uiverse fuzzy-dog-81 effect
   ============================================================ */
.btn-wrapper {
  --dot-size: 8px;
  --line-weight: 1px;
  --line-distance: 0.9rem 1.1rem;
  --animation-speed: 0.35s;
  --dot-color: var(--color-accent);
  --line-color: rgba(255,255,255,0.6);

  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: var(--line-distance);
  background-color: transparent;
  transition: background-color 0.3s ease-in-out;
  user-select: none;
}

.btn-wrapper:has(.btn:hover) {
  animation: bg-color-change calc(var(--animation-speed) * 4) ease-in-out forwards;
}
@keyframes bg-color-change {
  80% { background-color: transparent; }
  100% { background-color: rgba(242,93,18,0.08); }
}

/* Dots */
.btn-wrapper .dot {
  position: absolute;
  width: var(--dot-size);
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--dot-color);
  transition: all 0.3s ease-in-out;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
}

.btn-wrapper:has(.btn:hover) .dot.top.left {
  top: 50%;
  left: 20%;
  animation: move-top-left var(--animation-speed) ease-in-out forwards;
}
@keyframes move-top-left {
  90% { opacity: 0.6; }
  100% { top: calc(var(--dot-size) * -0.5); left: calc(var(--dot-size) * -0.5); opacity: 1; }
}
.btn-wrapper:has(.btn:hover) .dot.top.right {
  top: 50%;
  right: 20%;
  animation: move-top-right var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 0.6);
}
@keyframes move-top-right {
  80% { opacity: 0.6; }
  100% { top: calc(var(--dot-size) * -0.5); right: calc(var(--dot-size) * -0.5); opacity: 1; }
}
.btn-wrapper:has(.btn:hover) .dot.bottom.right {
  bottom: 50%;
  right: 20%;
  animation: move-bottom-right var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 1.2);
}
@keyframes move-bottom-right {
  80% { opacity: 0.6; }
  100% { bottom: calc(var(--dot-size) * -0.5); right: calc(var(--dot-size) * -0.5); opacity: 1; }
}
.btn-wrapper:has(.btn:hover) .dot.bottom.left {
  bottom: 50%;
  left: 20%;
  animation: move-bottom-left var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 1.8);
}
@keyframes move-bottom-left {
  80% { opacity: 0.6; }
  100% { bottom: calc(var(--dot-size) * -0.5); left: calc(var(--dot-size) * -0.5); opacity: 1; }
}

/* Lines */
.btn-wrapper .line {
  position: absolute;
  transition: all 0.3s ease-in-out;
  z-index: 0;
}
.btn-wrapper .line.horizontal {
  height: var(--line-weight);
  width: 100%;
  background-image: repeating-linear-gradient(
    90deg, transparent 0 calc(var(--line-weight) * 2),
    var(--line-color) calc(var(--line-weight) * 2) calc(var(--line-weight) * 4)
  );
}
.btn-wrapper .line.top { top: calc(var(--line-weight) * -0.5); }
.btn-wrapper .line.bottom { bottom: calc(var(--line-weight) * -0.5); }
.btn-wrapper .line.vertical {
  width: var(--line-weight);
  height: 100%;
  background-image: repeating-linear-gradient(
    0deg, transparent 0 calc(var(--line-weight) * 2),
    var(--line-color) calc(var(--line-weight) * 2) calc(var(--line-weight) * 4)
  );
}
.btn-wrapper .line.left { left: calc(var(--line-weight) * -0.5); }
.btn-wrapper .line.right { right: calc(var(--line-weight) * -0.5); }

.btn-wrapper .line.top {
  transform-origin: top left;
  transform: rotate(5deg) scaleX(0.6);
}
.btn-wrapper:has(.btn:hover) .line.top {
  animation: draw-top var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 0.8);
}
@keyframes draw-top { 100% { transform: rotate(0deg) scaleX(1); } }

.btn-wrapper .line.bottom {
  transform-origin: bottom right;
  transform: rotate(5deg) scaleX(0.6);
}
.btn-wrapper:has(.btn:hover) .line.bottom {
  animation: draw-bottom var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 2);
}
@keyframes draw-bottom { 100% { transform: rotate(0deg) scaleX(1); } }

.btn-wrapper .line.left {
  transform-origin: bottom left;
  transform: rotate(0deg) scaleY(0.6);
}
.btn-wrapper:has(.btn:hover) .line.left {
  animation: draw-left var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 2.4);
}
@keyframes draw-left { 100% { transform: rotate(0deg) scaleY(1); } }

.btn-wrapper .line.right {
  transform-origin: top right;
  transform: rotate(5deg) scaleY(0.6);
}
.btn-wrapper:has(.btn:hover) .line.right {
  animation: draw-right var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 1.4);
}
@keyframes draw-right { 100% { transform: rotate(0deg) scaleY(1); } }

/* Override btn inside wrapper */
.btn-wrapper .btn--hero {
  background-color: var(--color-primary);
}

.btn-wrapper .btn {
  all: unset;
  --color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  height: auto;
  line-height: 1.4;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  padding: 14px 28px;
  background-color: var(--color-accent);
  background-image: linear-gradient(transparent, rgba(0,0,0,0.15));
  color: var(--color-white);
  border: none;
  border-radius: 30% / 200%;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  box-shadow:
    0 0 0px 1px rgba(0,0,0,0.15),
    0px 1px 1px rgba(3,7,18,0.02),
    0px 5px 4px rgba(3,7,18,0.04),
    0px 12px 9px rgba(3,7,18,0.06),
    0px 20px 15px rgba(3,7,18,0.08),
    0px 32px 24px rgba(3,7,18,0.1);
  transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out, border-radius 0.3s ease-in-out;
  z-index: 2;
  position: relative;
}

.btn-wrapper .btn:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
  transform: scale(1.05);
  border-radius: 10% / 200%;
}

.btn-wrapper .btn--hero:hover {
  color: var(--color-primary);
}

.btn-wrapper .btn:active {
  background-color: var(--color-accent);
  color: var(--color-white);
  transform: scale(0.98);
  border-radius: 20% / 200%;
}

.btn-wrapper .btn::before {
  display: none;
}

/* ============================================================
   FOOTER — replicado de garocaprim.es
   ============================================================ */
.footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer__logo-text {
  font-family: 'Britannic', serif;
  font-size: 2.55rem;
  letter-spacing: 3px;
  color: var(--color-white);
  display: block;
  margin-bottom: 12px;
}

.footer__brand p {
  font-size: 0.9rem;
}

.footer__links h4 {
  font-size: 1rem;
  color: var(--color-white);
  margin-bottom: 16px;
}

.footer__links li {
  margin-bottom: 8px;
}

.footer__links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}
.footer__links a:hover {
  color: var(--color-accent);
}

.footer__copy {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* ============================================================
   OBRAS (index) — replicado de garocaprim.es
   ============================================================ */
.obras {
  background: var(--color-light);
}

.obras__grid {
  columns: 3;
  column-gap: 20px;
  margin-top: 48px;
}

.obras__item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  will-change: transform;
}

.obras__item img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1);
  transition: filter 0.5s ease, transform 0.6s ease;
}

.obras__item:hover img {
  filter: grayscale(0);
  transform: scale(1.08);
}

.obras__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.obras__item:hover .obras__overlay {
  opacity: 1;
}

.obras__cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.obras__title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

/* ============================================================
   CONTACTO — replicado de garocaprim.es
   ============================================================ */
.contacto {
  background: var(--color-primary);
  color: var(--color-white);
}

.contacto .section__title {
  color: var(--color-white);
}

.contacto .section__desc {
  color: rgba(255,255,255,0.7);
}

.contacto__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contacto__field {
  margin-bottom: 20px;
}

.contacto__field label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
}

.contacto__field input,
.contacto__field textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), background var(--transition);
}

.contacto__field input::placeholder,
.contacto__field textarea::placeholder {
  color: rgba(255,255,255,0.5);
}

.contacto__field input:focus,
.contacto__field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255,255,255,0.15);
}

.contacto__form .btn--primary {
  width: 100%;
}

.contacto__info h3 {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.contacto__info a:hover {
  color: var(--color-accent) !important;
}

.contacto__detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.85);
}

.contacto__detail svg {
  flex-shrink: 0;
}

/* ============================================================
   PAGE HERO (subpages)
   ============================================================ */
.page-hero {
  position: relative;
  height: 300px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.page-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(39, 48, 113, 0.85) 0%, rgba(39, 48, 113, 0.6) 100%);
  z-index: 1;
}
.page-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
}
.page-hero__title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--color-white);
  margin-bottom: 10px;
}
.page-hero__subtitle {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
}

/* ============================================================
   BLOG
   ============================================================ */
.Blog__hero {
  text-align: center;
  margin-bottom: 50px;
}
.noticias__grid,
.Blog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ============================================================
   NOTICIAS
   ============================================================ */
.noticia-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.noticia-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.noticia-card__badge {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* ============================================================
   CATALOGOS
   ============================================================ */
.catalogos__grid {
  display: grid;
  grid-template-columns: repeat(6, 470px); gap: 20px; justify-content: center; margin: 40px auto 0; overflow-x: auto;
  gap: 30px;
  margin-top: 40px;
}
.catalogo-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}
.catalogo-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.catalogo-card__icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.catalogo-card__btn {
  margin-top: auto;
}

/* ============================================================
   EMPRESA / ABOUT
   ============================================================ */
.about__story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin: 60px 0;
}
.about__story-text h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 20px;
}
.about__story-text p {
  color: var(--color-gray);
  line-height: 1.8;
  margin-bottom: 15px;
}
.about__story-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
}
.about__milestone {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
.about__milestone-year {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-primary);
  min-width: 80px;
}
.about__milestone-desc {
  color: var(--color-gray);
  line-height: 1.6;
}
.about__values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
}
.about__value-card {
  text-align: center;
  padding: 30px 20px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.about__value-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-accent);
  display: block;
  margin-bottom: 10px;
}
.specialties-glass-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
  padding: 40px 0;
}
.specialty-glass-card {
  position: relative;
  width: 250px;
  height: 280px;
  background: linear-gradient(rgba(255,255,255,0.13), transparent);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 25px 25px rgba(0,0,0,0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.5s;
  border-radius: 10px;
  margin: 0 -10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: rotate(calc(var(--r) * 1deg));
  overflow: hidden;
}
.specialties-glass-container:hover .specialty-glass-card {
  transform: rotate(0deg) translateX(calc(var(--r) * 12px)) scaleX(1.15);
  margin: 0 12px;
}
.specialty-glass-card::before {
  content: attr(data-text);
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 40px;
  background: rgba(255,255,255,0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.specialties-glass-container:hover .specialty-glass-card::before {
  opacity: 1;
}
.specialty-glass-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
}
@media (max-width: 768px) {
  .specialties-glass-container {
    flex-wrap: wrap;
    gap: 20px;
  }
  .specialty-glass-card {
    margin: 0;
    transform: rotate(0deg);
    width: 180px;
    height: 200px;
  }
  .specialties-glass-container:hover .specialty-glass-card {
    margin: 0;
  }
}
.about__sustainability-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about__sustainability-content h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 20px;
}
.about__sustainability-stats {
  display: flex;
  gap: 40px;
  margin-top: 30px;
}
.about__sustainability-stat {
  text-align: center;
}
.about__sustainability-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--color-accent);
  display: block;
}
.about__sustainability-label {
  font-size: 0.85rem;
  color: var(--color-gray);
}
.about__sustainability-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
}

/* ============================================================
   OBRAS PAGE
   ============================================================ */
.obras__cat {
  display: inline-block;
  padding: 4px 10px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 20px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}



/* ============================================================
   ABOUT 3D CAROUSEL — Uiverse swift-panda-38
   ============================================================ */
.about__carousel {
  margin-top: 0;
  height: 100%;
  display: flex;
  align-items: center;
}

.about__carousel-wrapper {
  width: 100%;
  height: 100%;
  min-height: 500px;
  position: relative;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about__carousel-inner {
  --w: 149px;
  --h: 230px;
  --translateZ: calc((var(--w) + var(--h)) + 50px);
  --rotateX: -15deg;
  --perspective: 1000px;
  --color-card: 255,255,255;
  position: absolute;
  width: var(--w);
  height: var(--h);
  top: 25%;
  left: calc(50% - (var(--w) / 2) - 2.5px);
  z-index: 2;
  transform-style: preserve-3d;
  transform: perspective(var(--perspective));
  animation: carousel-rotating 20s linear infinite;
}

@keyframes carousel-rotating {
  from {
    transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(0);
  }
  to {
    transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(1turn);
  }
}

.about__carousel-card {
  position: absolute;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  overflow: hidden;
  inset: 0;
  transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) translateZ(var(--translateZ));
  transition: border-color 0.3s ease;
}

.about__carousel-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 20px rgba(242,93,18,0.4);
}

.about__carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pause animation on hover */
.about__carousel-wrapper:hover .about__carousel-inner {
  animation-play-state: paused;
}

@media (max-width: 768px) {
  .about__carousel-wrapper {
    height: 400px;
  }
  .about__carousel-wrapper {
    height: 400px;
  }
  .about__carousel-inner {
    --w: 108px;
    --h: 162px;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
  .servicios__grid {
    grid-template-columns: repeat(2, 370px);
    gap: 20px;
  }
  .obras__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer__inner {
    flex-direction: column;
    gap: 30px;
  }
  .footer__links {
    gap: 40px;
  }
  .contacto__grid {
    grid-template-columns: 1fr;
  }
  .about__story {
    grid-template-columns: 1fr;
  }
  .about__values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about__specialties-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about__sustainability-inner {
    grid-template-columns: 1fr;
  }
  .page-hero {
    height: 250px;
  }
  .page-hero__title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    height: 70vh;
  }
  .hero__title {
    font-size: 2rem;
  }
  .hero__subtitle {
    font-size: 1rem;
  }
  .servicios__grid {
    grid-template-columns: 1fr;
    max-width: 426px;
    margin: 0 auto;
  }
  .obras__grid {
    columns: 1;
  }
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contacto__grid {
    grid-template-columns: 1fr;
  }
  .about__values-grid {
    grid-template-columns: 1fr;
  }
  .about__specialties-grid {
    grid-template-columns: 1fr;
  }
  .about__sustainability-stats {
    flex-direction: column;
    gap: 20px;
  }
  .header__nav {
    display: none;
  }
  .header__hamburger {
    display: block;
  }
  .page-hero {
    height: 200px;
    background-attachment: scroll;
  }
  .page-hero__title {
    font-size: 1.8rem;
  }
  .servicios-hero {
    padding: 60px 0;
  }

}


.servicio-detalle__content h2,
.servicio-detalle__content p {
  color: #fff;
}

/* Pattern background */
.pattern-bg {
  background-color: #132440 !important;
  background-image:
    radial-gradient(circle farthest-side at 0% 50%, #1a3359 23.5%, transparent 0) 21px 30px,
    radial-gradient(circle farthest-side at 0% 50%, #f25d12 24%, transparent 0) 19px 30px,
    linear-gradient(#132440 14%, transparent 0, transparent 85%, #132440 0) 0 0,
    linear-gradient(150deg, #132440 24%, #f25d12 0, #f25d12 26%, transparent 0, transparent 74%, #f25d12 0, #f25d12 76%, #132440 0) 0 0,
    linear-gradient(30deg, #132440 24%, #f25d12 0, #f25d12 26%, transparent 0, transparent 74%, #f25d12 0, #f25d12 76%, #132440 0) 0 0,
    linear-gradient(90deg, #f25d12 2%, #132440 0, #132440 98%, #f25d12 0%) 0 0 #132440 !important;
  background-size: 40px 60px;
}

.servicio-detalle {
  gap: 50px;
}

/* Servicios grid - neumorphic cards */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(6, 470px); gap: 20px; justify-content: center; margin: 40px auto 0; overflow-x: auto;
  gap: 24px;
  margin-top: 40px;
}
.servicio-card {
  background: #1a2d4a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 8px 8px 16px #0d1525, -8px -8px 16px #273d5f;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.servicio-card:hover {
  box-shadow: 12px 12px 24px #0d1525, -12px -12px 24px #304970;
  transform: translateY(-4px);
}
.servicio-card__img {
  width: 100%;
  width: 470px; height: 445px;
  overflow: hidden;
}
.servicio-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.servicio-card h3 {
  color: #c9a84c;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  padding: 12px 16px;
  text-align: center;
  background: #1a2d4a;
}
@media (max-width: 1024px) {
  .servicios-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .servicios-grid { grid-template-columns: repeat(2, 1fr); }
}

.servicios-grid { max-width: none; }

.servicios-section { padding: 80px 0; }
.servicios-section .servicios__grid { margin-top: 40px; }
.cta-section { background: var(--color-primary); color: #fff; }
.cta-section .section__title { color: #fff; }
.cta-section .section__desc { color: rgba(255,255,255,0.8); margin-bottom: 24px; }
