@charset "UTF-8";

/* ==========================================================================
   ALNAT SRL - style.css (versión responsive)
   Diseño original: ZOOM Design SRL. Reescrito con layout fluido (flex/grid),
   clases en lugar de IDs repetidos y breakpoints a 900 / 640 / 480 px.
   ========================================================================== */

:root {
  --navy: #003A5D;
  --navy-2: #004C6C;
  --steel: #455560;
  --blue: #0080BB;
  --blue-2: #0082B5;
  --slate: #344F5D;
  --cat: #537992;
  --page: #002A3A;
  --f-title: 'Titillium Web', Arial, Helvetica, sans-serif;
  --f-ui: 'Merriweather Sans', Arial, Helvetica, sans-serif;
  --f-text: Arial, Helvetica, sans-serif;
  --edge: 24px;   /* margen lateral de la página */
  --gut: 40px;    /* margen interno de la tarjeta */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: #386783; font-family: var(--f-text); color: var(--steel); }
img { max-width: 100%; height: auto; border: 0; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p, address { margin: 0; font: inherit; font-style: normal; }
a { text-decoration: none; }
::selection { background: #BBC2C8; color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #5BB8E8; outline-offset: 2px;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 1000; background: #fff; color: var(--navy);
  padding: 10px 14px; font: 700 14px var(--f-text); border-radius: 0 0 4px 4px;
}
.skip-link:focus { top: 0; }

.nowrap { white-space: nowrap; }

/* ---------- Cabecera ---------- */
.site-header { background: var(--navy); }
.site-header::after {
  content: ""; display: block; height: 18px;
  border-top: 1px solid var(--navy-2); border-bottom: 1px solid var(--navy);
  background: #455560 url(../../images/layout/metal-01.jpg) center repeat-x;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 170px; padding: 0 var(--edge);
}
.logo { display: block; flex: 0 0 auto; }
.logo img { display: block; width: 340px; max-width: 100%; height: auto; }
.header-address {
  flex: 1 1 auto; text-align: right; color: #fff;
  font: 400 14px/1.3em var(--f-title);
}
.header-address a { color: #A1B4C3; }
.header-address a:hover { color: #D6DEE4; }
.header-address .sep { margin: 0 .7em; }
.header-mail { flex: 0 0 60px; display: block; width: 60px; height: 60px; }
.header-mail img { display: block; transition: filter .15s ease; }
.header-mail:hover img, .header-mail:focus-visible img { filter: brightness(1.3); }

/* ---------- Slider ---------- */
.hero {
  background: #316F92 url(../../images/layout/bg.jpg) center repeat-x; background-size: auto 100%;
  border-bottom: 1px solid var(--navy);
}
.slider { position: relative; max-width: 980px; margin: 0 auto; overflow: hidden; background: #316F92; }
.slider::before { content: ""; display: block; padding-top: 37.347%; } /* 980 x 366 */
.slider .slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
  visibility: hidden; will-change: transform;
  transition: transform .65s cubic-bezier(.65, 0, .35, 1), opacity .5s ease;
}
.slider .slide:first-child { visibility: visible; } /* sin JS se ve la primera */
.slider-btn {
  position: absolute; z-index: 3; top: 50%; width: 40px; height: 40px; margin-top: -20px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0, 58, 93, .55); cursor: pointer;
  opacity: 0; transition: opacity .2s ease, background .2s ease;
}
.slider-btn::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px;
  border: solid #fff; border-width: 2px 2px 0 0;
}
.slider-prev { left: 10px; }
.slider-prev::after { transform: translate(-30%, -50%) rotate(-135deg); }
.slider-next { right: 10px; }
.slider-next::after { transform: translate(-70%, -50%) rotate(45deg); }
.slider:hover .slider-btn, .slider-btn:focus-visible { opacity: 1; }
.slider-btn:hover { background: rgba(0, 58, 93, .85); }
.slider-dots {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 4px;
}
.slider-dots button {
  width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; position: relative;
}
.slider-dots button::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: rgba(255, 255, 255, .45); border: 1px solid rgba(0, 58, 93, .4);
}
.slider-dots button[aria-current="true"]::after { background: #fff; }
@media (hover: none) { .slider-btn { opacity: .85; } }

/* ---------- Menú principal ---------- */
.main-nav {
  position: sticky; top: 0; z-index: 20;
  background: #455560 url(../../images/layout/metal-02.jpg) center top repeat-x;
  transition: box-shadow .2s ease;
  border-top: 1px solid var(--navy);
}
.main-nav ul { display: flex; justify-content: flex-end; align-items: center; height: 60px; padding: 0 var(--edge); }
.main-nav li { display: flex; align-items: center; }
.main-nav li::after, .main-nav li:first-child::before {
  content: ""; flex: 0 0 21px; width: 21px; height: 60px;
  background: url(../../images/layout/div.png) center no-repeat;
}
.main-nav a {
  display: block; margin: 0 16px; padding: 6px 10px; color: #fff;
  font: 400 13px var(--f-ui); text-transform: uppercase; text-align: center;
}
.main-nav.is-stuck { box-shadow: 0 3px 10px rgba(0, 20, 35, .45); }
.main-nav a:hover, .main-nav a[aria-current] { background: #6D7A82; }
.main-nav::after { content: ""; display: block; height: 2px; background: #84929D url(../../images/layout/pattern-02.jpg) center repeat-x; }

/* ---------- Contenido (tarjeta) ---------- */
.page { background: var(--page); padding: 20px var(--edge) 10px; scroll-margin-top: 72px; }
.card { background: #fff; border: 8px solid var(--slate); }
.page::after {
  content: ""; display: block; height: 30px; margin: 0 var(--gut);
  background: url(../../images/layout/shadow.png) center top no-repeat; background-size: 100% 100%;
}
.card-head { padding-top: 25px; min-height: 65px; }
.card-head::after {
  content: ""; display: block; height: 1px; margin: 0 var(--gut);
  background: url(../../images/layout/linea.png) center / 100% 1px no-repeat;
}
.page-title {
  height: 40px; margin-left: var(--gut); color: var(--blue);
  font: 400 26px/40px var(--f-ui);
}
.card-body { display: flex; align-items: stretch; margin-top: 30px; min-height: 668px; }

/* botonera de categorías */
.cat-nav { margin: 0 var(--gut); background: var(--cat); }
.cat-nav ul { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; min-height: 40px; padding: 0 3px; }
.cat-nav li { display: flex; flex: 1 1 0; justify-content: center; align-items: center; }
.cat-nav li + li::before {
  content: ""; flex: 0 0 1px; width: 1px; height: 28px;
  background: url(../../images/layout/div.png) center no-repeat;
}
.cat-nav a {
  display: block; margin: 0 7px; padding: 8px 10px; color: #C8D3DC;
  font: 400 12px/1.2 Tahoma, Arial, Helvetica, sans-serif; text-align: center;
}
.cat-nav a:hover, .cat-nav a[aria-current] { color: #fff; }

/* submenú lateral */
.subnav {
  flex: 0 0 clamp(300px, 22vw, 400px); padding: 20px 0 20px 30px;
  background: linear-gradient(180deg, #fff 0%, #F9FAFB 20%, #EBEFF2 100%);
}
.subnav-toggle { display: none; }
.subnav li {
  margin-bottom: 9px; padding-bottom: 9px;
  background: url(../../images/layout/line.png) center bottom no-repeat;
  font: 700 13px/1.2em var(--f-ui);
}
.subnav li:last-child { margin-bottom: 0; padding-bottom: 0; background: none; }
.subnav a { display: block; padding: 2px 0 2px 38px; color: #5C6F7B; }
.subnav a:hover { color: var(--blue-2); }
.subnav .is-new a { background: url(../../images/layout/new.png) 0 center no-repeat; }
.subnav a[aria-current] { color: var(--blue); }
.subnav .is-new a[aria-current] { color: #049CD6; }

.card-main {
  flex: 1 1 auto; min-width: 0; padding: 0 clamp(28px, 4vw, 72px) 30px clamp(20px, 2.5vw, 48px);
  background: url(../../images/layout/watermark.png) right bottom no-repeat;
}
.card-main p { color: var(--steel); font: 13px/1.3em var(--f-text); text-align: left; }
.card-main p span { color: var(--blue-2); }
.card-main p + p { margin-top: 12px; }

/* ficha de producto */
.prod-top { display: flex; align-items: center; gap: 20px; }
.prod-banner {
  position: relative; flex: 0 0 42%; max-width: 281px; pointer-events: none;
  background: url(../../images/layout/titulos.png) center / 100% 100% no-repeat;
}
.prod-banner::before { content: ""; display: block; padding-top: 71.174%; } /* 281 x 200 */
.prod-title {
  position: absolute; left: 5.34%; right: 5.34%; top: 36.5%; text-align: right;
  color: #fff; font: 700 13px/1.55em var(--f-ui);
}
.prod-photo { flex: 1 1 auto; min-width: 0; }
.prod-photo img { display: block; margin: 0 auto; width: 477px; max-width: 100%; height: auto; aspect-ratio: 477 / 350; object-fit: contain; mix-blend-mode: multiply; }
.prod-mid { display: flex; align-items: flex-start; gap: 20px; margin-top: 20px; }
.prod-icon { flex: 0 0 180px; }
.prod-icon img { display: block; mix-blend-mode: multiply; }
.prod-desc { flex: 1 1 auto; min-width: 0; margin-top: 20px; }
.prod-mid .prod-desc { margin-top: 0; }
.prod-desc p + p { margin-top: 10px; }
.prod-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.prod-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.pdf-link {
  display: block; width: 100%; max-width: 300px; height: 62px; margin-top: 10px; padding: 1px;
  background: #7D8E9A; border-radius: 5px 0 0 5px; outline: 0;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
}
.pdf-inner {
  display: flex; align-items: center; gap: 16px; height: 100%; padding: 0 24px 0 18px;
  background: #fff; border-radius: 4px 0 0 4px; color: #4D5F6C;
  font: 17px/1 var(--f-text); white-space: nowrap; transition: background .15s ease;
  clip-path: polygon(0 0, calc(100% - 19.5px) 0, calc(100% - .2px) 50%, calc(100% - 19.5px) 100%, 0 100%);
}
.pdf-inner img { flex: none; width: 46px; height: 46px; }
.pdf-link:hover .pdf-inner { background: #F3F5F6; }
.pdf-link:focus-visible { outline: 0; }
.pdf-link:focus-visible .pdf-inner { background: #DCEBF4; }

/* inicio */
.home-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 28px auto 0;
}
.home-gallery img {
  display: block; width: 100%; height: auto;
  border: 5px solid #E6E6E6;
}
.tagline { padding-top: 30px; color: var(--blue); font: italic 400 16px/1.4em var(--f-ui); text-align: center; }

/* contacto */
.contact {
  flex: 1 1 100%; min-width: 0;
  display: flex; align-items: flex-start; justify-content: flex-start; gap: clamp(24px, 4vw, 64px);
  min-height: 548px; padding: 0 clamp(28px, 4vw, 72px) 30px clamp(28px, 6vw, 100px);
  background: url(../../images/layout/watermark.png) right bottom no-repeat;
}
.contact-form { flex: 0 1 560px; max-width: 560px; padding-right: 30px; border-right: 1px solid #0089CA; }
.field { max-width: 480px; margin: 6px auto; padding: 0 8px 8px; }
.field label {
  display: block; padding: 4px; color: #0782B5; font: 11px/1.9em var(--f-text); text-transform: uppercase;
}
.field label span { color: orange; }
.field input, .field textarea {
  display: block; width: 100%; padding: 8px; border: 1px solid #BFCBCF; border-radius: 0;
  background: #FAFCFD; color: #444; font: 14px/1.3 var(--f-text);
}
.field input { height: 36px; }
.field textarea { height: 140px; min-height: 100px; max-height: 300px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: #0089CA; background: #fff; }
.submit-row { width: 200px; margin: 10px auto 0; }
.enviar {
  display: block; width: 200px; height: 40px; cursor: pointer;
  border: 2px solid var(--cat); border-radius: 5px; color: #fff;
  font: 15px var(--f-text); text-align: center; box-shadow: 0 0 4px #003B4D;
  background: linear-gradient(to bottom, #386783, #003A5D);
}
.enviar:hover { background: linear-gradient(to bottom, #547993, #003A5D); }
.enviar:active { border-color: #066897; background: linear-gradient(to bottom, #0089CA, #00699B); }
.contact-aside { flex: 1 1 280px; min-width: 0; max-width: 780px; padding-top: 10px; }
.contact-aside iframe { display: block; width: 100%; height: 420px; border: 1px solid #BEDEE6; }
.gracias {
  margin-top: 80px; color: #0782B5; text-align: center;
  font: 700 15px "Trebuchet MS", trebuchet, Arial, Helvetica, sans-serif;
}
.gracias span { color: #0089CA; font-size: 12px; font-weight: 400; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy); border-top: 2px solid var(--navy-2); padding-bottom: 30px; }
.site-footer::before {
  content: ""; display: block; height: 30px; margin: 0 var(--gut);
  background: url(../../images/layout/shadow.png) center top no-repeat; background-size: 100% 100%;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  min-height: 108px; margin: 0; padding: 0 calc(var(--edge) + 72px) 0 var(--edge);
}
.footer-text { color: #fff; font: 13px/1.3em var(--f-text); letter-spacing: 1px; text-align: left; }
.footer-text a { color: #7A96AA; }
.footer-text a:hover { color: #AEBECB; }
.footer-logo { flex: 0 0 auto; box-sizing: content-box; width: 130px; height: auto; padding-left: 40px; border-left: 1px solid rgba(255, 255, 255, .9); }

/* ---------- Transición suave entre páginas (View Transitions, mejora progresiva) ----------
   Chrome/Edge 126+ y Safari 18.2+: fundido corto entre páginas. En el resto de navegadores
   se ignora y la navegación es la normal. Para desactivarla, borrar este bloque. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.main-nav { view-transition-name: site-nav; }
::view-transition-group(site-nav) { animation-duration: 0s; }   /* el menú no "viaja": queda fijo arriba */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; animation-timing-function: ease; }

/* ---------- Botón "subir" ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 48px; height: 48px;
  background: url(../../images/layout/up.png) center no-repeat; opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; }

/* ==========================================================================
   Escritorio ancho (>= 1200px): contenido en vertical, centrado y con ancho cómodo
   ========================================================================== */
.content { max-width: 980px; margin: 0 auto; }
.is-home .content { max-width: 820px; }
@media (min-width: 1200px) {
  .card-main p { font-size: 14px; line-height: 1.5em; }
  .is-home p { font-size: 15px; }
  .home-gallery { gap: 16px; }
  .prod-top { justify-content: flex-start; align-items: center; gap: 32px; }
  .prod-banner { flex: 0 0 320px; max-width: 320px; }
  .prod-photo { flex: 0 1 477px; }
  .prod-mid { gap: 32px; }
  .prod-desc { max-width: 78ch; }
  .prod-cols { gap: 48px; }
  .prod-cols .prod-desc { max-width: none; }
  .prod-items { gap: 20px; margin-top: 24px; }
  .pdf-link { margin-top: 24px; }
}

/* ==========================================================================
   Tablet / ventana angosta (<= 900px)
   ========================================================================== */
@media (max-width: 900px) {
  :root { --gut: 0px; }
  .logo img { width: 280px; }
  .header-address { font-size: 13px; }
  .header-mail { display: none; }

  .card-body { flex-direction: column; min-height: 0; }
  .subnav { flex: none; width: 100%; padding: 20px 20px; }
  .card-main { padding: 0 30px 30px; background-size: 300px; }
  .prod-top + .prod-desc { min-height: 120px; }
  .page-title { margin-left: 30px; }
  .cat-nav ul { justify-content: center; }

  /* categorías plegables (solo si hay JS; sin JS se ve la lista completa) */
  .js .subnav { position: relative; z-index: 2; padding: 0; margin-bottom: 20px; }
  .js .subnav-toggle {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 14px 20px; border: 0; border-bottom: 1px solid #D5DDE3; background: #EBEFF2; cursor: pointer;
    color: var(--blue); font: 700 13px var(--f-ui); text-transform: uppercase; text-align: left;
  }
  .js .subnav-toggle::after {
    content: ""; width: 9px; height: 9px; margin-left: 12px; flex: 0 0 auto;
    border: solid var(--blue); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .2s ease;
  }
  .js .subnav.is-open .subnav-toggle::after { transform: rotate(-135deg) translate(-2px, -2px); }
  .js .subnav-list { display: none; padding: 16px 20px 20px; }
  .js .subnav.is-open .subnav-list { display: block; }
  .subnav a { padding-top: 6px; padding-bottom: 6px; }

  .contact { padding: 0 30px 30px; gap: 24px; min-height: 0; }
}

/* ==========================================================================
   Celular (<= 640px)
   ========================================================================== */
@media (max-width: 640px) {
  .header-inner { flex-direction: column; justify-content: center; gap: 12px; min-height: 0; padding: 20px 16px; }
  .logo img { width: 240px; }
  .header-address { text-align: center; font-size: 14px; line-height: 1.5em; }
  .header-address .sep { font-size: 0; }
  .header-address .sep::before { content: "\2022"; margin: 0 .6em; font-size: 14px; }

  .main-nav ul { justify-content: stretch; height: 50px; padding: 0; }
  .main-nav li::after, .main-nav li:first-child::before { height: 50px; }
  .main-nav li { flex: 1 1 0; justify-content: center; }
  .main-nav li::after, .main-nav li:first-child::before { display: none; }
  .main-nav li + li { border-left: 1px solid rgba(255, 255, 255, .18); }
  .main-nav a { width: 100%; margin: 0; padding: 12px 4px; font-size: 12px; }

  .page { padding: 10px 8px 6px; }
  .card { border-width: 4px; }
  .card-head { padding-top: 16px; }
  .page-title { margin-left: 16px; font-size: 22px; }
  .card-body { margin-top: 20px; }
  .card-main { padding: 0 16px 24px; background-size: 92% auto; }
  .card-main p { font-size: 15px; line-height: 1.5em; }
  .home-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 24px; }
  .home-gallery img:first-child { display: none; }
  .tagline { font-size: 15px; }

  .cat-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 0; background: rgba(0, 0, 0, .18); }
  .cat-nav li { background: var(--cat); }
  .cat-nav li + li::before { display: none; }
  .cat-nav li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cat-nav a { width: 100%; margin: 0; padding: 12px 8px; font-size: 13px; }
  .cat-nav a[aria-current] { background: rgba(255, 255, 255, .16); }

  .prod-top { flex-direction: column; align-items: center; gap: 0; }
  .prod-banner { flex: none; width: 100%; max-width: 320px; margin: -60px 0 -30px; }
  .prod-items { grid-template-columns: 1fr; gap: 12px; }
  .prod-title { font-size: 14px; }
  .prod-photo { margin-top: 12px; }
  .prod-mid { flex-direction: column; align-items: center; gap: 14px; }
  .prod-icon { flex: none; }
  .prod-top + .prod-desc { min-height: 155px; }
  .prod-cols { grid-template-columns: 1fr; gap: 0; }
  .prod-cols .prod-desc + .prod-desc { margin-top: 14px; }
  .pdf-link { margin: 18px auto 0; }

  .contact { flex-direction: column; align-items: stretch; padding: 0 16px 24px; background-size: 92% auto; }
  .contact-form { flex: none; max-width: none; padding-right: 0; border-right: 0; }
  .field { max-width: none; padding: 0 0 8px; }
  .field input, .field textarea { font-size: 16px; } /* evita el zoom automático en iOS */
  .contact-aside { flex: none; width: 100%; max-width: none; }
  .contact-aside iframe { height: 300px; }
  .gracias { margin-top: 30px; }

  .site-footer { padding-bottom: 66px; } /* la última línea queda sobre el botón "subir" */
  .footer-inner { flex-direction: column-reverse; gap: 16px; padding: 20px 16px 0; text-align: center; }
  .footer-text { text-align: center; letter-spacing: .5px; }
  .footer-text a { display: inline-block; padding: 4px 0; }
  .footer-logo { flex: none; margin-right: 0; padding-left: 0; border-left: 0; }
  .to-top { right: 12px; bottom: 12px; }
}

@media (max-width: 380px) {
  .main-nav a { font-size: 11px; }
  .logo img { width: 200px; }
  .pdf-inner { gap: 12px; padding-left: 14px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav { transition: none; }
  .slider .slide, .slider-btn, .to-top { transition: none; }
}

/* flecha del ítem actual en el submenú */
.subnav a[aria-current]::after { content: " \2192"; }
