/* --- Variables --- */
:root {
  --bg: #f5f3f0;
  --muted: #8b8680;
  --text: #5a5751;
  --brand: #a8b899;
  --brand-2: #adc397;
  --card: rgba(234, 230, 216, 0.7);
  --card-2: rgba(227, 223, 216, 0.85);
  --stroke: #d6d2cb;
  --shadow: 0 4px 12px rgba(139, 134, 128, .15);
  --radius: 12px;
  --maxw: 1100px;
  --maxw-xl: 1400px;
  /* Extra large container width */

  /* New heading colors */
  --heading-light: #C8D7CA;
  --heading-dark: #4C4C4C;
  --heading-color: var(--heading-dark);
  /* Default to dark */
}

[data-theme="light"] {
  --bg: #f5f3f0;
  --text: #5a5751;
  --muted: #8b8680;
  --card: rgba(235, 232, 227, 0.85);
  --card-2: rgba(227, 223, 216, 0.85);
  --stroke: #d6d2cb;
  --shadow: 0 4px 12px rgba(139, 134, 128, .15);

  /* Light theme uses dark headings */
  --heading-color: var(--heading-dark);
}

[data-theme="dark"] {
  /* Dark theme uses light headings */
  --heading-color: var(--heading-light);
}

/* --- Base --- */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: "brandon-grotesque", "Inter", "Questa", "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background-color: #f8f8f8;
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: center top;
  background-attachment: scroll;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  line-height: clamp(1.5rem, 1.2vw, 1.8rem);
  overflow-x: hidden;
}

a {
  text-decoration: underline;
  color: black;
}

a:hover {
  text-decoration: underline;
}

/* Specific styling for links in content areas only */
p a,
li a,
.card a {
  text-decoration: underline;
  color: black;
}

p a:hover,
li a:hover,
.card a:hover {
  text-decoration: underline !important;
}

.nav li a {
  color: white;
  text-decoration: none !important;
}

.nav li a:hover {
  color: white !important;
}

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

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

/* --- Header & Nav --- */
header {
  width: 100%;
  position: relative;
  z-index: 10;
}

/* Align menu to right */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 150px;
  font-weight: 300;
  letter-spacing: 0.1rem;
  font-size: clamp(0.9rem, 1vw, 1.2rem);
  font-family: "brandon-grotesque", sans-serif;
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
  width: 100%;
  padding: 0 clamp(35px, 8vw, 200px) 0 clamp(20px, 5vw, 100px);
  box-sizing: border-box;
  position: absolute;
  z-index: 20;
  color: white;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.45) 50%, rgba(0, 0, 0, 0.0) 100%);
}

.logo {
  width: 150px;
  height: auto;
  position: relative;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.4vw;
  padding: 0;
  margin: 0;
}

/* Hamburger Menu Styles */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  padding: 8px;
  z-index: 20;
  position: relative;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: #fff;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Menu */
.mobile-nav {
  position: absolute;
  top: 100%;
  right: 0;
  width: auto;
  min-width: fit-content;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 15;
  display: none;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  padding: 5px 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-nav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav li:last-child {
  border-bottom: none;
}

.mobile-nav a {
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 10px 20px;
  text-align: right;
}

.mobile-nav a:hover {
  color: var(--brand-2) !important;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none !important;
}

/* --- Buttons --- */
.btn,
button.btn {
  appearance: none;
  border: 1px solid var(--stroke);
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  color: var(--text);
  font-size: 0.8rem;
  font-family: "poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(180deg, color-mix(in oklab, #694706 70%, #000 10%), #855b0ca1);
  backdrop-filter: blur(1px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  font-family: "brandon-grotesque", sans-serif;
  color: #fff;
  padding-top: 28px;
}

/* Simplified unified button text styling */
.btn-text {
  font-family: "brandon-grotesque", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1;
}

.btn.primary .btn-icon {
  height: 64px;
  width: auto;
  filter: invert(1);
  transition: transform 0.2s ease;
}

/* --- Hero --- */
.hero {
  margin-top: 0;
  padding-top: 0;
  position: relative;
  z-index: 1;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  width: 100vw;
  overflow: hidden;
  border-bottom: 1px solid var(--stroke);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-bottom: 3rem;
}

/* --- Campaign toggle helpers --- */
/*
  Usage:
  - Add `hero-campanha--hidden` to the element to hide its contents but keep its layout space.
  - Add `hero-campanha--removed` to fully remove it from layout (use with caution).
*/
.hero-campanha--hidden {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hero-campanha--removed {
  display: none !important;
}

/* When campaign is removed, make the hero text occupy and center in the freed space */
.hero-campanha--removed+.hero-text {
  width: min(88%, 900px) !important;
  margin: 0 auto !important;
  padding-top: clamp(32px, 6vh, 96px) !important;
  padding-bottom: clamp(24px, 4vh, 72px) !important;
  text-align: center !important;
}

@media (max-width: 768px) {
  .hero-campanha--removed+.hero-text {
    width: 100% !important;
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }

  .container-especie-alvo {
    width: 100%;
    padding: 0;
  }

  .container-especie-alvo .container {
    max-width: none !important;
    width: 100% !important;
    padding: 0 20px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    gap: 20px !important;
  }

  .container-especie-alvo .especie-title,
  .container-especie-alvo .card-left,
  .container-especie-alvo .card-right,
  .container-especie-alvo .image-overlay {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (orientation: landscape) {
  .hero-campanha--removed+.hero-text {
    width: 100% !important;
    padding-top: clamp(48px, 8vh, 120px) !important;
    padding-bottom: clamp(36px, 6vh, 96px) !important;
    display: flex !important;
    flex-direction: row !important;
    gap: clamp(1rem, 3vw, 3rem) !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .hero-content-inner.campaign-removed {
    display: grid !important;
    grid-template-columns: 1fr !important;
    flex-direction: unset !important;
  }
}

.kicker {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-family: "brandon-grotesque", sans-serif;
  font-style: normal;
  font-size: 0.8rem;
}

/* --- Simplified Heading System --- */
p,
h1,
h2,
h3,
h4,
h5 {
  font-family: "brandon-grotesque", sans-serif;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: clamp(2.8rem, 4.1vw, 3.9rem);
}

h2 {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: clamp(2.5rem, 3.9vw, 3.2rem);
}

h3 {
  font-size: clamp(1.4rem, 2.1vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: clamp(1.6rem, 2.5vw, 2rem);
}

.alkaline-text-h3 {
  font-family: "Alkaline", "Playfair Display", Georgia, serif;
  text-transform: none;
  font-size: clamp(2.2rem, 2.5vw, 4rem);
  color: #879E65;
  font-style: normal;
}

h4 {
  font-size: clamp(1.2rem, 1.6vw, 1.3rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 1rem 0 1rem 0;
  line-height: clamp(1.3rem, 2.2vw, 1.8rem);
}

.alkaline-text-h4 {
  font-family: "Alkaline", "Playfair Display", Georgia, serif;
  text-transform: none;
  font-size: clamp(2rem, 1.8vw, 3.8rem);
  font-style: normal;
}

h5 {
  margin-top: clamp(20px, 3vw, 50px);
  margin-bottom: clamp(20px, 3vw, 50px);
  margin-right: auto;
  margin-left: auto;
  text-align: right;
  font-size: clamp(1.5rem, 3vw, 5rem);
  line-height: clamp(1.7rem, 3.2vw, 5.4rem);
  letter-spacing: 0.01em;
  font-weight: 400;
}

p {
  font-size: clamp(1.1rem, 1vw, 1.2rem);
}


p li ul {
  font-size: clamp(1rem, 1vw, 1.3rem);
  font-weight: 400;
  line-height: clamp(1.5rem, 1.2vw, 1.8rem);
}

.alkaline-text-p {
  font-family: "Alkaline", "Playfair Display", Georgia, serif;
  font-weight: 400;
  line-height: clamp(1.5rem, 1.2vw, 1.8rem);
  font-size: clamp(1.2rem, 1.1vw, 1.2rem);
  letter-spacing: 0.02rem;
  font-style: normal;
}

.reference {
  font-size: clamp(0.85rem, 0.85vw, 1.1rem);
  font-weight: 400;
  line-height: clamp(1.2rem, 1.1vw, 1.5rem);
}

.alkaline-text-h5 {
  font-family: "Alkaline", "Playfair Display", Georgia, serif;
  margin-top: clamp(20px, 3vw, 50px);
  margin-bottom: clamp(20px, 3vw, 50px);
  margin-right: auto;
  margin-left: auto;
  text-align: right;
  font-size: clamp(2.7rem, 3.3vw, 9rem);
  line-height: clamp(2.9rem, 3.5vw, 10rem);
  letter-spacing: 0.01em;
  font-weight: 400;
  font-style: normal;
}

/* Sections */
section {
  padding: 0 0 80px 0;
}

#atividades {
  margin-top: 40px
}

/* --- Project Summary --- */
.project-header {
  text-align: center;
  margin-bottom: 40px;
}

.project-logo {
  width: 120px;
  height: auto;
  margin: 0 auto 30px;
  opacity: 0.9;
}

.project-summary {
  margin-bottom: 50px;
}

.summary-intro {
  font-size: clamp(1.2rem, 1.2vw, 1.5rem);
  line-height: clamp(1.7rem, 1.3vw, 1.9rem);
  color: var(--text);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  font-weight: 400;
}

.summary-intro em {
  font-family: 'Alkaline', "Playfair Display", Georgia, serif;
  font-style: normal;
  font-size: clamp(1.3rem, 1.3vw, 1.7rem);
}

/* --- Action Cards (Dissemination Plan Style) --- */
.action-cards-layout {
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  align-items: stretch;
}

.card.action {
  border-radius: 16px;
  padding: 1vh 2vw;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--card);
}

.card h3 {
  font-size: clamp(1.1rem, 2.1vw, 1.5rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.container-especie-alvo {
  padding: 0px;
  margin-bottom: 40px;
  position: relative;
}

.container-especie-alvo .container {
  display: grid;
  grid-template-columns: 1fr 300px 1fr;
  grid-template-rows: auto auto;
  gap: 0;
  position: relative;
  z-index: 1;
}

.container-especie-alvo .especie-title {
  grid-column: 1 / -1;
  margin-bottom: 40px;
}

.container-especie-alvo .card-left {
  grid-column: 1;
  grid-row: 2;
  margin-right: 40px;
  z-index: 2;
  position: relative;
  background: none;
  box-shadow: none;
  border: none;
  max-width: 350px;
  justify-self: end;
  padding-left: 0px;
}

.container-especie-alvo .card-right {
  grid-column: 3;
  grid-row: 2;
  margin-left: 40px;
  z-index: 2;
  position: relative;
  background: none;
  box-shadow: none;
  border: none;
  max-width: 350px;
  justify-self: start;
  padding-right: 0px;
}

.container-especie-alvo .image-overlay {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 1;
  pointer-events: none;
}

.container-especie-alvo .image-overlay img {
  max-width: 800px;
  width: 100%;
  border-radius: 0;
  box-shadow: none;
  pointer-events: auto;
}

/* --- Objective Cards --- */
#sobre {
  padding: 0px 0 80px 0;
}

.grid {
  display: grid;
  gap: 24px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

/* --- Interactive Distribution Maps --- */
.distribution-section {
  margin-top: 60px;
}

.distribution-section .card {
  background: var(--card);
  padding: 0px;
  border-radius: var(--radius);
  height: fit-content;
}

.section-title {
  text-align: center;
  color: var(--text);
  margin-top: 1vh;
  margin-bottom: 3vh;
  text-transform: uppercase;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.02em;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: clamp(1.3rem, 2.2vw, 1.6rem);
}

/* Map Controls in left card */
.map-controls {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.map-control-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.3s ease;
  color: #999;
  /* muted/grey by default */
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  pointer-events: auto;
  /* Ensure pointer events work */
  user-select: none;
  /* Prevent text selection */
  position: relative;
  z-index: 10;
  /* Ensure it's on top */
}

.map-control-title:hover {
  color: var(--text);
}

.map-control-title.active {
  color: var(--text);
  /* black when active */
  border-bottom-color: var(--accent);
}

/* Map Controls in left card */

.map-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}

.map-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-image {
  position: absolute;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.map-image.active {
  opacity: 1;
}

.card.legend-card {
  background: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0px;
  padding-left: 23px;
}

.legend-items {
  background: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-color.gain {
  background-color: #6cb649;
}

.legend-color.stable-suitable {
  background-color: #4472c4;
}

.legend-color.loss {
  background-color: #e74c3c;
}

.legend-color.stable-unsuitable {
  background-color: transparent;
  border: 2px solid #666;
}

/* --- Hero Carousel --- */

.hero-carousel-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-carousel-bg img {
  width: 100vw;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  object-position: center;
  transition: opacity 1.2s ease-in-out;
  border: none;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
}

/* Instagram styling */
.instagram-footer-link {
  display: inline-block;
  transition: opacity 0.3s ease;
}

.instagram-footer-link:hover {
  opacity: 0.7;
}

.instagram-icon-footer {
  width: 20px;
  height: 20px;
}

.nav-instagram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.nav-instagram-link:hover {
  opacity: 0.8;
}

.nav-instagram-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

/* Responsive adjustments for very wide screens */
@media (min-aspect-ratio: 21/9) {
  .hero-carousel-bg img {
    width: auto;
    height: 100%;
    min-height: 520px;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
  }
}

.hero-carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) -4%, rgba(0, 0, 0, 0.5) 37%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  padding-top: 160px;
  padding-bottom: 40px;
  color: #fff;
  text-shadow: 0 2px 16px rgb(0, 0, 0);
  height: 100vh;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.hero-content-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  width: 100%;
  max-width: 100%;
  /* ensure it never exceeds the container width */
  margin: 0 auto;
  padding-left: 0;
  /* remove inner horizontal padding to avoid double padding with .container */
  padding-right: 0;
  box-sizing: border-box;
}

/* --- Campanha --- */
.hero-campanha {
  display: flex;
  flex-direction: column;
  gap: clamp(25px, 4vw, 50px);
  padding-top: clamp(15px, 3vw, 37px);
  border-radius: 12px;
  padding: 20px;

}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 32px);
  background: rgba(0, 0, 0, 0.35);
  padding: 2vh 3vw 2vh 3vw;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

/* Campaign Info Section */
.hero-campaign-info {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  flex-direction: column;
  border-bottom: 2px solid #bc8a3b;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.67);
  padding-bottom: clamp(8px, 1.5vw, 16px);
}

.campaign-dates {
  flex-shrink: 0;
}

.campaign-dates h2 {
  font-size: clamp(1.8rem, 2.5vw, 3.1rem);
  color: #bc8a3b;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 1);
  font-weight: 800;
  line-height: 1;
  margin: 0;
  letter-spacing: 0.02em;
}

/* Actions Section */
.hero-actions {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 14px);
  flex-direction: row;
}

.primary-action {
  flex-shrink: 0;
}

.secondary-action {
  flex-shrink: 0;
}

.btn.secondary {
  background: linear-gradient(180deg, color-mix(in oklab, #4a5003 70%, #000 10%), #5f6b08a1);
  backdrop-filter: blur(1px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  font-family: "brandon-grotesque", sans-serif;
  transition: all 0.2s ease;
  padding-top: 28px;
}

.btn.secondary .btn-icon {
  height: 64px;
  width: auto;
  filter: invert(1);
  transition: transform 0.2s ease;
  max-width: none;
}

.btn.primary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.btn.secondary:hover .btn-icon {
  transform: scale(1.1);
}

.hero-title-highlight {
  display: block;
  color: var(--brand-2);
  margin-top: 8px;
  margin-bottom: 0;
  letter-spacing: 0;
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: clamp(3rem, 6.1vw, 6rem);
  font-weight: 600;
  text-shadow: 0 2px 1px rgb(0, 0, 0);
}

.hero-btn {
  font-size: 1.25rem;
  padding: 18px 38px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.hero-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.252);
}

.hero-btn:hover .btn-icon {
  transform: scale(1.1);
}

.hero-muted {
  margin-top: 10px;
  font-size: 1rem;
  color: var(--brand-2);
  font-weight: 500;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}

/* --- Muted --- */
.muted {
  color: var(--muted);
  font-weight: 400;
}

/* --- Actions --- */
.action {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.action svg {
  width: 24px;
  height: 24px;
}

/* --- Activity Steps --- */
.steps {
  counter-reset: s;
  display: grid;
  gap: 12px;
}

/* --- Protocols --- */
.protocol-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 1vh 4vw;
  align-items: start;
  margin: 2vh 4vw;
}

.protocol-header-title {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.protocol-header-title h4 {
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: "brandon-grotesque", sans-serif;
  color: var(--text);
  margin: 0 0 12px 0;
}

.protocol-header-title h2 {
  font-size: clamp(2.4rem, 3vw, 3.1rem);
  color: #bc8a3b;
  font-weight: 800;
  line-height: 0.9;
  margin: 0;
  letter-spacing: 0.02em;
}

.protocol-icons {
  display: flex;
  flex-direction: row;
  gap: 39px;
  justify-content: center;
  margin-right: 30px;
}

.protocol-icon {
  display: flex;
  width: auto;
  height: 80px;
  align-items: center;
  justify-content: center;
}

.protocol-icon img {
  width: 64px;
  height: auto;
  filter: none;
}

.protocol-cardin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.protocol-cardin ul {
  text-align: left;
}

.protocol-cardin ul li {
  margin-bottom: 8px;
  font-size: clamp(1.1rem, 1vw, 1.2rem);

}

/* --- Footer --- */
footer {
  border-top: 1px dotted #000;
  background-color: #fff;
  margin-top: 1vh;
  padding-top: 4vh;
}

/* --- Partners Section --- */
.cibio-logos {
  display: flex;
  flex-direction: row;
  gap: 7vw;
  justify-content: center;
}

.other-logos {
  display: flex;
  flex-direction: row;
  gap: 7vw;
  justify-content: center;
  margin-top: 20px;
}

.others-container {
  display: flex;
  flex-direction: row;
  gap: 7vw;
  justify-content: center;
  margin-top: 20px;
}

.finance-card {
  margin-bottom: 15px;
  background: none;
  border-radius: 0%;
  border-top: 1px dotted rgba(0, 0, 0, 0.3);
  padding: 0 24px;
}

.partners-card {
  margin-bottom: 15px;
  background: none;
  border-radius: 0%;
  border-top: 1px dotted rgba(0, 0, 0, 0.3);
  padding: 0 24px;
}

.partners-title {
  font-family: "brandon-grotesque", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.partners-logos {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  grid-template-rows: auto auto;
  gap: 15px 20px;
  align-items: center;
  justify-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.partner-logo {
  max-width: 100%;
  max-height: 60px;
  height: auto;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
  filter: grayscale(0.3);
  display: block;
}


/* --- Utilities --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 999px;
  background: rgb(0, 0, 0);
  color: rgb(255, 255, 255);
  font-weight: 500;
  font-size: .8rem;
  font-family: "poppins", sans-serif;
  font-style: normal;
}

/* --- Field Guide Section --- */
.measurement {
  background: var(--card);
  padding: 12px;
  border-radius: 8px;
  margin: 8px 0;
}

/* Field guide section heading color */
#chave h3,
#chave h4 {
  color: #1B4020 !important;
}

#chave ul li {
  margin-bottom: 8px;
  line-height: clamp(1.3rem, 1.2vw, 1.6rem);
}

/* --- Responsive --- */
@media (max-width: 960px) {

  body {
    font-size: 17px;
  }

  .alkaline-text-h5 {
    font-size: clamp(2.3rem, 3vw, 3rem);
    line-height: clamp(2.7rem, 2vw, 3rem);
  }

  .hero-carousel-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.34) 25%, transparent 50%);
  }

  .carousel-btn {
    display: none;
  }

  .container {
    padding: 1vh 7vw;
  }

  #sobre {
    padding: 0px 0px 0px 0px !important;
  }

  section {
    padding: 0px 0px 0px 0px !important;
  }

  .container-especie-alvo .container {
    padding: 0;
  }

  /* Distribution section responsive adjustments */
  .distribution-section .grid[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  .distribution-section .grid[style*="grid-template-columns: 1fr 1fr"]>div:first-child {
    order: 2;
    /* Map container goes second */
  }

  .distribution-section .grid[style*="grid-template-columns: 1fr 1fr"]>div:last-child {
    order: 1;
    /* Text content goes first */
  }

  .hero-grid,
  .key {
    grid-template-columns: 1fr;
  }

  nav ul {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    gap: 10px;
  }

  .action-cards-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
  }

  .hero {
    min-height: 100vh;
    width: auto;
    height: 100vh;
  }

  .hero-content {
    padding-top: 3vh;
    padding-bottom: 40px;
    height: 100vh;
    display: flex;
    align-items: center;
  }

  .hero-content-inner {
    max-width: 100%;
    gap: clamp(10px, 5vh, 30px);
    grid-template-columns: 1fr;
    margin-top: 4vh;
    padding-bottom: 0;
    width: 100%;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    display: flex !important;
  }

  .hero-campanha {
    order: 1;
    width: 72vw !important;
    gap: 1.5rem;
    padding: 0 15vw 0 15vw;
  }

  .hero-text {
    order: 2;
    width: 100% !important;
    padding: 24px;
  }

  h5 {
    text-align: center !important;
  }

  .hero-actions {
    flex-direction: row;
    justify-content: center !important;
    gap: 16px;
    text-align: center;
  }

  .hero-campaign-info {
    justify-content: center !important;
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .campaign-dates h2 {
    font-size: 1.6rem;
  }

  .campaign-description p {
    font-size: 1rem;
  }

  .hero-btn {
    font-size: 1rem;
    padding: 12px 18px;
  }

  /* Characteristics grid stacking */
  #chave .grid[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .hero-title-highlight {
    text-align: center !important;
    font-size: clamp(2.3rem, 6vh, 4rem);
    line-height: clamp(2.1rem, 6.1vh, 3.8rem);
    margin-top: 0;
  }

  .btn.primary,
  .btn.secondary {
    width: 100px;
    height: 100px;
    padding-top: 20px;
  }

  .btn.primary .btn-icon,
  .btn.secondary .btn-icon {
    height: 35px;
  }

  .container-especie-alvo .card-left {
    margin-right: 10px;
  }

  .container-especie-alvo .card-right {
    margin-left: 10px;
    padding-left: 0px;
  }

  .protocol-icons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    margin-right: 0;
  }

  .protocol-icon img {
    height: auto;
    filter: none;
  }

  .partner-logo {
    max-height: 50px;
  }

  /* Tree and shrub images - prevent cutting off */
  #chave .grid[style*="grid-template-columns: 1fr 1fr"] div[style*="display: flex"] {
    height: auto !important;
  }

  #chave .grid[style*="grid-template-columns: 1fr 1fr"] div[style*="display: flex"] img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    max-height: none !important;
  }

  /* Both image containers now behave the same way */
  #chave .grid[style*="grid-template-columns: 1fr 1fr"] div[style*="height: 280px"] {
    height: auto !important;
    min-height: 200px !important;
  }

  #chave .grid[style*="grid-template-columns: 1fr 1fr"] div[style*="height: 280px"] img {
    max-height: 250px !important;
    width: auto !important;
    height: auto !important;
  }

  .distribution-section {
    margin-top: 0px;
    margin-bottom: clamp(5px, 4vh, 60px);
  }

  #equipa .section-title {
    padding-top: 20px;
  }

  #gallery-grid-pt,
  #gallery-grid-en {
    padding: 1vh 7vw;
  }
}

/* Landscape orientation adjustments for tablets and smaller laptops */
@media (max-width: 960px) and (orientation: landscape) {


  .alkaline-text-h5 {
    line-height: clamp(2rem, 2vw, 2rem);
  }

  .nav {
    height: 100px;
  }

  .logo {
    width: 110px;
  }

  .hero {
    min-height: 100vh;
    height: 100vh;
  }

  .hero h4 {
    margin: 1vh 0 1vh 0;
  }

  .hero-carousel-overlay {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.34) 25%, transparent 50%);
  }

  .hero-content {
    padding-top: 80px;
    padding-bottom: 30px;
    height: 100vh;
    display: flex;
    align-items: center;
    padding-right: 20vw;
    padding-left: 12vw;
  }

  .hero-content-inner {
    display: grid !important;
    grid-template-columns: 1fr 1.5fr !important;
    align-items: start !important;
    max-width: 100%;
    width: 100%;
    margin-top: 0;
    padding: 0 0 20px 0;
    /* keep only bottom padding if needed */
    /* removed extra horizontal padding */
  }

  .hero-campanha {
    order: initial;
    width: auto !important;
    gap: 4vh;
    padding: 25vh 10vw 0 0;
  }

  .hero-text {
    order: initial;
    width: auto !important;
    margin: 0;
    gap: 0;
    padding: 1vh 2vw 1vh 2vw;
  }

  h5 {
    text-align: left !important;
    margin-bottom: 10px;
  }

  .hero-title-highlight {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: clamp(2.2rem, 6vw, 3.8rem);
    text-align: left !important;
  }

  .hero-actions {
    flex-direction: row;
    justify-content: center !important;
    gap: 16px;
  }

  .hero-campaign-info {
    justify-content: flex-start !important;
    flex-direction: column;
    gap: 16px;
    text-align: left;
  }

  .section-title {
    margin-bottom: 7vh;
  }
}

/* Companion species image responsive adjustments */
@media (max-width: 768px) {

  .logo {
    width: 125px;
    height: auto;
  }

  .hero-carousel-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.34) 25%, transparent 50%);
  }

  .hero-campanha {
    padding: 0 5vw 0 5vw;
  }

  #chave .grid[style*="grid-template-columns: 1fr"]:last-child>div {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    position: relative !important;
    scroll-behavior: smooth !important;
    padding: 0px !important;
  }

  #chave .grid[style*="grid-template-columns: 1fr"]:last-child>div img:not([src*="scroll-icon.png"]) {
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: 90vh !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    min-width: 800px !important;
    display: block !important;
    position: relative !important;
    left: 0 !important;
    transform: none !important;
  }


  /* Scroll icon styling - using div instead of img */
  #scroll-icon {
    animation: pulse 2s infinite;
    user-select: none;
  }

  @keyframes pulse {
    0% {
      opacity: 0.8;
    }

    50% {
      opacity: 0.4;
    }

    100% {
      opacity: 0.8;
    }
  }

  #chave .grid[style*="grid-template-columns: 1fr"]:last-child>div h3 {
    margin-top: 15px !important;
    white-space: normal !important;
    flex-shrink: 0 !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    background: white !important;
    padding: 10px 0 !important;
    z-index: 25 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    order: -1 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .container-especie-alvo .container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 20px;
    padding: 0 27px;
  }

  .container-especie-alvo .especie-title {
    grid-column: 1;
    grid-row: 1;
  }

  .container-especie-alvo .image-overlay {
    grid-column: 1;
    grid-row: 2;
    padding-top: 0;
    align-items: center;
  }

  .container-especie-alvo .card-left {
    grid-column: 1;
    grid-row: 3;
    margin-right: 0;
    max-width: none;
    justify-self: stretch;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .container-especie-alvo .card-right {
    grid-column: 1;
    grid-row: 4;
    margin-left: 0;
    max-width: none;
    justify-self: stretch;
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 0;
  }

  .project-summary {
    margin-bottom: 18px;
  }

  .protocol-header {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .container-especie-alvo .image-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
  }

  .container-especie-alvo .image-overlay img {
    min-width: 500px;
    width: 100vw;
    max-width: 100vw;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
  }

  .distribution-section .card {
    padding: 0 24px;
  }

}

@media (max-width: 768px) and (orientation: landscape) {

  .hero-carousel-overlay {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.34) 25%, transparent 50%);
  }

  .campaign-dates h4 {
    margin: 2rem 0 0.4rem 0;
  }

  .hero-text {
    margin-top: 2vh;
    padding: 0px 16px 1px 12px;
    gap: 0px;
  }

  .hero-content-inner {
    gap: 0.5vw;
    margin-top: 5vh;
    padding-right: 0;
    /* avoid adding horizontal padding */
  }

  .hero-campanha {
    gap: 15px;
    padding-top: 17vh;
  }

}


@media (max-width: 480px) {


  .alkaline-text-h5 {
    line-height: clamp(2rem, 2vw, 2rem);
    font-size: clamp(2.1rem, 2vw, 2.5rem);
  }


  .campaign-dates h4 {
    margin: 10vh 0 1vh 0;
  }

  .nav {
    height: 120px;
  }

  .protocol-header {
    margin: 2vh 1vw 1vh 1vw;
    gap: 15px;
  }

  .hero-text {
    padding: 10px 0px 10px 0px;
    gap: 0;
  }

  .hero-campanha {
    gap: 0.5rem;
  }

  .hero-content {
    padding-top: 10vh;
  }

  .hero-content-inner {
    margin-top: 9vh;
    gap: 5vh;
    padding-bottom: 10vh;
    padding-left: 0;
    /* ensure no inner horizontal padding */
    padding-right: 0;
  }

  .hero-title-highlight {
    line-height: clamp(2.3rem, 8vw, 4.5rem);
    font-size: clamp(2.3rem, 7vw, 4rem);
  }

  #atividades {
    margin-top: 0px;
  }

  /* Protocol steps grid for very small screens */
  #atividades .card>div[style*="grid-template-columns: 1fr auto 1fr"] {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto !important;
    gap: 15px !important;
    margin: 10px 0 20px 0 !important;
    padding: 0 !important;
  }

  #atividades .card>div[style*="grid-template-columns: 1fr auto 1fr"]>div:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  #atividades .card>div[style*="grid-template-columns: 1fr auto 1fr"]>div:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  #atividades .card>div[style*="grid-template-columns: 1fr auto 1fr"]>div:last-child {
    grid-column: 1 / -1;
    grid-row: 3;
    text-align: center;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Buttons section moves to second row and centers */
  #atividades .card>div[style*="grid-template-columns: 1fr auto 1fr"]+div[style*="display: flex"] {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-content: center !important;
    gap: 10px !important;
    display: flex !important;
    align-items: center !important;
  }

  .card.legend-card {
    left: auto !important;
    top: 73px;
  }

  .legend-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    right: 0;

  }

  .map-image {
    margin-top: 65px;
  }

  .map-container {
    margin-top: -20px;
  }

  .map-wrapper {
    margin-top: -65px;
    padding-right: 35px;
  }

  .container-especie-alvo {
    margin-bottom: 0px;
  }

  #sobre .container {
    padding: 0 7vw;
  }

  #distribuicao .container {
    padding: 0 7vw 5vh 7vw;
  }

  .action-cards-layout {
    grid-template-columns: 1fr;
  }

  .card.action {
    padding: 1vh 3vw;
  }

  .cibio-logos {
    flex-direction: column;
  }

  .partners-logos {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 360px) {

  .alkaline-text-h5 {
    line-height: clamp(1.2rem, 2vw, 1.5rem);
  }

  .btn.primary,
  .btn.secondary {
    width: 84px;
    height: 84px;
  }

  .btn-text {
    font-size: 0.8rem;
  }

  .kicker {
    font-weight: 600;
    font-size: 0.7rem;
  }

  h5 {
    text-align: center !important;
    margin-bottom: 10px;
  }

  .hero-text {
    padding: 0.5vh 0px 0px 0px;
    gap: clamp(10px, 2.5vh, 12px);
  }

  .hero-title-highlight {
    margin-top: -20px;
    line-height: clamp(2.4rem, 9vw, 4.5rem);
    font-size: clamp(2.4rem, 8vw, 4rem);
  }

  .hero-campanha {
    margin-top: 0;
  }

  .campaign-dates {
    min-width: 70vw;
  }

  .hero-content-inner {
    gap: clamp(8px, 2vh, 10px);
    padding-bottom: 1vh;
  }

  .protocol-card {
    grid-template-columns: repeat(auto-fit, minmax(227px, 1fr));
  }

  .protocol-header {
    margin: 10px 10px 20px 10px;
    gap: 10px;
  }

  .btn.hero-btn {
    font-size: 0.8rem;
  }

  .map-image {
    margin-top: 10px;
  }

}

/* --- Ultra-wide screen adjustments --- */
@media (min-width: 1800px) {

  .hero {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    /* Ensure full viewport width coverage */
  }

  .hero-carousel-bg {
    width: 100vw;
    left: 0;
    right: 0;
  }

  .hero-carousel-bg img {
    width: 100vw;
    min-width: 100vw;
  }

  .container {
    max-width: var(--maxw-xl);
    padding: 0 40px;
  }

  .hero-content-inner {
    max-width: 100%;
    /* keep within the container's constraints */
    gap: clamp(80px, 8vw, 120px);
    padding: 0;
    /* avoid double padding with .container */
  }

  .action-cards-layout {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
  }


  .campaign-dates h2 {
    font-size: clamp(3.1rem, 4vw, 4rem);
  }

  .hero-campanha {
    gap: clamp(50px, 6vw, 80px);
  }

  .hero-text {
    gap: clamp(32px, 4vw, 50px);
    padding: 0vh 3vw 0vh 3vw;
    margin-top: 10vh;
  }

  .btn.primary,
  .btn.secondary {
    width: 160px;
    height: 160px;
  }

  .btn.primary .btn-icon,
  .btn.secondary .btn-icon {
    height: 80px;
  }

  .btn-text {
    font-size: 1.2rem;
  }

  .nav {
    height: 180px;
    padding: 0 clamp(35px, 8vw, 200px) 0 clamp(20px, 5vw, 100px);
    font-size: 1rem;
  }

  .logo {
    width: 180px;
  }

  nav ul {
    gap: 30px;
  }

  .distribution-section .grid[style*="grid-template-columns: 1fr 1fr"] {
    gap: 60px;
  }

  .map-wrapper {
    height: 600px;
  }

  .container-especie-alvo .container {
    grid-template-columns: 1fr 400px 1fr;
    gap: 20px;
  }

  .container-especie-alvo .card-left,
  .container-especie-alvo .card-right {
    max-width: 450px;
  }

  .container-especie-alvo .image-overlay img {
    max-width: 1000px;
  }

  .grid.cards-3 {
    gap: 40px;
  }

  .card {
    padding: 30px;
  }

  .protocol-cardin {
    grid-template-columns: repeat(3, 1fr);
  }

  footer {
    padding: 40px 0 80px;
  }

  .partners-logos {
    gap: 25px 30px;
  }

  .partner-logo {
    max-height: 80px;
  }

  .summary-intro {
    font-size: clamp(1.4rem, 1.2vw, 1.7rem);
    line-height: clamp(1.9rem, 2vw, 2.3rem);
    padding: 30px 0;
  }
}

@media (min-width: 2200px) {
  :root {
    --maxw: 1600px;
    --maxw-xl: 1800px;
  }

  .hero {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
  }

  .hero-carousel-bg {
    width: 100vw;
  }

  .hero-carousel-bg img {
    width: 100vw;
    min-width: 100vw;
  }

  .hero-content-inner {
    max-width: 100%;
    /* inherit container's constraints */
    padding: 0;
    /* avoid inner padding */
  }

  .action-cards-layout {
    max-width: 1400px;
    gap: 40px;
  }

  .hero-title-highlight {
    font-size: clamp(8rem, 8vw, 10rem);
    line-height: clamp(8rem, 8vw, 10rem);
  }

  .container-especie-alvo .container {
    grid-template-columns: 1fr 500px 1fr;
  }

  .container-especie-alvo .image-overlay img {
    max-width: 1200px;
  }

  .btn.primary,
  .btn.secondary {
    width: 180px;
    height: 180px;
  }

  .btn.primary .btn-icon,
  .btn.secondary .btn-icon {
    height: 90px;
  }

  .nav {
    height: 200px;
  }

  .logo {
    width: 200px;
  }
}

/* Remove all the button and nav color overrides since they're now white by default */
/* Button text colors override */
/* .btn a, .btn.primary, .btn.secondary, .hero-btn { ... } - REMOVE THIS ENTIRE SECTION */
/* Force white text in all button content */
/* .btn, .btn *, .btn.primary, .btn.primary *, ... - REMOVE THIS ENTIRE SECTION */
/* Force white text in all navigation content */
/* nav, nav *, .mobile-nav, .mobile-nav * { ... } - REMOVE THIS ENTIRE SECTION */
/* Override any inherited text color for specific button elements */
/* .primary-action *, .secondary-action * { ... } - REMOVE THIS ENTIRE SECTION */

/* --- EQUIPA Section Styles --- */

#equipa .card h3 {
  margin-bottom: 2px !important;
  color: #000;
  letter-spacing: 0;
  font-size: clamp(1rem, 1.9vw, 1.3rem);
}

#equipa .card {
  background-color: #e8eee7 !important;
  padding: 25px 25px 10px 25px;
  margin-bottom: 0px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#equipa .card h3 a {
  color: var(--text) !important;
}

#equipa .card h3 a:hover {
  color: var(--text) !important;
}

#equipa .card .muted a {
  color: #386824 !important;
  font-size: 0.9em !important;
  font-weight: 500 !important;
  word-break: break-word;
}

#equipa .card .muted a:hover {
  color: #666 !important;
  text-decoration: underline !important;
}

#equipa .card p {
  color: var(--text) !important;
  margin-bottom: 6px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#equipa strong {
  color: #000000 !important;
  font-weight: 500;
  margin-bottom: 6px;
}

#equipa .section-title {
  color: #386824;
  padding-bottom: 20px;
  border-bottom: 1px dotted black;
}

/* Responsive adjustments for team section */
@media (max-width: 768px) {
  #equipa .grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  #equipa .card {
    max-width: 100% !important;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  #equipa .card {
    padding: 20px 15px 10px 15px;
    margin: 0 -5px 15px -5px;
  }

  #equipa .card .muted {
    font-size: 0.85em !important;
    line-height: 1.4;
  }
}

/* Fixed scroll icon (global) */
#scroll-icon {
  position: relative;
  width: 60px;
  height: auto;
  max-width: 60px !important;
  min-width: 0 !important;
  z-index: 999;
  opacity: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  display: none;
  /* JS toggles this between block/none */
  pointer-events: none;
  left: 39%;
  bottom: clamp(8px, 4vh, 4px);
}

/* Fallback styling when Alkaline doesn't load */
.alkaline-fallback .alkaline-text-h3,
.alkaline-fallback .alkaline-text-h4,
.alkaline-fallback .alkaline-text-h5,
.alkaline-fallback .alkaline-text-p,
.alkaline-fallback .summary-intro em {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

/* --- Language Switcher --- */
#language-switcher {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

#language-switcher button {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 50%;
  font-family: "brandon-grotesque", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
  outline: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
}

#language-switcher button.active,
#language-switcher button:focus {
  background: rgba(0, 0, 0, 0.8) !important;
  color: #fff !important;
  border-color: #fff !important;
  font-weight: 600;
}

#language-switcher button:hover {
  background: var(--brand) !important;
  color: #fff !important;
  border-color: var(--brand) !important;
}

@media (max-width: 960px) {
  #language-switcher {
    gap: 4px;
  }

  #language-switcher button {
    font-size: 0.8rem;
    padding: 5px;
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 480px) {
  #language-switcher {
    gap: 2px;
  }

  #language-switcher button {
    font-size: 0.75rem;
    padding: 4px;
    width: 28px;
    height: 28px;
  }
}

/* Gallery grid styles */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 2rem;
  box-sizing: border-box;
  margin-bottom: 5vh;
}


.gallery-thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  transition: box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.gallery-thumb:hover,
.gallery-thumb:focus {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  outline: 2px solid #0077cc;
}

/* Modal styles */
.gallery-modal-overlay {
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-modal-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.gallery-modal-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 2.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 10001;
}

.gallery-modal-arrow {
  position: absolute;
  bottom: 20px;
  /* Position at the bottom of the modal */
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.gallery-modal-prev {
  left: 20px;
  /* Align to the left */
}

.gallery-modal-next {
  right: 20px;
  /* Align to the right */
}

.gallery-modal-arrow:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #000;
}

/* Protocol toggle */
.toggle-protocol {
  background: var(--brand);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  margin: 15px auto 0;
  display: block;
  transition: background 0.2s ease;
}

.toggle-protocol:hover {
  background: var(--brand-2);
}

.protocol-cardin {
  display: none;
}

/* Media gallery */
.media-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

.gif-container,
.photo-gallery {
  aspect-ratio: 12 / 8;
}

.gif-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}

.photo-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.photo-gallery {
  position: relative;
}

.gallery-image {
  display: none;
}

.gallery-image.active {
  display: block;
}

.gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active {
  background: var(--brand);
}

@media (max-width: 768px) {
  .dot {
    width: 6px;
    height: 6px;
  }
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

@media (orientation: landscape) and (min-width: 769px) {
  .media-gallery {
    grid-template-columns: 1fr 1fr;
    margin-right: 4rem;
    margin-bottom: 1rem;
  }
}