/* alpinecity.tirol: small layer on top of Barceloneta (Bootstrap 5). */

@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* :root:root beats Bootstrap's :root without depending on load order */
:root:root {
  --acs-primary: #0f3b63;
  --acs-primary-dark: #0a2944;
  --acs-accent: #e8833a;
  --acs-surface: #f5f7fa;
  --acs-text: #1d2733;
  --acs-radius: 0.75rem;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: var(--acs-text);
  --bs-body-bg: var(--acs-surface);
  --bs-primary: var(--acs-primary);
  --bs-primary-rgb: 15, 59, 99;
  --bs-link-color: var(--acs-primary);
  --bs-link-color-rgb: 15, 59, 99;
  --bs-link-hover-color: var(--acs-accent);
  --bs-link-hover-color-rgb: 232, 131, 58;
}

body {
  background: var(--acs-surface);
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4, .documentFirstHeading {
  color: var(--acs-primary-dark);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* header and navigation (this file loads before Barceloneta: use "body" for specificity) */
#portal-header { padding-block: 1rem; }
#portal-logo img { max-height: 3rem; width: auto; }
body #mainnavigation-wrapper,
body #portal-globalnav-wrapper,
body .plone-navbar {
  background-color: var(--acs-primary) !important;
}
body #portal-globalnav .nav-item,
body #portal-globalnav .nav-link {
  background-color: transparent;
  color: #fff;
}
body #portal-globalnav .nav-link { padding: 0.75rem 0.85rem; }
body #portal-globalnav .nav-item:hover,
body #portal-globalnav .nav-item.current,
body #portal-globalnav .nav-item.inPath,
body #portal-globalnav .nav-item:hover > .nav-link,
body #portal-globalnav .nav-item.current > .nav-link {
  background-color: var(--acs-primary-dark);
  color: #fff;
}

/* buttons, including Plone 5 button classes in migrated content */
.btn-primary {
  --bs-btn-bg: var(--acs-primary);
  --bs-btn-border-color: var(--acs-primary);
  --bs-btn-hover-bg: var(--acs-accent);
  --bs-btn-hover-border-color: var(--acs-accent);
}
.plone-btn {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
}
.plone-btn-primary { background: var(--acs-primary); color: #fff; }
.plone-btn-primary:hover { background: var(--acs-accent); color: #fff; }
.plone-btn-sm { font-size: 0.875rem; }

/* Mosaic grid: Bootstrap columns need a flex row; "body" beats mosaic.min.css */
body .mosaic-grid-row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -0.75rem;
  margin-bottom: 1.5rem;
}
/* cells of a row share the row height; the last tile (usually the text card)
   grows, so all card bottoms in a row line up */
body .mosaic-grid-cell {
  padding-inline: 0.75rem;
  display: flex;
  flex-direction: column;
}
body .mosaic-grid-cell > .mosaic-tile:last-child { flex-grow: 1; }
body .mosaic-grid-cell > .mosaic-tile {
  background: #fff;
  border-radius: var(--acs-radius);
  box-shadow: 0 1px 3px rgba(15, 59, 99, 0.08), 0 8px 24px rgba(15, 59, 99, 0.06);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
body .mosaic-grid-cell > .mosaic-IDublinCore-title-tile,
body .mosaic-grid-cell > .mosaic-IDublinCore-description-tile,
body .mosaic-grid-cell > .mosaic-tile:has(> .mosaic-tile-content > :only-child > img:only-child),
body .mosaic-grid-cell > .mosaic-tile:has(> .mosaic-tile-content > figure:only-child) {
  background: none;
  box-shadow: none;
  padding: 0;
}
body .mosaic-tile img { max-width: 100%; height: auto; border-radius: 0.5rem; }
body .mosaic-tile figure,
body .mosaic-tile-content > p:only-child { margin: 0; }
body .mosaic-tile img { display: block; border-radius: var(--acs-radius); }
/* photos in multi-column rows (year teasers, image rows) share one 4:3 frame;
   full-width images keep their own proportions */
body .mosaic-grid-cell:not(.col-12) > .mosaic-tile:has(> .mosaic-tile-content > :only-child > img:only-child) img,
body .mosaic-grid-cell:not(.col-12) > .mosaic-tile:has(> .mosaic-tile-content > figure:only-child) img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* hero row on the front page */
body .mosaic-grid-row.mosaic-grid-row-dark {
  margin-inline: 0;
  padding: 4.5rem 2rem;
  border-radius: 1rem;
  color: #fff;
  background:
    linear-gradient(rgba(10, 41, 68, 0.62), rgba(10, 41, 68, 0.62)),
    url("header.jpg") center / cover no-repeat;
}
body .mosaic-grid-row-dark .mosaic-tile { background: none; box-shadow: none; }
body .mosaic-grid-row-dark h1,
body .mosaic-grid-row-dark h2,
body .mosaic-grid-row-dark p,
body .mosaic-grid-row-dark a { color: #fff; }

/* footer: Barceloneta's wrapper only holds an empty doormat, blend it in */
body #portal-footer-wrapper {
  background: var(--acs-primary-dark);
  padding: 0;
  margin-top: 3rem;
}
.alpinecity-footer {
  background: var(--acs-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 0 1.5rem;
}
.alpinecity-footer a { color: #fff; }
.alpinecity-footer a:hover { color: var(--acs-accent); }

@media (max-width: 575.98px) {
  body .mosaic-grid-row.mosaic-grid-row-dark { padding: 2.5rem 1rem; }
  body .mosaic-grid-cell > .mosaic-tile { padding: 1rem; }
}
