/* ============================================================
   CRMD Premium v37 — Bold visual enhancement layer
   Loaded last, wins all specificity battles.
   ============================================================ */

/* ──────────────────────────────────────────
   KEYFRAMES
   ────────────────────────────────────────── */

@keyframes gd-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes gd-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ──────────────────────────────────────────
   GLOBAL LINKS & FOCUS
   ────────────────────────────────────────── */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gd-terracotta);
  outline-offset: 3px;
  box-shadow: none;
}

/* ──────────────────────────────────────────
   SUB-PAGE HEROES — bolder, taller
   ────────────────────────────────────────── */

.gd-subpage-hero {
  min-height: clamp(220px, 24vw, 320px) !important;
  display: grid;
  align-items: center;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 !important;
  background:
    linear-gradient(
      115deg,
      rgba(0, 0, 0, 0.95) 0%,
      rgba(0, 0, 0, 0.80) 60%,
      rgba(12, 48, 75, 0.60) 100%
    ),
    url("assets/geodinamic-hero-topographic-site.png") center / cover no-repeat;
}

/* Eyebrow — terracotta pill badge style */
.gd-subpage-hero .gd-eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.28rem 0.8rem;
  background: rgba(188, 83, 93, 0.88);
  color: #fff !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Hero h1 */
.gd-subpage-hero h1 {
  max-width: 700px;
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: clamp(2.1rem, 4.4vw, 3.2rem) !important;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(0, 10, 20, 0.5);
  animation: gd-fade-up 650ms ease both;
}

/* Hero lead paragraph */
.gd-subpage-hero p:not(.gd-eyebrow) {
  max-width: 620px;
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.97rem, 1.28vw, 1.1rem);
  line-height: 1.65;
}

/* ──────────────────────────────────────────
   SECTION BACKGROUNDS — less white, more warmth
   ────────────────────────────────────────── */

.gd-section--paper {
  background: #f7f4ef !important;
}

/* ──────────────────────────────────────────
   MEMBERS PAGE
   ────────────────────────────────────────── */

/* Hero accent */
.gd-members-page .gd-subpage-hero {
  border-bottom: 4px solid var(--gd-terracotta);
}

/* Member group header */
.gd-members-page .gd-member-group-label {
  display: block;
  width: min(100%, 1120px);
  margin: clamp(1.2rem, 2.2vw, 1.8rem) auto 0;
  padding: 0.55rem 0.8rem;
  background: var(--gd-ocean);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Member grid */
.gd-members-page .gd-member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  width: min(100%, 1120px);
  margin: 1.1rem auto clamp(2.2rem, 4vw, 3.2rem);
}

/* Card */
.gd-members-page .gd-person-card {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) !important;
  gap: 1.1rem;
  padding: 1.1rem !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-left: 4px solid var(--gd-ocean) !important;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  align-items: start;
  transition: box-shadow 240ms ease, transform 240ms ease;
}

.gd-members-page .gd-person-card:hover {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
  transform: translateY(-2px);
}

/* Photo */
.gd-members-page .gd-person-card img {
  width: 124px !important;
  height: 155px !important;
  object-fit: cover;
  object-position: top;
  display: block;
  border: 0;
}

/* Name */
.gd-members-page .gd-person-card h3 {
  margin: 0 0 0.2rem !important;
  color: var(--gd-ocean);
  font-size: clamp(1.05rem, 1.3vw, 1.2rem) !important;
  line-height: 1.2;
}

/* Role badge */
.gd-members-page .gd-person-card .gd-role {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.18rem 0.6rem;
  background: rgba(0, 0, 0, 0.07);
  color: var(--gd-ocean);
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Details expand +/- */
.gd-members-page .gd-profile-details summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
}

.gd-members-page .gd-profile-details summary::-webkit-details-marker {
  display: none;
}

.gd-members-page .gd-profile-details summary::before {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 1.5px solid var(--gd-ocean);
  color: var(--gd-ocean);
  content: "+";
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease;
}

.gd-members-page .gd-profile-details[open] summary::before {
  background: var(--gd-ocean);
  color: #fff;
  content: "−";
}

.gd-members-page .gd-profile-details[open] dl {
  margin-top: 0.8rem;
  padding-left: 0.85rem;
  border-left: 2px solid rgba(0, 0, 0, 0.15);
}

@media (max-width: 760px) {
  .gd-members-page .gd-member-grid {
    grid-template-columns: 1fr;
  }
  .gd-members-page .gd-person-card {
    grid-template-columns: 96px minmax(0, 1fr) !important;
  }
  .gd-members-page .gd-person-card img {
    width: 96px !important;
    height: 118px !important;
  }
}

/* ──────────────────────────────────────────
   COURSES PAGE
   ────────────────────────────────────────── */

.gd-courses-page .gd-subpage-hero {
  border-bottom: 4px solid rgba(0, 0, 0, 0.35);
}

.gd-courses-page .gd-project-list {
  width: min(100%, 1060px);
  margin-inline: auto;
}

/* Course entry */
.gd-courses-page .gd-project-item {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  gap: clamp(1.3rem, 3vw, 2.2rem);
  padding-block: clamp(1.5rem, 3vw, 2.4rem) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10) !important;
  background: #fff;
  margin-bottom: 1px;
  transition: background 160ms ease;
}

.gd-courses-page .gd-project-item:hover {
  background: #fdfcfa;
}

/* Book cover */
.gd-courses-page .gd-project-item__img--cover {
  min-height: clamp(260px, 28vw, 340px);
  padding: 0.6rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transition: box-shadow 240ms ease, transform 240ms ease;
}

.gd-courses-page .gd-project-item:hover .gd-project-item__img--cover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}

.gd-courses-page .gd-project-item__img--cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Year/type metadata pill */
.gd-courses-page .gd-project-item .gd-role {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.18rem 0.65rem;
  background: rgba(0, 0, 0, 0.07);
  color: var(--gd-ocean);
  font-size: 0.71rem !important;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: none;
}

.gd-courses-page .gd-project-item__body h2 {
  margin-top: 0 !important;
  font-size: clamp(1.15rem, 1.5vw, 1.38rem) !important;
  color: var(--gd-ocean);
  line-height: 1.2;
}

.gd-courses-page .gd-project-item__body h2 a {
  text-decoration: none;
  color: inherit;
  transition: color 160ms ease;
}

.gd-courses-page .gd-project-item__body h2 a:hover {
  color: var(--gd-terracotta);
}

@media (max-width: 760px) {
  .gd-courses-page .gd-project-item {
    grid-template-columns: 1fr;
  }
  .gd-courses-page .gd-project-item__img--cover {
    width: min(100%, 200px);
    min-height: 0;
    aspect-ratio: 2 / 3;
  }
}

/* ──────────────────────────────────────────
   PUBLICATIONS PAGE
   ────────────────────────────────────────── */

.gd-publications-page-shell .gd-publications-page__section h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.55rem;
  margin-bottom: 1.6rem;
}

.gd-publications-page-shell .gd-publications-page__section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gd-terracotta);
}

/* Book grid — wider images, hover lift */
.gd-publications-page-shell .gd-publication-book-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.5rem) !important;
}

.gd-publications-page-shell .gd-publication-book-grid figure {
  padding: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
  transition: transform 240ms ease, box-shadow 240ms ease;
  margin: 0;
}

.gd-publications-page-shell .gd-publication-book-grid figure:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

/* Paper list — citation counters + alternating rows */
.gd-publications-page-shell .gd-publication-records {
  counter-reset: pub-item;
  max-width: 90ch;
}

.gd-publications-page-shell .gd-publication-records li {
  position: relative;
  padding: 1.1rem 0.5rem 1.1rem 3rem !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  counter-increment: pub-item;
  list-style: none !important;
  transition: background 160ms ease;
}

.gd-publications-page-shell .gd-publication-records li:hover {
  background: rgba(0, 0, 0, 0.018);
}

.gd-publications-page-shell .gd-publication-records li::before {
  content: "[" counter(pub-item) "]";
  position: absolute;
  top: 1.15rem;
  left: 0;
  color: var(--gd-terracotta);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ──────────────────────────────────────────
   CONTACT PAGE — proper form design
   ────────────────────────────────────────── */

.gd-contact-page .gd-section--paper {
  background: #f7f4ef !important;
}

.gd-contact-page .gd-contact-form-card {
  max-width: 700px;
  padding: clamp(1.8rem, 3.5vw, 2.8rem);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-top: 5px solid var(--gd-ocean);
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Labels */
.gd-contact-page .gd-form-row label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--gd-ocean);
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 160ms ease;
}

.gd-contact-page .gd-form-row:focus-within label {
  color: var(--gd-terracotta);
}

/* Inputs */
.gd-contact-page .gd-contact-form input,
.gd-contact-page .gd-contact-form textarea,
.gd-contact-page .gd-contact-form select {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  border-radius: 0;
  background: #fff;
  color: var(--gd-slate);
  font: inherit;
  font-size: 0.95rem;
  appearance: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.gd-contact-page .gd-contact-form input:focus,
.gd-contact-page .gd-contact-form textarea:focus,
.gd-contact-page .gd-contact-form select:focus {
  border-color: var(--gd-terracotta);
  box-shadow: 0 0 0 3px rgba(188, 83, 93, 0.18);
  outline: none;
}

.gd-contact-page .gd-contact-form input::placeholder,
.gd-contact-page .gd-contact-form textarea::placeholder {
  color: rgba(101, 117, 131, 0.5);
}

.gd-contact-page .gd-contact-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.gd-contact-page .gd-form-row {
  margin-bottom: 1.15rem;
}

/* Submit button — filled ocean, flips on hover */
.gd-contact-page .gd-action-button,
.gd-contact-page button[type="submit"],
.gd-contact-page input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 2.2rem;
  border: 2px solid var(--gd-ocean);
  background: var(--gd-ocean);
  color: #fff !important;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.gd-contact-page .gd-action-button:hover,
.gd-contact-page button[type="submit"]:hover,
.gd-contact-page input[type="submit"]:hover {
  background: transparent;
  color: var(--gd-ocean) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

/* ──────────────────────────────────────────
   FOOTER — cleaner, more visual hierarchy
   ────────────────────────────────────────── */

.gd-footer .gd-footer__mark img {
  max-width: 190px;
  height: auto;
}

.gd-footer h4 {
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gd-footer a {
  text-underline-offset: 0.18em;
  transition: color 140ms ease;
}

.gd-footer a:hover {
  text-decoration: underline;
}

.gd-footer__bottom {
  font-size: 0.76rem;
  opacity: 0.58;
}

/* ──────────────────────────────────────────
   GDPR BANNER
   ────────────────────────────────────────── */

.gd-gdpr {
  border-radius: 4px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.24);
}

.gd-gdpr button {
  transition: background 160ms ease, color 160ms ease;
}

/* ──────────────────────────────────────────
   PROJECTS / RESEARCH PAGE
   ────────────────────────────────────────── */

.gd-projects-page .gd-project-list {
  width: min(100%, 1060px);
  margin-inline: auto;
}

.gd-projects-page .gd-project-item {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  gap: clamp(1.3rem, 3vw, 2.2rem);
  padding-block: clamp(1.5rem, 3vw, 2.4rem);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  margin-bottom: 1px;
}

.gd-projects-page .gd-project-item__img {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: box-shadow 240ms ease, transform 240ms ease;
}

.gd-projects-page .gd-project-item:hover .gd-project-item__img {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
}

.gd-projects-page .gd-project-item__img img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.gd-projects-page .gd-project-item__body .gd-role {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.18rem 0.65rem;
  background: rgba(0, 0, 0, 0.07);
  color: var(--gd-ocean);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gd-projects-page .gd-project-item__body h2 {
  margin-top: 0 !important;
  font-size: clamp(1.15rem, 1.5vw, 1.38rem) !important;
  color: var(--gd-ocean);
}

.gd-projects-page .gd-project-item__body h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

.gd-projects-page .gd-project-item__body h2 a:hover {
  color: var(--gd-terracotta);
}

@media (max-width: 760px) {
  .gd-projects-page .gd-project-item {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────
   HOME PAGE — bolder section headings
   ────────────────────────────────────────── */

.gd-home-section h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem) !important;
  color: var(--gd-ocean);
  font-weight: 800;
  margin-bottom: 1rem !important;
  position: relative;
  display: inline-block;
  padding-bottom: 0.55rem;
}

.gd-home-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3.5rem;
  height: 3px;
  background: var(--gd-terracotta);
}

/* ──────────────────────────────────────────
   SROF OVERVIEW — cube card bold styling
   ────────────────────────────────────────── */

.gd-srof-overview .gd-cube-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.gd-srof-overview .gd-cube-grid > div {
  padding: 1.2rem 1.25rem 1.3rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-top: 4px solid var(--gd-ocean);
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.09);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.gd-srof-overview .gd-cube-grid > div:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

@media (max-width: 760px) {
  .gd-srof-overview .gd-cube-grid {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────
   MASTER / DISASTER MANAGEMENT PAGE
   ────────────────────────────────────────── */

.gd-master-page .gd-master-dossier__facts {
  background: var(--gd-ocean) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2) !important;
}

/* ──────────────────────────────────────────
   PRINT
   ────────────────────────────────────────── */

@media print {
  .gd-banner,
  .gd-footer,
  .gd-gdpr,
  .gd-home-slider__controls,
  .gd-menu-toggle,
  .gd-skip-link {
    display: none !important;
  }

  body {
    font-size: 11pt;
    background: #fff;
    color: #000;
  }
}

/* ──────────────────────────────────────────
   REDUCED MOTION
   ────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .gd-subpage-hero h1 {
    animation: none !important;
  }

  * {
    transition-duration: 1ms !important;
  }
}
