/*
  Front page styling.
  Brand color is based on the provided mint-green swatch.
*/

:root {
  --brand-50: #eef6f2;
  --brand-100: #d6eadf;
  --brand-200: #bddfcd;
  --brand-300: #a6d3bc;
  --brand-400: #9ccbae; /* swatch-like */
  --brand-600: #6ea98c;
  --brand-700: #3e7f63;
  --brand-1000: #9DC3AA;
  --bg-image-opacity: 0.07;

  --ink: #0b1220;
  --ink-muted: rgba(11, 18, 32, 0.72);
  --border: rgba(11, 18, 32, 0.12);

  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);

  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.08);
  --shadow-md: 0 12px 30px rgba(11, 18, 32, 0.12);
  --shadow-lg: 0 22px 60px rgba(11, 18, 32, 0.16);

  --radius: 16px;
  --radius-pill: 999px;

  --container: 1100px;
  --gutter: 1rem;

  --h1: clamp(1.8rem, 3vw, 2.35rem);
  --h2: clamp(1.05rem, 1.5vw, 1.2rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  position: relative;
  z-index: 0;

  /*
    Layered background:
    - soft mint glow
    - subtle diagonal texture
    - gentle top-to-bottom fade
  */
  background:
    /* subtle texture */
    repeating-linear-gradient(
      135deg,
      rgba(11, 18, 32, 0.020) 0px,
      rgba(11, 18, 32, 0.020) 1px,
      rgba(11, 18, 32, 0.0) 1px,
      rgba(11, 18, 32, 0.0) 14px
    ),
    /* horizontal brand gradient: green sides, white center */
    linear-gradient(
      90deg,
      var(--brand-400) 0%,
      var(--brand-200) 25%,
      #ffffff 50%,
      var(--brand-200) 75%,
      var(--brand-400) 100%
    );
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;

  background-image: url("assets/logomaleri.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;

  opacity: var(--bg-image-opacity);
  pointer-events: none;
}

/* Modern-ish scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgb(255, 255, 255);
}

*::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

*::-webkit-scrollbar-thumb {
  background: rgb(255, 255, 255);
  border-radius: var(--radius-pill);
  border: 2px solid;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgb(255, 255, 255);
}

.container {
  width: 100%;
  max-width: var(--container);
  padding-inline: var(--gutter);
  margin-inline: auto;
  text-align: center;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgb(255, 255, 255);
  border-bottom: 1px solid rgba(11, 18, 32, 0.08);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(11, 18, 32, 0.06);
}

.header-inner {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.95rem 0;
  position: relative;
}

.brand-title {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
}

.brand-title,
.brand-title:visited,
.brand-title:hover,
.brand-title:focus {
  color: var(--brand-1000);
  text-decoration: none;
}

.brand-title h2 {
  margin: 0;
  white-space: nowrap;
  color: var(--brand-1000);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.top-nav {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.1px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(11, 18, 32, 0.12);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.75);
}

@media (max-width: 560px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0.6rem;
    justify-items: center;
  }

  .brand-title {
    position: static;
    transform: none;
    justify-self: center;
  }

  .brand,
  .top-nav {
    position: static;
    transform: none;
    justify-self: center;
  }
}

.logo {
  display: block;
  height: 52px;
  width: auto;
  filter: drop-shadow(0 10px 22px rgba(11, 18, 32, 0.18));
}

.page {
  padding-top: 112px;
  flex: 1;
}

footer {
  margin-top: 0;
  padding: 1.6rem 1rem;
  background: var(--brand-1000);
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

footer p {
  margin: 0.1rem 0;
  line-height: 1.45;
}

footer h4 {
  margin: 0.3rem 0 0.1rem;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 600;
}

.footer-layout {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  gap: 1rem;
}

.footer-left {
  width: 100%;
  text-align: center;
}

.footer-right {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
}

@media (max-width: 700px) {
  .footer-layout {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }

  .footer-left,
  .footer-right {
    position: static;
    transform: none;
    text-align: center;
  }
}

/* Profiles */
.profiles {
  padding: 2.4rem 0 1.25rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 520px));
  gap: 1.25rem;
  justify-content: center;
}

.profile-card {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: center;
  justify-items: center;

  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.profile-photo {
  display: block;
  width: auto;
  height: auto;
  max-width: 160px;
  max-height: 180px;
  border-radius: 12px;
  filter: drop-shadow(0 14px 26px rgba(11, 18, 32, 0.18));
}

.profile-body {
  display: grid;
  gap: 0.15rem;
  justify-items: center;
}

.profile-name {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.2px;
}

.profile-title {
  margin: 0;
  color: rgba(11, 18, 32, 0.9);
}

/* Optional contact block inside profile cards */
.contact-heading {
  margin: 0.55rem 0 0.15rem;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}

.contact {
  margin: 0;
  line-height: 1.35;
  color: rgba(11, 18, 32, 0.9);
}

/* Services */
.services {
  padding: 1.5rem 0 4rem;
}

.services h1 {
  margin: 0 0 0.85rem;
  font-size: var(--h1);
  letter-spacing: -0.02em;
}

.services > .container > p {
  margin: 0 auto 1.2rem;
  max-width: 85ch;
  color: rgba(11, 18, 32, 0.9);
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 2.25rem;

  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.service-list li {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.55rem 1.05rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(11, 18, 32, 0.10);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-sm);

  font-weight: 600;
}

.service-details {
  margin-top: 0.5rem;
}

.service-details h2 {
  margin: 1.6rem 0 0.6rem;
  font-size: var(--h2);
  letter-spacing: -0.01em;
}

.service-details > p {
  max-width: 900px;
  margin: 0.9rem auto 0;

  color: rgba(11, 18, 32, 0.9);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(11, 18, 32, 0.08);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.advise-hover-list {
  position: relative;
  margin: 1rem 0 0 calc(5vw - 50vw + 50%);
  width: 30vw;
  max-width: none;
  display: grid;
  gap: 0.65rem;
}

.advise-item {
  position: static;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  text-align: left;
}

.advise-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.advise-title {
  display: block;
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(11, 18, 32, 0.12);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  font-size: 0.98rem;
  line-height: 1.35;
  cursor: default;
}

.advise-title:hover {
  background: rgba(255, 255, 255, 0.9);
}

.advise-popover {
  position: absolute;
  top: 0;
  left: 100%;
  width: 60vw;
  max-width: none;
  height: 56vh;
  max-height: 56vh;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: rgba(11, 18, 32, 0.55) rgba(11, 18, 32, 0.12);
  padding: 1rem 1rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid rgba(11, 18, 32, 0.16);
  background: var(--surface-strong);
  box-shadow: var(--shadow-lg);

  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  z-index: 20;
}

.advise-popover::-webkit-scrollbar {
  width: 8px;
}

.advise-popover::-webkit-scrollbar-track {
  background: rgba(11, 18, 32, 0.12);
  border-radius: var(--radius-pill);
  margin-block: 8px;
}

.advise-popover::-webkit-scrollbar-thumb {
  background: rgba(11, 18, 32, 0.55);
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255, 255, 255, 0.55);
  background-clip: padding-box;
}

.advise-popover::-webkit-scrollbar-thumb:hover {
  background: rgba(11, 18, 32, 0.7);
}

.advise-item:hover .advise-popover,
.advise-item:focus-within .advise-popover {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.advise-popover h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.advise-popover p {
  margin: 0.75rem 0 0;
  color: rgba(11, 18, 32, 0.9);
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 720px) {
  .page {
    padding-top: 108px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: auto 1fr;
    padding: 1rem 1rem;
  }

  .profile-photo {
    max-width: 120px;
    max-height: 150px;
  }
}

@media (min-width: 980px) {
  .advise-hover-list {
    padding-right: 0;
  }

  .advise-item {
    margin: 0 auto;
  }
}

@media (max-width: 979px) {
  .advise-hover-list {
    margin-left: calc(5vw - 50vw + 50%);
    width: 90vw;
  }

  .advise-item {
    width: 100%;
    max-width: none;
  }

  .advise-popover {
    position: static;
    width: 100%;
    height: auto;
    max-height: 0;
    margin-top: 0;
    padding: 0 1rem;
    border-width: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: max-height 220ms ease, margin-top 220ms ease, padding 220ms ease;
  }

  .advise-item:hover .advise-popover,
  .advise-item:focus-within .advise-popover {
    max-height: 520px;
    margin-top: 0.5rem;
    padding: 0.9rem 1rem;
    border-width: 1px;
    box-shadow: var(--shadow-sm);
  }
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: inherit;
}
