/* ===============================
   GLOBAL
================================= */

body {
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  background:#e6e6e6;
}

/* ===============================
   HEADER
================================= */

.site-header {
  background:#2f5c68;
  color:white;
  padding:20px 40px;
  position:relative;
  z-index:1000; /* KEY FIX */
}

.header-inner {
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.branding {
  flex:1;
}

.title-block h1 {
  margin:0;
  font-size:28px;
}

.title-block span {
  font-size:16px;
  opacity:0.9;
}

.logo img {
  height:70px;
}

/* ===============================
   NAVIGATION
================================= */

#nav-menu {
  display:flex;
  align-items:center;
  gap:25px;
  position:relative;
}

#nav-menu a {
  color:white;
  text-decoration:none;
  font-weight:bold;
  padding:10px;
}

/* ===============================
   DROPDOWN (FIXED VERSION)
================================= */

.dropdown {
  position: relative;
}

.dropdown > a {
  cursor: pointer;
}

/* CRITICAL FIXES HERE */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;

  background: white;
  min-width: 200px;

  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);

  overflow: hidden;
  z-index: 9999; /* prevents overlap bug */
}

/* Dropdown items */
.dropdown-content a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: black;
  white-space: nowrap;
}

.dropdown-content a:hover {
  background: #f2f2f2;
}

/* Desktop hover */
@media (hover: hover) {
  .dropdown:hover .dropdown-content {
    display: block;
  }
}

/* Mobile toggle */
.dropdown.open .dropdown-content {
  display: block;
}

/* ===============================
   BUTTON
================================= */
/* ===============================
   LANGUAGE (FIXED)
================================= */

.lang {
  display: none;
}

html[data-lang="en"] .lang.en {
  display: inline;
}

html[data-lang="fr"] .lang.fr {
  display: inline;
}

/* Ensure block elements behave correctly */
.hero-overlay h2 .lang,
.hero-overlay p .lang {
  display: none;
}

html[data-lang="en"] .hero-overlay h2 .lang.en,
html[data-lang="fr"] .hero-overlay h2 .lang.fr,
html[data-lang="en"] .hero-overlay p .lang.en,
html[data-lang="fr"] .hero-overlay p .lang.fr {
  display: inline;
}

/* ===============================
   HERO (FIXED)
================================= */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-slideshow {
  position: relative; /* KEY FIX */
  height: 800px;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  background: rgba(25,60,70,0.85);
  padding: 50px 70px;

  text-align: center;
  color: white;
  border-radius: 8px;

  width: 90%;
  max-width: 800px;
}

/* Typography */
.hero-overlay h2 {
  margin: 0 0 20px;
  font-size: 34px;
}

.hero-overlay p {
  margin: 0;
}

/* Buttons */
.hero-buttons {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-block;
  background: #d4a23a;
  padding: 14px 28px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
}

/* ===============================
   ABOUT
================================= */

.about-section{
  width:100%;
  display:flex;
  justify-content:center;
  margin:40px 0;
}

.about-box{
  max-width:1000px;
  background:#efefef;
  padding:25px 35px;
  border-radius:12px;
  font-size:1.25rem;
  line-height:1.5;
  text-align:center;
  font-weight:500;
}

/* ===============================
   MAP POPUP
================================= */

.popup-content {
  text-align:center;
}

.popup-content img {
  width:120px;
  border-radius:8px;
  margin-bottom:8px;
}

.popup-name {
  font-weight:700;
  margin-bottom:4px;
}

.popup-address {
  font-size:14px;
  color:#555;
}

/* ===============================
   PAGE LAYOUT
================================= */

.page-wrapper {
  padding:40px;
}

.main-container {
  background:white;
  padding:40px;
  border-radius:14px;
}

.content-layout {
  display:flex;
  gap:40px;
  height:calc(100vh - 220px);
}

.artist-panel {
  width:38%;
  overflow-y:auto;
}

.map-panel {
  width:62%;
}

#map {
  height:100%;
  border-radius:12px;
}

/* ===============================
   ARTIST CARDS
================================= */

.artist-card {
  background:#f2f2f2;
  border-radius:14px;
  padding:20px;
  margin-bottom:20px;
  cursor:pointer;
  transition:0.2s;
}

.artist-card.active {
  outline:3px solid #7d7c7c;
}

.artist-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight:700;
  font-size:18px;
  margin-bottom:12px;
  letter-spacing:0.3px;
}

.artist-row {
  display:flex;
  gap:15px;
}

.artist-image img {
  width:90px;
  height:90px;
  border-radius:10px;
  object-fit:cover;
}

.artist-address {
  font-weight:700;
  font-size:13.5px;
  color:#2f5c68;
  margin-bottom:6px;
}

.artist-bio {
  font-size:14px;
  color:#444;
  line-height:1.4;
  margin-top:4px;
}

/* ===============================
   CUSTOM MAP PIN
================================= */

.custom-pin {
  background:none;
  border:none;
}

.pin-wrapper {
  position:relative;
  width:40px;
  height:40px;
  background:#d62828;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:white;
  font-weight:700;
  font-size:16px;
  box-shadow:0 4px 10px rgba(0,0,0,0.3);
}

.pin-wrapper::after {
  content:"";
  position:absolute;
  bottom:-10px;
  left:50%;
  transform:translateX(-50%);
  border-left:8px solid transparent;
  border-right:8px solid transparent;
  border-top:12px solid #d62828;
}

.pin-number {
  position:relative;
  z-index:2;
}

/* ===============================
   FOOTER
================================= */

footer {
  background:#1d6a63;
  color:white;
  text-align:center;
  padding:20px;
  font-size:14px;
}

/* ===============================
   RESPONSIVE
================================= */

.hamburger {
  display:none;
  font-size:26px;
  cursor:pointer;
}

@media(max-width:1000px){

  .content-layout {
    flex-direction:column;
    height:auto;
  }

  .artist-panel,
  .map-panel {
    width:100%;
  }

  #map {
    height:500px;
    margin-top:20px;
  }

  #nav-menu {
    display:none;
    flex-direction:column;
    background:white;
    position:absolute;
    top:100%;
    right:0;
    width:100%;
    padding:20px;
  }

  #nav-menu.open {
    display:flex;
  }

  /* Fix dropdown inside mobile */
  .dropdown-content {
    position:relative;
    box-shadow:none;
    background:#f9f9f9;
  }

  .dropdown-content a {
    color:black;
  }

  .hamburger {
    display:block;
  }
}

/* ===============================
   FINAL DROPDOWN FIX (OVERRIDE)
================================= */

#nav-menu {
  position: relative;
  z-index: 1000;
}

/* Ensure dropdown sits above nav */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;

  background: #ffffff;
  min-width: 200px;

  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);

  z-index: 99999; /* VERY IMPORTANT */
}

/* FORCE correct colors */
.dropdown-content a {
  color: #000 !important;
  background: #fff;
  display: block;
  padding: 12px 16px;
}

/* Hover */
.dropdown-content a:hover {
  background: #f2f2f2;
}

/* Desktop */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Mobile */
.dropdown.open .dropdown-content {
  display: block;
}

/* Prevent nav items from bleeding into dropdown */
#nav-menu > a {
  position: relative;
  z-index: 1;
}

/* Highlight active tour */
.dropdown-content a.active-tour {
  background:#2f5c68;
  color:white !important;
  font-weight:bold;
}

/* ===============================
   EXTERNAL LINK ICON (REFINED)
================================= */

/* Base external link styling */
a[target="_blank"] {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

/* Icon (SVG mask for perfect color inheritance) */
a[target="_blank"]::after {
  content: "";
  width: 0.75em;
  height: 0.75em;

  display: inline-block;

  background-color: currentColor;

  mask-image: url("images/external-link.svg");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;

  -webkit-mask-image: url("images/external-link.svg");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;

  opacity: 0.7;

  transform: translateY(0);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hover animation */
a[target="_blank"]:hover::after {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* ===============================
   OPTIONAL: EXCLUDE BUTTONS
================================= */

.cta-btn[target="_blank"]::after {
  display: none;
}