:root {
  --color-primary: #007b8b;
  --color-primary-dark: #006a78;
  --color-bg-main: #0f6f78;
  --color-bg-light: #f4f6f7;
  --color-white: #ffffff;
  --color-text-dark: #1f1f1f;
  --color-text-medium: #4a4a4a;
  --color-border: #e6e6e6;

  --font-family-base: "Karla", sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;

  --container-max: 1200px;
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  color: var(--color-text-dark);
  background: var(--color-bg-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* HERO */

.hero {
  position: relative;
  min-height: 480px;
  padding: 160px 0 40px 0;
  display: flex;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-dark)
  );
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 650px;
  height: 650px;
  background: url("../assets/icons/hero-logo-group.svg") no-repeat center /
    contain;
  opacity: 0.08;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero__inner {
  max-width: 1200px;
}

.hero__title {
  font-weight: 400;
  font-size: 72px;
  line-height: 74px;
  color: var(--color-white);
  margin-bottom: 32px;
}

.hero__text {
  font-weight: 400;
  font-size: 24px;
  line-height: 32px;
  color: var(--color-white);
  opacity: 0.95;
  max-width: 1000px;
}

/* NAV */

.areas-nav {
  background: var(--color-bg-light);
  padding: var(--space-6) 0;
}

.areas-nav__tabs {
  display: flex;
  gap: 70px;
  flex-wrap: wrap;
}

.areas-nav__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: #5a5a5a;
  padding-bottom: 12px;
  border-bottom: 3px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.areas-nav__item img {
  width: 42px;
  height: 42px;
}

.areas-nav__item:hover {
  color: var(--color-primary);
}

.areas-nav__item.is-active {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* PAGE */

.page-content {
  padding: var(--space-10) 0;
  background: url("../assets/images/sfondo-ottanio.png") no-repeat center top /
    cover;
}

.profession-section {
  margin-bottom: var(--space-10);
}

body .page-content .profession-section .profession-section__header {
  position: static !important;
  margin-bottom: var(--space-6);
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
}

.profession-section__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-white);
}

/* GRID */

.profession-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 64px;
  row-gap: 80px;
  align-items: stretch;
}

/* CARD */

.profession-card {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  height: 100%;
}

.profession-card__media {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.profession-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profession-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 16px;
}

.profession-card__title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 48px;
}

.profession-card__content {
  min-height: 90px;
}

.profession-card__content strong {
  font-size: 14px;
}

.profession-card__content p {
  font-size: 14px;
  color: var(--color-text-medium);
  margin-top: 6px;
  line-height: 1.5;
}

.profession-card__cta {
  margin-top: auto;
  align-self: flex-start;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.profession-card__cta:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* OVERLAY */

.profession-card__extra {
  position: absolute;
  inset: 0;
  background: var(--color-white);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  overflow-y: auto;
  z-index: 2;
}

.profession-card.is-open .profession-card__extra {
  transform: translateY(0);
}

.profession-card.is-open .profession-card__content,
.profession-card.is-open .profession-card__cta {
  opacity: 0;
  pointer-events: none;
}

.profession-card__close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--color-primary);
  cursor: pointer;
}

/* RESPONSIVE */

@media (max-width: 1200px) {
  .profession-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__title {
    font-size: 56px;
    line-height: 60px;
  }

  .hero__text {
    font-size: 20px;
    line-height: 28px;
  }
}

@media (max-width: 768px) {
  .profession-grid {
    grid-template-columns: 1fr;
  }

  .areas-nav__tabs {
    gap: 40px;
  }

  .hero {
    min-height: auto;
    padding: 140px 0 60px 0;
  }

  .hero__title {
    font-size: 38px;
    line-height: 44px;
  }

  .hero__text {
    font-size: 18px;
    line-height: 26px;
  }

  .page-content {
    padding: var(--space-8) 0;
  }
}
