/* One visual shell for the home and all independent FR/EN/AR pages.
   The templates live in proceso/codigo-fuente/header.partial and footer.partial. */
:root { --shell-width: 1320px; --shell-gold: #c8ac70; --shell-header-height: 112px; }
html { scrollbar-gutter: stable; scroll-padding-top: 124px; }
body { min-height: 100svh; display: flex; flex-direction: column; overflow-x: clip; }
body > main { flex: 1 0 auto; min-width: 0; }
.wrap, .shell-container { width: min(var(--shell-width), calc(100% - 96px)); margin-inline: auto; }

/* Header: same geometry, type and controls on every page. */
header.site-shell-header {
  position: sticky; top: 0; z-index: 300; display: block; width: 100%; height: auto; flex-shrink: 0;
  padding: 0; margin: 0; background: #080808; color: #f4eee0;
  border: 0; border-bottom: 1px solid #473922; direction: ltr;
  font-family: Arial, Helvetica, sans-serif; line-height: 1.25;
}
header.site-shell-header .shell-utility { height: 31px; border-bottom: 1px solid #292820; }
header.site-shell-header .shell-utility-inner { height: 30px; display: flex; align-items: center; gap: 18px; }
header.site-shell-header .shell-location {
  color: #e6ca86; font-size: 10px; font-weight: 800; letter-spacing: .14em;
  white-space: nowrap;
}
header.site-shell-header .shell-note {
  color: #c0b9aa; font-size: 10px; font-weight: 600; letter-spacing: .03em;
  white-space: nowrap;
}
header.site-shell-header .header-lang-nav { margin-left: auto; flex: 0 0 auto; }
header.site-shell-header .header-lang-nav a {
  min-height: 26px; padding: 4px 3px; background: none; border: 0; border-radius: 0;
  color: #e7d39f; font-size: 10px; font-weight: 800; line-height: 1;
}
header.site-shell-header .header-lang-nav a[aria-current="page"],
header.site-shell-header .header-lang-nav a:hover { color: #eee5a3; text-decoration: underline; text-underline-offset: 3px; transform: none; }
header.site-shell-header .shell-header-main { height: 80px; display: flex; align-items: center; gap: 18px; }
header.site-shell-header .shell-brand { display: flex; align-items: center; flex: 0 0 162px; width: 162px; height: 78px; }
header.site-shell-header .shell-brand img {
  display: block; width: 162px; height: 72px; max-width: none; object-fit: contain;
  mix-blend-mode: normal;
}
header.site-shell-header .shell-nav {
  display: flex; align-items: center; gap: 7px; margin: 0 0 0 auto; padding: 0;
  position: static; width: auto; height: auto; background: none; border: 0; box-shadow: none;
  flex-direction: row;
}
header.site-shell-header .shell-nav > a:not(.shell-mobile-contact) {
  display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 40px;
  padding: 9px 12px; background: #10100e; color: #f4eee0;
  border: 1px solid #76613a; border-radius: 4px; font: 600 11px/1.2 Arial, Helvetica, sans-serif;
  white-space: nowrap; text-decoration: none; transform: none;
}
header.site-shell-header .shell-nav > a:not(.shell-mobile-contact):hover,
header.site-shell-header .shell-nav > a:not(.shell-mobile-contact):focus-visible,
header.site-shell-header .shell-nav > a[aria-current="page"] {
  background: var(--shell-gold); color: #100d08; border-color: var(--shell-gold);
}
header.site-shell-header .shell-nav .shell-mobile-contact { display: none; }
header.site-shell-header .shell-actions { display: flex; align-items: center; margin-left: 1px; flex: 0 0 auto; }
header.site-shell-header .header-contact {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 164px; height: 42px; min-height: 42px; margin: 0; padding: 9px 14px;
  background: var(--shell-gold); color: #100d08; border: 1px solid var(--shell-gold);
  border-radius: 4px; font: 600 11px/1.2 Arial, Helvetica, sans-serif; white-space: nowrap;
}
header.site-shell-header .header-contact:hover { background: #e5ca93; border-color: #e5ca93; transform: none; }
header.site-shell-header .header-contact span { margin: 0; }
header.site-shell-header .menu-button { display: none; }

/* The main content aligns to the same column while photographic bands stay full bleed. */
.section-pad { padding-inline: max(24px, calc((100% - var(--shell-width)) / 2)); }
.hero .hero-content { padding-left: max(24px, calc((100vw - var(--shell-width)) / 2)); }
.hero .hero-bottom { left: max(24px, calc((100% - var(--shell-width)) / 2)); right: max(24px, calc((100% - var(--shell-width)) / 2)); }
.terroir .terroir-content { padding-inline: max(24px, calc((100% - var(--shell-width)) / 2)); }

/* Three remaining award documents form one balanced row on wide screens. */
main .awards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
main .awards-grid .photo-tile { min-width: 0; padding: 20px; }
main .awards-grid .photo-tile img { height: 330px; object-fit: contain; }
main .awards-grid .photo-tile figcaption { min-height: 3em; padding-top: 16px; }

/* Footer: identical grid and baseline across the independent pages. */
footer.site-shell-footer {
  position: relative; display: block; width: 100%; margin: 0; padding: 0;
  background: #101310; color: #f2eee2; border-top: 1px solid #453921;
  font-family: Arial, Helvetica, sans-serif; direction: ltr;
}
footer.site-shell-footer .footer-grid {
  display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 70px;
  padding-block: 66px 52px;
}
footer.site-shell-footer .footer-primary { min-width: 0; }
footer.site-shell-footer .footer-brand { display: block; width: 180px; height: 82px; margin: 0; overflow: visible; }
footer.site-shell-footer .footer-brand img {
  display: block; width: 180px; height: 82px; max-width: 100%; object-fit: contain;
  mix-blend-mode: normal; transform: none;
}
footer.site-shell-footer .footer-primary p {
  max-width: 350px; margin: 16px 0 18px; color: #c9c6bb; font: 400 14px/1.6 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}
footer.site-shell-footer .footer-slogan-image { width: 190px; height: auto; max-width: 100%; object-fit: contain; margin-bottom: 16px; }
footer.site-shell-footer .footer-place { display: block; color: #d8bc7c; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
footer.site-shell-footer .footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
footer.site-shell-footer .footer-column h2 {
  margin: 0 0 9px; color: #d8bc7c; font: 800 11px/1.3 Arial, Helvetica, sans-serif;
  letter-spacing: .15em; text-transform: uppercase;
}
footer.site-shell-footer .footer-column a,
footer.site-shell-footer .privacy-button {
  display: inline; padding: 0; background: none; border: 0; color: #e0ded5;
  font: 400 13px/1.5 Arial, Helvetica, sans-serif; letter-spacing: 0; text-align: left;
  text-decoration: none; overflow-wrap: anywhere;
}
footer.site-shell-footer .footer-column a:hover,
footer.site-shell-footer .privacy-button:hover { color: #e3c888; text-decoration: underline; }
/* Preserve the shared column grid while giving Arabic labels natural reading metrics. */
html[lang="ar"] footer.site-shell-footer .footer-column { align-items: flex-end; }
html[lang="ar"] footer.site-shell-footer .footer-column h2 {
  font: 700 15px/1.6 Tahoma, 'Segoe UI', Arial, sans-serif;
  letter-spacing: 0;
}
html[lang="ar"] footer.site-shell-footer .footer-column a[href$=".html"],
html[lang="ar"] footer.site-shell-footer .privacy-button {
  font: 400 17px/1.6 Tahoma, 'Segoe UI', Arial, sans-serif;
  letter-spacing: 0;
  text-align: right;
}
html[lang="ar"] footer.site-shell-footer .footer-place {
  font: 700 13px/1.6 Tahoma, 'Segoe UI', Arial, sans-serif;
  letter-spacing: 0;
}
footer.site-shell-footer .footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 60px; padding-block: 16px; border-top: 1px solid #3d4237;
  color: #bab5a5; font-size: 10px; letter-spacing: .08em;
}
footer.site-shell-footer .footer-bottom > span:first-child { display: inline; }
footer.site-shell-footer .shell-back-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 250;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid #e5ca93;
  border-radius: 50%;
  background: #c8ac70;
  color: #100d08;
  box-shadow: 0 4px 18px #0006;
  cursor: pointer;
}
footer.site-shell-footer .shell-back-top:hover { background: #e5ca93; color: #100d08; }
footer.site-shell-footer .shell-back-top:focus-visible { outline: 2px solid #f4eee0; outline-offset: 4px; }
footer.site-shell-footer .shell-back-top[hidden],
html.mobile-menu-open .shell-back-top,
body.gallery-open .shell-back-top,
body:has(.home-photo-lightbox:not([hidden])) .shell-back-top { display: none; }
footer.site-shell-footer .locale-strip {
  padding: 19px max(24px, calc((100% - var(--shell-width)) / 2)) 23px;
  background: #111b16;
}

@media (max-width: 1120px) {
  main .awards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  main .awards-grid .photo-tile:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 20px) / 2);
  }
  /* A mobile photo viewer fits the image to the screen rather than promising a zoom. */
  main .product-photo-zoom,
  main .gallery-card-view,
  main .home-gallery-grid a > span,
  main .media-zoom::after { display: none; }
  :root { --shell-header-height: 108px; }
  /* Fixed positioning survives the overflow lock when opening the mobile menu.
     Reserve its height so the content does not move or hide underneath it. */
  body { padding-top: var(--shell-header-height); }
  header.site-shell-header,
  html.mobile-menu-open header.site-shell-header {
    position: fixed; top: 0; left: 0; right: 0; width: auto;
  }
  header.site-shell-header .shell-header-main { height: 76px; }
  header.site-shell-header .shell-brand { flex-basis: 154px; width: 154px; height: 74px; }
  header.site-shell-header .shell-brand img { width: 154px; height: 68px; }
  header.site-shell-header .shell-note { display: none; }
  header.site-shell-header .shell-actions { margin-left: auto; }
  header.site-shell-header .header-contact { display: none; }
  header.site-shell-header .menu-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: auto; min-width: 90px; min-height: 44px; padding: 8px 12px;
    background: none; color: #f4eee0; border: 1px solid #8b7446; border-radius: 24px;
    font: 700 12px/1.2 Arial, Helvetica, sans-serif;
  }
  header.site-shell-header .menu-button:hover { background: #2d2a20; }
  header.site-shell-header .menu-button span { width: auto; height: auto; margin: 0; background: none; }
  header.site-shell-header .shell-menu-lines { display: grid; gap: 5px; width: 18px; }
  header.site-shell-header .shell-menu-lines i { display: block; width: 18px; height: 2px; background: currentColor; transition: transform .2s; }
  header.site-shell-header .menu-button[aria-expanded="true"] .shell-menu-lines i:first-child { transform: translateY(3.5px) rotate(45deg); }
  header.site-shell-header .menu-button[aria-expanded="true"] .shell-menu-lines i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  header.site-shell-header .menu-button[aria-expanded="true"] > span { transform: none !important; }
  header.site-shell-header .shell-nav,
  header.site-shell-header .shell-nav:not(.open) {
    display: none; position: absolute; top: 100%; left: 0; right: 0; width: 100%;
    height: auto; max-height: var(--mobile-menu-height, calc(100dvh - 107px)); margin: 0;
    padding: 12px max(20px, calc((100% - var(--shell-width)) / 2)) max(16px, env(safe-area-inset-bottom));
    background: #0c0c0b; border-top: 1px solid #4f4128; border-bottom: 1px solid #806b41;
    box-shadow: 0 22px 30px #0008; overflow-y: auto; overscroll-behavior: contain;
  }
  header.site-shell-header .shell-nav.open { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  header.site-shell-header .shell-nav > a:not(.shell-mobile-contact) {
    display: flex; justify-content: flex-start; width: 100%; min-height: 46px;
    padding: 10px 15px; font-size: 14px;
  }
  header.site-shell-header .shell-nav .shell-mobile-contact {
    display: flex; align-items: center; justify-content: center; min-height: 46px;
    margin-top: 5px; background: var(--shell-gold); color: #111; border-radius: 4px;
    font: 700 14px/1.2 Arial, Helvetica, sans-serif;
  }
  html[lang="ar"] header.site-shell-header .shell-nav { direction: rtl; }
  html[lang="ar"] header.site-shell-header .shell-nav > a:not(.shell-mobile-contact) {
    justify-content: flex-start; text-align: right;
    font-family: Tahoma, 'Segoe UI', Arial, sans-serif; font-size: 18px; line-height: 1.35;
  }
  html[lang="ar"] header.site-shell-header .shell-nav .shell-mobile-contact {
    font: 700 18px/1.35 Tahoma, 'Segoe UI', Arial, sans-serif;
  }
  html[lang="ar"] header.site-shell-header .menu-button {
    font-family: Tahoma, 'Segoe UI', Arial, sans-serif; font-size: 17px;
  }
  html[lang="ar"] header.site-shell-header .shell-location,
  html[lang="ar"] header.site-shell-header .header-lang-nav a[lang="ar"] {
    font-family: Tahoma, 'Segoe UI', Arial, sans-serif;
  }
  html.mobile-menu-open, body.mobile-menu-open { overflow: hidden; }
}
@media (max-width: 760px) {
  main .uses-grid { grid-template-columns: minmax(0, 1fr); }
  main .uses-grid > article { min-width: 0; min-height: 0; }
  .wrap, .shell-container { width: calc(100% - 42px); }
  .section-pad { padding-inline: 21px; }
  .hero .hero-content { padding-left: 21px; padding-right: 21px; }
  .hero .hero-bottom { left: 21px; right: 21px; }
  .terroir .terroir-content { padding-inline: 21px; }
  footer.site-shell-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; padding-block: 52px 40px; }
  footer.site-shell-footer .footer-primary { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  main .awards-grid { grid-template-columns: minmax(0, 1fr); }
  main .awards-grid .photo-tile,
  main .awards-grid .photo-tile:last-child:nth-child(odd) {
    grid-column: auto;
    width: 100%;
    padding: 14px;
  }
  /* Keep each document's proportions without empty letterboxing on phones. */
  main .awards-grid .photo-tile img { height: auto; max-height: none; }
  main .awards-grid .photo-tile figcaption { min-height: 0; padding-top: 12px; }
  :root { --shell-header-height: 105px; }
  .wrap, .shell-container { width: calc(100% - 34px); }
  header.site-shell-header .shell-utility { height: 28px; }
  header.site-shell-header .shell-utility-inner { height: 27px; }
  header.site-shell-header .shell-location { font-size: 9px; letter-spacing: .09em; }
  header.site-shell-header .shell-header-main { height: 76px; }
  header.site-shell-header .shell-brand { flex-basis: 145px; width: 145px; }
  header.site-shell-header .shell-brand img { width: 145px; height: 66px; }
  header.site-shell-header .header-lang-nav a { font-size: 9px; }
  header.site-shell-header .header-lang-nav a[lang="ar"] { font-size: 10px; }
  header.site-shell-header .shell-nav { padding-inline: 17px; }
  .section-pad { padding-inline: 17px; }
  .hero .hero-content { padding-left: 17px; padding-right: 17px; }
  .hero .hero-bottom { left: 17px; right: 17px; }
  .terroir .terroir-content { padding-inline: 17px; }
  footer.site-shell-footer .footer-grid { gap: 26px; }
  footer.site-shell-footer .footer-column a { font-size: 12px; }
  footer.site-shell-footer .footer-bottom { font-size: 9px; }
  footer.site-shell-footer .locale-strip { padding: 19px 17px 23px; }
}
