:root {
  --color-bg: #fff;
  --color-text: #111;
  --color-primary: #8f8f8f;
  --color-primary-hover: #a5a5a5;
  --color-header: #222;
  --color-accent: #731717;
  --color-link: #969696;
  --color-link-hover: #7e7e7e;
  --color-soft-hover:#c0bbbb;
  --max-width: 800px;
  --border-radius: 6px;
  --transition: color 0.2s, background 0.2s;
}

/* Normalize mobile text sizing to avoid inconsistent font boosting */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Manrope', 'Raleway', Arial, Helvetica, sans-serif;
  font-weight: 400;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  line-height: 1.6;
}

/* iOS Safari dynamic toolbar safe min-height */
@supports (-webkit-touch-callout: none) {
  body { min-height: -webkit-fill-available; }
}

header {
  width: 100%;
  max-width: var(--max-width);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  background: var(--color-bg);
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 0.01em;
}

header nav {
  display: flex;
  gap: 1rem;
}

header nav a {
  text-decoration: none;
  color: var(--color-link);
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.25em 0.5em;
  border-radius: var(--border-radius);
}

header nav a:hover {
  color: var(--color-link-hover);
  background: #f3f3f3;
}

/* Improve focus visibility for keyboard/touch users */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.social-btn:focus-visible,
.sidebar .nav-item:focus-visible,
header nav a:focus-visible,
.event-card .event-button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Reduce unwanted tap highlight on iOS */
button, a { -webkit-tap-highlight-color: transparent; }

main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

section {
  width: 100%;
  margin-bottom: 2.5rem;
  background: #fafafa;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

h2 {
  color: var(--color-header);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem 0;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.shop-links {
  margin-bottom: 1rem;
}
.shop-links a {
  color: var(--color-link);
  text-decoration: underline;
  font-size: 1rem;
  font-weight: 500;
  background: none;
  border-radius: 0;
  padding: 0;
  transition: var(--transition);
}
.shop-links a:hover {
  color: var(--color-link-hover);
}

.contact-minimal a {
  color: var(--color-link);
  text-decoration: underline;
  transition: var(--transition);
}
.contact-minimal a:hover {
  color: var(--color-link-hover);
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  /* Remove width: 100vw to avoid stretching */
}

.sidebar {
  background: none;
  border: none;
  width: auto;
  min-width: unset;
  min-height: unset;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  margin-right: 2rem; /* Minimal gap between nav and content */
}
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}
.sidebar .nav-item {
  padding: 0.25em 0.75em;
  font-size: 1rem;
  color: var(--color-header);
  background: none;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: right;
  min-width: 80px;
}
.sidebar .nav-item.active,
.sidebar .nav-item:hover {
  background: var(--color-link);
  color: #fff;
}

.content {
  flex: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

.section {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: none;
  border-radius: var(--border-radius);
  padding: 0;
  box-shadow: none;
}

#home {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-img {
  display: block;
  margin: 0.01rem auto 0.5rem auto;
  max-width: 350px;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#home h2 {
  margin-bottom: 0.5rem;
}

/* Ensure consistent order: media below profile slideshow and thumbnails */
#home .home-img { order: 1; }
#home .profile-slideshow { order: 1; }
#home .slideshow-thumbnails { order: 2; }
#home .social-buttons { order: 3; }

.social-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin: 1.2rem 0 0.5rem 0;
}
.social-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: none;
  border: none;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.social-btn svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
  stroke: none;
}

.icon-svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

@media (max-width: 800px) {
  .container {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-height: 0;
  }
  .sidebar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin: 0 0 0.75rem 0;
    padding: 0 0.5rem;
  }
  /* Minimal dropdown on mobile */
  #mobile-nav {
    display: block !important;
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--color-bg);
    color: var(--color-text);
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 0.6rem 2rem 0.6rem 2.25rem; /* space for icons */
    font-size: 1rem;
    margin: 0.5rem 0.25rem 0.25rem;
    background-image:
      url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239a9a9a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>'),
      url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%239a9a9a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
    background-repeat: no-repeat, no-repeat;
    background-position: 0.6rem center, right 0.6rem center;
    background-size: 16px 16px, 12px 12px;
    box-shadow: none;
    cursor: pointer;
  }
  #mobile-nav:focus {
    outline: none;
    border-color: #cfcfcf;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.02);
  }
  #mobile-nav:hover { background-color: #fafafa; }
  .sidebar ul { display: none; }
  .content {
    align-items: center;
    padding: 0 0.25rem;
  }
  .section {
    padding: 0.25rem 0.25rem 0.5rem;
  }
  header { padding: 1rem 0.75rem 0.75rem; margin-bottom: 1rem; }
  main { padding: 0.75rem; }
  #home h2 { margin-bottom: 0.5rem; }
  .home-img { max-width: 320px; }
  .profile-slideshow { max-width: 320px; }
  /* Keep About section paragraph font sizes consistent on small screens */
  #bio p { font-size: 1rem; line-height: 1.6; }
}

/* Cleaned up contact form styles */
.contact-form {
  box-sizing: border-box;
  max-width: 400px;
  margin: 0 auto;
}
.contact-form-inner {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: var(--color-bg);
  padding: 1.5rem 1.2rem;
  box-sizing: border-box;
}
.contact-form input,
.contact-form textarea,
.contact-form button[type="submit"] {
  width: 100%;
  box-sizing: border-box;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  padding: 1.1em 1.3em;
}
.contact-form input,
.contact-form textarea {
  background: transparent;
  outline: none;
  color: var(--color-text);
  border: 1px solid #000;
  transition: all 0.3s ease-in-out;
  box-shadow: none;
  resize: none;
}

/* Allow vertical resize for better mobile UX */
.contact-form textarea { resize: vertical; }
.contact-form button[type="submit"] {
  border: 1px solid #000;
  background: var(--color-header);
  color: #fff;
  font-weight: bold;
  margin-top: 0.5rem;
  padding: 0.7em 1.2em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  box-shadow: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-soft-hover);
  background: #fff;
}
.contact-form input:hover,
.contact-form textarea:hover {
  background: var(--color-soft-hover);
  color: var(--color-text);
}
.contact-form input:hover:focus,
.contact-form textarea:hover:focus {
  background: var(--color-soft-hover);
  color: var(--color-text);
}
.contact-form button[type="submit"]:hover,
.contact-form button[type="submit"]:focus {
  background: var(--color-soft-hover);
  color: var(--color-text);
}
.contact-form input:disabled,
.contact-form textarea:disabled,
.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--color-link);
  font-size: 0.95em;
  opacity: 1;
  transition: color 0.2s;
  font-family: inherit;
}
.contact-form input:focus::placeholder,
.contact-form textarea:focus::placeholder {
  color: var(--color-soft-hover);
}
.contact-form input:hover::placeholder,
.contact-form textarea:hover::placeholder {
  color: var(--color-soft-hover);
}
.contact-form input:hover:focus::placeholder,
.contact-form textarea:hover:focus::placeholder {
  color: var(--color-soft-hover);
}

.phone-group {
  display: flex;
  gap: 0.7em;
}
.phone-group input[type="text"] {
  flex: 0 0 70px;
  min-width: 50px;
  max-width: 90px;
  text-align: center;
}
.phone-group input[type="tel"] {
  flex: 1 1 auto;
}

.events-gallery {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  padding: 1rem 0;
}

/* Mobile-friendly swipe behavior */
.events-gallery { scroll-snap-type: x mandatory; }
.event-card { scroll-snap-align: start; }
.event-card {
  position: relative;
  min-width: 180px;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  background: #222;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  transition: transform 0.2s;
  flex: 0 0 auto;
}
.event-card.expired img {
  filter: grayscale(1) brightness(0.7);
}
.event-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event-card .event-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 0.7em 1em;
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.event-card .event-buttons {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  gap: 0.7em;
  z-index: 2;
  width: 80%;
  align-items: center;
}
.event-card.upcoming:hover .event-buttons {
  display: flex;
}

/* Ensure buttons are visible on touch devices where hover doesn't exist */
@media (hover: none) {
  .event-card .event-buttons { display: flex; }
}

/* Mobile-specific tap target and layout tweaks without touching existing rules */
@media (max-width: 800px) {
  /* Larger tap targets */
  .social-btn { width: 44px; height: 44px; }
  .slideshow-thumb { width: 44px !important; height: 44px !important; }
  header nav a { padding: 0.5em 0.75em; }
  .sidebar .nav-item { padding: 0.6em 0.9em; }

  /* Wrap thumbnails to avoid overflow */
  .slideshow-thumbnails { flex-wrap: wrap; row-gap: 0.5rem; }
}
.event-card .event-button {
  background: #fff;
  color: #222;
  border: none;
  border-radius: 6px;
  padding: 0.9em 0;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background 0.18s, color 0.18s;
  text-decoration: none;
  text-align: center;
  width: 100%;
  min-width: 120px;
  max-width: 260px;
}
.event-card .event-button:hover {
  background: #222;
  color: #fff;
}

.profile-slideshow {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin: 1.5rem auto 1rem auto;
  height: auto;
}
.profile-slideshow .slideshow-img {
  opacity: 0;
  z-index: 1;
  display: none;
  /* Remove absolute positioning and stacking */
  position: static;
  top: unset;
  left: unset;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: opacity 0.7s;
}
.profile-slideshow .slideshow-img.visible {
  opacity: 1;
  z-index: 2;
  display: block;
}

.slideshow-thumbnails {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
}
.slideshow-thumb {
  width: 32px !important;
  height: 32px !important;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.7;
  transition: border 0.2s, opacity 0.2s;
  display: inline-block;
}
.slideshow-thumb.active {
  border: 2px solid var(--color-accent);
  opacity: 1;
}
.slideshow-thumb:hover {
  opacity: 1;
  border: 2px solid var(--color-link-hover);
}
