/**
 * @file theme.css
 * shadcn/ui-compatible theme variables for Mercury.
 *
 * You can customize these values without rebuilding the compiled CSS.
 * Tools like https://tweakcn.com can help generate these values. Copy this
 * file to your web root, so it sits next to index.php, and clear Drupal's
 * cache. Then, any changes you make in this file should be reflected right away.
 */

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.13 0.043 265.132);
  --card: oklch(0.967 0.003 264.542);
  --card-foreground: oklch(0.21 0.032 264.665);
  --primary: oklch(0.547 0.246 262.866);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.9219 0 0);
  --secondary-foreground: oklch(0.28 0.041 260.329);
  --muted: oklch(0.967 0.003 264.542);
  --muted-foreground: oklch(0.13 0.043 265.132);
  --accent: oklch(0.932 0.032 255.585);
  --accent-foreground: var(--foreground);
  --destructive: oklch(0.6368 0.2078 25.3313);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.872 0.009 258.338);
  --input: oklch(0.872 0.009 258.338);
  --font-sans: "Outfit", "Helvetica Neue", Arial, Helvetica, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --font-body: "Inter", Arial, Helvetica, sans-serif;
  --radius: 0.5rem;
  --shadow-x: 0;
  --shadow-y: 1px;
  --shadow-blur: 3px;
  --shadow-spread: 0px;
  --shadow-opacity: 0.1;
  --shadow-color: oklch(0 0 0);
  --shadow-2xs: 0 1px 3px 1px hsl(0 0% 0% / 0.05);
  --shadow-xs: 0 1px 3px 1px hsl(0 0% 0% / 0.05), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow-sm: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
  --shadow: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
  --shadow-md: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 4px 6px -2px hsl(0 0% 0% / 0.1);
  --shadow-lg: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 8px 10px -2px hsl(0 0% 0% / 0.1);
  --shadow-xl: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 12px 14px -3px hsl(0 0% 0% / 0.1);
  --shadow-2xl: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 16px 18px -3px hsl(0 0% 0% / 0.1);
  --tracking-normal: 0em;
  --spacing: 0.25rem;

  /* Set navbar height for hero billboard overlay */
  --navbar-height: calc(var(--spacing) * 15);

  @media (min-width: 768px) {
    --navbar-height: calc(var(--spacing) * 18);
  }
}

.dark {
  --background: oklch(0.13 0.043 265.132);
  --foreground: oklch(1 0 89.876);
  --card: oklch(0.208 0.042 266.359);
  --card-foreground: var(--foreground);
  --primary: oklch(0.547 0.246 262.866);
  --primary-foreground: var(--foreground);
  --secondary: oklch(0.704 0.04 256.993);
  --secondary-foreground: oklch(0.13 0.043 265.132);
  --muted: oklch(0.28 0.041 260.329);
  --muted-foreground: oklch(0.967 0.003 264.542);
  --accent: oklch(0.932 0.032 255.585);
  --accent-foreground: oklch(0.13 0.043 265.132);
  --destructive: oklch(0.6368 0.2078 25.3313);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.373 0.031 259.733);
  --input: oklch(0.373 0.031 259.733);
  --font-sans: "Outfit", "Helvetica Neue", Arial, Helvetica, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --radius: 0.5rem;
  --shadow-x: 0;
  --shadow-y: 1px;
  --shadow-blur: 3px;
  --shadow-spread: 0px;
  --shadow-opacity: 0.1;
  --shadow-color: oklch(0 0 0);
  --shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
  --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
  --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
  --shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);
  --shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);
  --shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 12px 14px -1px hsl(0 0% 0% / 0.1);
}
.block-system-branding-block img {
  max-height: 80px !important;
  width: auto !important;
  max-width: 100px !important;
}
/* Team profile cards */
.team-profiles .views-view-responsive-grid__item {
  min-width: 0;
}

.team-profiles .views-view-responsive-grid__item-inner {
  width: 100%;
  max-width: 340px;
}

.team-profiles .views-view-responsive-grid__item-inner > * {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
/* Keep profile photos inside their cards */
.team-profiles .cq-full {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  aspect-ratio: 4 / 3 !important;
  overflow: hidden !important;
}

.team-profiles .cq-full img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover !important;
}
/* Fix profile image wrapper */
.team-profiles figure {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
/* Team profile typography */
.team-profiles .views-view-responsive-grid__item-inner h2 {
  font-size: 30px !important;
  line-height: 1.15 !important;
}

.team-profiles .views-view-responsive-grid__item-inner h2 ~ div {
  font-size: 17px !important;
  line-height: 1.4 !important;
}
.logo-card img {
  max-width: 200px;
  width: 100%;
  height: auto;
}
.site-logo img {
  width: 200px;
  height: auto;
  max-width: 100%;
}
/* AIH logo inside Logo card */
img[src*="aih-logo"] {
  width: 220px !important;
  max-width: 220px !important;
  height: auto !important;
}

/* Remove the huge padding around the AIH logo */
div:has(> img[src*="aih-logo"]) {
  padding: 20px !important;
}
.team-profiles .views-view-grid {
  align-items: start;
}

.team-profiles .views-view-grid__item {
  max-width: 340px;
}

.team-profiles article,
.team-profiles .node,
.team-profiles .views-row > * {
  background: #efefef;
  border-radius: 18px;
  overflow: hidden;
}

.team-profiles img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.team-profiles .field--name-field-image,
.team-profiles .field--name-user-picture,
.team-profiles .views-field-field-image {
  margin: 0;
}
main img {
  max-width: 100%;
  height: auto;
}
main img {
  max-width: 100%;
  height: auto;
}
.block-system-branding-block img {
  max-width: 90px;
  max-height: 90px;
  width: auto;
  height: auto;
}
.block-system-branding-block {
  width: fit-content;
}

.block-system-branding-block img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}
main figure img,
main picture img {
  max-width: 100%;
  height: auto;
}

main figure {
  max-width: 700px;
}
main figure img,
main picture img {
  max-width: 100%;
  height: auto;
}

main figure {
  max-width: 700px;
}
main figure {
  max-width: 500px;
  margin-inline: auto;
}
img {
  max-width: 100% !important;
  height: auto;
}
/* Stærri mynd á stakri fréttasíðu */
.node--type-news .field--type-image img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center;
  height: auto;
}
/* Fellows carousel - homepage only */
.path-frontpage .fellows-carousel .views-view-responsive-grid {
  display: flex !important;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.path-frontpage .fellows-carousel .views-view-responsive-grid__item {
  flex: 0 0 300px;
  min-width: 300px;
  scroll-snap-align: start;
}

.path-frontpage .fellows-carousel .views-view-responsive-grid::-webkit-scrollbar {
  display: none;
}
}
/* News carousel - homepage only */
.path-frontpage .news-carousel .views-view-responsive-grid {
  display: flex !important;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.path-frontpage .news-carousel .views-view-responsive-grid__item {
  flex: 0 0 300px;
  min-width: 300px;
  scroll-snap-align: start;
}

.path-frontpage .news-carousel .views-view-responsive-grid::-webkit-scrollbar {
  display: none;
}
/* News carousel fix - homepage */
body.path-frontpage .news-carousel .views-view-responsive-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 24px;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.path-frontpage .news-carousel .views-view-responsive-grid__item {
  flex: 0 0 300px !important;
  min-width: 300px !important;
  scroll-snap-align: start;
}

body.path-frontpage .news-carousel .views-view-responsive-grid::-webkit-scrollbar {
  display: none;
}
@media (max-width: 768px) {
  .block-system-branding-block img {
    max-height: 48px;
    max-width: 140px;
    width: auto;
    height: auto;
  }
}
/* Smaller site logo on mobile */
@media (max-width: 768px) {
  .block-system-branding-block img,
  .site-branding__logo img {
    width: 100px !important;
    max-width: 100px !important;
    height: auto !important;
    max-height: 100px !important;
  }
}
/* Mobile logo size */
@media (max-width: 768px) {
  img[src*="aih-logo_2.png"] {
    width: 100px !important;
    height: 100px !important;
    max-width: 100px !important;
    max-height: 100px !important;
    object-fit: contain !important;
  }
}
/* Mobile navbar logo */
@media (max-width: 768px) {
  .navbar .navbar-logo {
    width: 110px !important;
    max-width: 110px !important;
    flex: 0 0 110px !important;
  }

  .navbar .navbar-logo .branding,
  .navbar .navbar-logo .branding > a {
    width: 110px !important;
    max-width: 110px !important;
  }

  .navbar .navbar-logo img[src*="aih-logo_2.png"] {
    width: 110px !important;
    max-width: 110px !important;
    height: auto !important;
    max-height: 110px !important;
    object-fit: contain !important;
  }
}
/* Fix mobile logo click area */
@media (max-width: 768px) {
  .navbar .navbar-logo a.inline-block {
    display: block !important;
    width: 110px !important;
    height: 110px !important;
    max-width: 110px !important;
    max-height: 110px !important;
  }

  .navbar .navbar-logo .branding {
    width: 110px !important;
    height: 110px !important;
    max-width: 110px !important;
    max-height: 110px !important;
  }

  .navbar .navbar-logo img[src*="aih-logo_2.png"] {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
}
/* Move logo up when mobile menu is open */
@media (max-width: 768px) {
  .navbar:has(.navbar--hide-menu) .navbar-logo {
    transform: translateY(-30px) !important;
  }
}
/* Mobile menu: use only the logo inside the open menu */
@media (max-width: 768px) {
  body:has(.navbar--menu-open)
  .branding:not(.navbar--menu-open .branding) {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .navbar--menu-open .branding,
  .navbar--menu-open .branding > a {
    width: 90px !important;
    height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
  }

  .navbar--menu-open img[src*="aih-logo_2.png"] {
    width: 90px !important;
    height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
    object-fit: contain !important;
  }
}



