/* ==========================================================
   ATT Ingeniería y Consultoría, S.L. - Hoja de estilos
   Para cambiar los colores de toda la web, edita solo las
   variables de la sección :root (justo debajo).
   ========================================================== */

:root {
  --navy: #800020;        /* color principal: granate */
  --navy-dark: #4d0013;   /* granate más oscuro */
  --blue: #800020;        /* granate para enlaces y detalles */
  --accent: #e8a21a;      /* color de acento: ámbar */
  --bg: #f4f6f9;          /* fondo general */
  --card: #ffffff;
  --text: #1e2a36;
  --muted: #5d6c7b;
  --line: #e1e6ec;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(128, 0, 32, .12);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; color: var(--navy); margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 76px;
}
.brand img { height: 56px; width: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 9px 13px; border-radius: 999px;
  color: var(--navy); font-weight: 500; font-size: .93rem;
  transition: background .2s, color .2s;
}
.site-nav a:hover { background: var(--bg); text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--navy); color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 11px; width: 20px; height: 2px;
  background: var(--navy); border-radius: 2px; transition: transform .25s, top .25s, opacity .25s;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { left: 0; top: -6px; }
.nav-toggle span::after { left: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    linear-gradient(115deg, rgba(9,28,49,.94) 0%, rgba(14,42,71,.82) 55%, rgba(31,111,178,.55) 100%),
    url("designs/design613/color1/keyvisuals/keyv100.jpg") center/cover no-repeat,
    var(--navy);
  padding: clamp(64px, 10vw, 120px) 0;
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 58ch; color: #dbe6f1; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; font-weight: 600; color: var(--accent); margin-bottom: 14px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-block; padding: 13px 24px; border-radius: 999px; font-weight: 600;
  border: 2px solid transparent; transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #1b1300; }
.btn-primary:hover { background: #f4b63a; }
.btn-outline { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline:hover { background: #fff; color: var(--navy); }

.page-hero {
  background: linear-gradient(115deg, var(--navy-dark), var(--navy));
  color: #fff; padding: clamp(40px, 6vw, 72px) 0;
}
.page-hero h1 { color: #fff; margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero p { color: #c9d8e8; margin: 10px 0 0; max-width: 60ch; }

/* ---------- Secciones ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section.alt { background: #fff; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .num {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; background: var(--navy); color: var(--accent);
  font-weight: 700; margin-bottom: 16px;
}

.prose { max-width: 760px; }
.prose p { color: #34414e; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li, .chips a {
  background: #fff; border: 1px solid var(--line); color: var(--navy);
  padding: 8px 16px; border-radius: 999px; font-size: .92rem; font-weight: 500;
}
.chips a:hover { background: var(--navy); color: #fff; text-decoration: none; }
.section.alt .chips li { background: var(--bg); }

.highlight {
  background: linear-gradient(115deg, var(--navy-dark), var(--navy));
  color: #e6eef7; border-radius: var(--radius); padding: clamp(28px, 4vw, 48px);
}
.highlight h2, .highlight h3 { color: #fff; }
.highlight .eyebrow { margin-bottom: 8px; }

.big-quote {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: var(--navy);
  border-left: 5px solid var(--accent); padding-left: 20px; margin: 0 0 28px;
}

.cta-band { background: var(--accent); color: #1b1300; padding: 44px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; color: #1b1300; font-size: 1.5rem; }
.cta-band .btn { background: var(--navy); color: #fff; }

/* ---------- Contacto y mapas ---------- */
.office h3 { margin-bottom: 12px; font-size: 1.25rem; }
.office address { font-style: normal; color: #34414e; }
.office .row { display: flex; gap: 10px; margin-top: 8px; }
.office .row strong { min-width: 70px; color: var(--navy); }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-top: 18px; }
.map-wrap iframe { width: 100%; height: 360px; border: 0; display: block; }

/* ---------- Galería ---------- */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.gallery a {
  display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px;
  background: #dfe5ec; box-shadow: var(--shadow);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed; inset: 0; background: rgba(5, 14, 25, .93); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; max-width: min(1100px, 92vw); border-radius: 8px; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.3); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- Proyectos realizados ---------- */
.ref-block { margin-bottom: 44px; scroll-margin-top: 96px; }
.ref-block h2 {
  display: flex; align-items: center; gap: 12px; font-size: 1.5rem;
  padding-bottom: 12px; border-bottom: 3px solid var(--accent); margin-bottom: 18px;
}
.ref-block h2 .count {
  font-size: .8rem; background: var(--navy); color: #fff; padding: 3px 11px;
  border-radius: 999px; font-weight: 600;
}
.ref-list { list-style: none; padding: 0; margin: 0; }
.ref-list > li {
  position: relative; padding: 12px 14px 12px 34px; border-bottom: 1px solid var(--line);
  color: #34414e; font-size: .96rem;
}
.ref-list > li::before {
  content: ""; position: absolute; left: 12px; top: 20px; width: 8px; height: 8px;
  background: var(--accent); border-radius: 2px; transform: rotate(45deg);
}
.ref-list > li:hover { background: #fff; }
.ref-list ul { list-style: none; padding: 0; margin: 10px 0 0; }
.ref-list ul li {
  position: relative; padding: 6px 0 6px 20px; font-size: .92rem; color: #4a5866;
}
.ref-list ul li::before {
  content: ""; position: absolute; left: 2px; top: 15px; width: 6px; height: 6px;
  background: var(--blue); border-radius: 50%;
}

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-dark); color: #b9c8d8; padding: 48px 0 28px; margin-top: 0; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.site-footer a { color: #e0eaf4; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 18px;
  font-size: .88rem;
}

/* ---------- Móvil ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); display: none; padding: 10px 20px 18px;
    box-shadow: 0 14px 24px rgba(14,42,71,.1);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { border-radius: 10px; }
  .brand img { height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
.projects-list {
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

.projects-list > li {
  margin-bottom: 0.85rem;
  line-height: 1.7;
}

.projects-list ul {
  margin-top: 0.6rem;
  padding-left: 1.5rem;
}

.projects-list ul li {
  margin-bottom: 0.5rem;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* CORRECCIÓN DE LA CABECERA Y EL MENÚ */
@media (min-width: 769px) {
  .header-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }

  .brand {
    flex-shrink: 0;
  }

  .site-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.8rem;
    padding-top: 0.5rem;
  }

  .site-nav a {
    white-space: nowrap;
    font-size: 0.78rem;
    line-height: 1.4;
  }
}


/* GALERÍA DE FOTOS */
.photo-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.gallery-item {
  width: 100%;
  margin: 0;
  text-align: center;
}

.gallery-item img {
  display: block;
  width: 100%;
  max-width: 1000px;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
}

/* BOTÓN PARA VOLVER A LA CABECERA */
.back-to-top {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 2rem;
}

.back-to-top-button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.back-to-top-button:hover {
  background-color: #555;
  color: #fff;
}

/* AJUSTE VERTICAL DEL LOGOTIPO */
.site-header .brand img {
  transform: translateY(5px);
}

url("images/XXX.jpg");
