/* Cored Theme - Palette integration
   Palette: 
   --color-accent: #cd6632 (copper)
   --color-primary: #025b5a (teal)
   --color-secondary: #9c765f (earth)
   --color-neutral-accent: #c8a594 (sand)
   --color-text: #454545 (dark gray)
*/

:root {
  --color-accent: #cd6632;
  --color-primary: #3F5E4E; /* Variant A: Forest */
  --color-secondary: #9c765f;
  --color-neutral-100: #ffffff;
  --color-neutral-accent: #c8a594;
  --color-neutral-accent-hover: #b89582; /* slightly darker for hover clarity */
  --color-text: #454545;
  --color-on-primary: #ffffff;
  --color-on-secondary: #000000; /* 1A: dark text on #9c765f for AA */
  --color-on-accent: #ffffff;
  --color-on-neutral-accent: #000000; /* Ensure AA for text on sand background */
}

/* Base text color */
html, body { color: var(--color-text); }

/* Links */
a { color: var(--color-primary); }
a:hover, a:focus { color: var(--color-accent); }

/* Navbar buttons inherit brand color on white bar */
.w3-bar .w3-button { color: var(--color-primary); }
.w3-bar .w3-button:hover, .w3-bar .w3-button:focus { 
  background-color: var(--color-neutral-accent-hover); 
  /* Use solid black on hover for AA contrast against #b89582 */
  color: #000000;
}

/* W3 color overrides mapped to brand */
.w3-black { background-color: var(--color-primary) !important; color: var(--color-on-primary) !important; }
.w3-dark-grey { background-color: var(--color-secondary) !important; color: var(--color-on-secondary) !important; }

/* Primary button (uses w3-black) */
.w3-button.w3-black { background-color: var(--color-primary) !important; color: var(--color-on-primary) !important; border-color: transparent; }
.w3-button.w3-black:hover, .w3-button.w3-black:focus { background-color: #014948 !important; color: var(--color-on-primary) !important; }

/* Accent button utility (optional) */
.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-on-accent);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 10px 20px;
  border-radius: 4px;
}
.btn-accent:hover, .btn-accent:focus {
  background-color: #ab4f21;
  color: var(--color-on-accent);
}

/* Soft section background using neutral accent */
.bg-neutral-accent { background-color: var(--color-neutral-accent); color: var(--color-on-neutral-accent); }
/* Ensure links meet contrast in sand sections by using high-contrast black with an underline affordance */
.bg-neutral-accent a { color: #000000; text-decoration: underline; text-underline-offset: 3px; }
.bg-neutral-accent a:hover, .bg-neutral-accent a:focus { color: #000000; text-decoration-color: var(--color-accent); }

/* Icon accent for section headers only */
h3 > .fa, h3 > .fas, h3 > .fab { color: var(--color-accent); }

/* Footer links should stay readable on primary */
footer a { color: var(--color-on-primary); }
footer a:hover, footer a:focus { color: #e6e6e6; }

/* Step 7: Social icon color consistency */
/* Generic: on hover/focus, social icons use the accent color */
.social-link:hover i,
.social-link:focus i { color: var(--color-accent); transition: color 120ms ease-in-out; }

/* Contact section map blend */
.contact-section { position: relative; background-color: var(--color-neutral-accent); }


.map-blend {
  position: relative;
  margin-top: 32px;
  border-radius: 16px;
  overflow: hidden;
}

.map-blend::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(90deg,
      rgba(200, 165, 148, 1) 0px,
      rgba(200, 165, 148, 0.7) 2px,
      rgba(200, 165, 148, 0) 6px,
      rgba(200, 165, 148, 0) calc(100% - 6px),
      rgba(200, 165, 148, 0.7) calc(100% - 2px),
      rgba(200, 165, 148, 1) 100%
    ),
    linear-gradient(180deg,
      rgba(200, 165, 148, 1) 0px,
      rgba(200, 165, 148, 0.7) 2px,
      rgba(200, 165, 148, 0) 6px,
      rgba(200, 165, 148, 0) calc(100% - 6px),
      rgba(200, 165, 148, 0.7) calc(100% - 2px),
      rgba(200, 165, 148, 1) 100%
    );
}

.map-blend iframe {
  display: block;
  position: relative;
  z-index: 0;
}

/* Footer-specific: default icon is on-primary; hover switches to accent */
footer .social-link i { color: var(--color-on-primary); transition: color 120ms ease-in-out; }
footer .social-link:hover i,
footer .social-link:focus i { color: var(--color-accent); }

/* Focus visibility for accessibility */
:where(a, button, [role="button"])::selection { background: var(--color-neutral-accent); }
:where(a, button, [role="button"]).focus-visible,
:where(a, button, [role="button"]):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
  transition: box-shadow 120ms ease-in-out, outline-color 120ms ease-in-out;
}

/* Ensure team portraits remain perfectly square without visual changes */
#team img {
  aspect-ratio: 1 / 1;   /* preserve square ratio of 800x800 */
  height: auto;          /* scale height from width to keep ratio */
  object-fit: cover;     /* avoid distortion within the circular crop */
}

/* Explicitly reserve 16:9 ratio for the promo image to eliminate CLS warnings */
.promo-img {
  aspect-ratio: 16 / 9;
  height: auto;
}
/* GTranslate widget footprint */
.gtranslate_wrapper a {
    color: #ffffff; /* Make language links white */
    text-decoration: none;
}
.gtranslate_wrapper a:hover {
    color: #cccccc; /* Lighter gray on hover */
}
.gt_switcher {
    display: inline-block;
    padding: 5px;
}
.gtranslate_wrapper .gt_switcher {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gtranslate_wrapper .gt_switcher a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gtranslate_wrapper .gt_switcher img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  display: inline-block;
}
.gtranslate_wrapper .gt_switcher .gt_selected,
.gtranslate_wrapper .gt_switcher .gt_option {
  min-height: 24px;
}
.gtranslate_wrapper .gt_options { min-width: 220px; }
