/* ====== Base / Desktop (unchanged look) ====== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #111;
  color: white;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: none;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #222;
  padding: 0.5em 1em;
  border-bottom: 1px solid #444;
}

nav .site-name a {
  font-size: 1.5em;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

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

nav ul li a {
  color: white;
  text-decoration: none;
}

nav ul li a:hover {
  text-decoration: underline;
}

main {
  max-width: 1000px;
  margin: 2em auto;
  padding: 0 1em;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2em;
}

.catalog-item {
  background-color: #222;
  padding: 1em;
  border-radius: 8px;
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.catalog-item h2 {
  margin-top: 0;
}

.catalog-item p {
  margin: 0.3em 0;
}

.work-details {
  background-color: #1a1a1a;
  padding: 2em;
  border-radius: 10px;
  border: 1px solid #333;
  margin-top: 2em;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.overview-split {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  margin-bottom: 2em;
}

.overview-left,
.overview-right {
  flex: 1 1 300px;
}

.work-section {
  margin-bottom: 2em;
}

.work-section h2 {
  margin-bottom: 0.5em;
  font-size: 1.2em;
  color: #ccc;
}

.work-section a {
  color: white;
  font-weight: bold;
}

.section-divider {
  border-top: 1px solid #333;
  margin: 1.5em 0;
}

.subtitle {
  font-size: 1em;
  font-style: italic;
  color: #aaa;
  margin-top: -0.3em;
  margin-bottom: 2em;
}

audio.audio-player {
  width: 100%;
  max-width: 400px;
}

.return-link {
  margin-top: 2em;
  text-align: center;
}

.return-link a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.return-link a:hover {
  text-decoration: underline;
}

button {
  background-color: transparent;
  color: white;
  font-weight: bold;
  font-size: 1.1em;
  padding: 0.4em 1em;
  border: 2px solid white;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

button:hover {
  background-color: white;
  color: black;
}

a.button-link {
  display: inline-block;
  background-color: transparent;
  color: white;
  font-weight: bold;
  font-size: 1.1em;
  padding: 0.4em 1em;
  border: 2px solid white;
  border-radius: 4px;
  text-decoration: none !important;
  transition: background-color 0.2s, color 0.2s;
}

a.button-link:hover {
  background-color: white;
  color: black;
  text-decoration: none;
}

/* ====== Navigation dropdowns (desktop) ====== */
nav li.dropdown {
  position: relative;
}

/* Keep hover behavior on desktop */
nav li.dropdown:hover .dropdown-menu {
  display: block;
}

nav .dropdown-menu {
  display: none;
  position: absolute;
  background-color: #222;
  border: 1px solid #333;
  list-style: none;
  padding: 0;
  margin: 0;
  top: 100%;
  left: 0;
  z-index: 999;
}

nav .dropdown-menu li a {
  display: block;
  padding: 0.5em 1em;
  color: white;
  text-decoration: none;
}

nav .dropdown-menu li a:hover {
  background-color: #333;
}

/* Cart row + footer */
.cart-row {
  background-color: #111;
  text-align: right;
  padding: 0.5em 2em;
  border-bottom: 1px solid #333;
}

.cart-row a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.cart-row a:hover {
  text-decoration: underline;
}

.site-footer {
  text-align: center;
  color: #aaa;
  font-size: 0.9em;
  padding: 2em 0;
}
.site-footer a {
  color: #aaa;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* Repeated selector consolidated */
.catalog-item {
  margin-bottom: 2em;
  padding-bottom: 1em;
  border-bottom: 1px solid #ddd;
}

/* Profile image floats on desktop */
.profile-float {
  float: right;
  width: 450px;
  height: auto;
  margin: 0 0 1.5em 1.5em;
  border-radius: 4px;
  object-fit: cover;
}

/* Featured performances layout */
.featured-performance {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 3em 0;
  gap: 2em;
}

.featured-performance .half {
  flex: 1 1 48%;
  max-width: 48%;
}

.featured-performance video {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ====== Touch accessibility enhancement (doesn't change desktop look) ====== */
/* Allow tap to open dropdowns without JS. On touch, first tap focuses, showing menu. */
nav li.dropdown:focus-within .dropdown-menu {
  display: block;
}

/* ====== Mobile tweaks ====== */
@media screen and (max-width: 768px) {
  /* Make header wrap neatly */
  nav {
    flex-wrap: wrap;
    gap: 0.5em;
  }

  /* Stack the menu; make links full-width tap targets */
  nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;               /* tighter to avoid tall gaps */
    border-top: 1px solid #333;
  }

  nav ul li {
    border-bottom: 1px solid #333;
  }

  nav ul li a {
    display: block;
    padding: 0.9em 0.8em; /* larger tap area */
  }

  /* Dropdowns become inline sections under their parent item */
  nav .dropdown-menu {
    position: static;
    border: 0;
    border-top: 1px solid #333;
    margin-top: 0;
    z-index: 1;
  }

  /* Keep tap-open behavior on mobile (hover is unreliable) */
  nav li.dropdown:hover .dropdown-menu,
  nav li.dropdown:focus-within .dropdown-menu {
    display: block;
  }

  /* Prevent huge floated image from crowding text */
  .profile-float {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 1em 0;
    display: block;
  }

  /* Featured blocks stack already; ensure full width */
  .featured-performance {
    flex-direction: column;
  }

  .featured-performance .half {
    max-width: 100%;
  }

  /* Slightly relax main padding on small screens */
  main {
    margin: 1.2em auto;
    padding: 0 0.8em;
  }
}
