/* CSS Variables - Centralized theme colors */
:root {
    --primary-color: #000;
    --secondary-color: #1A1A1A;
    --accent-color: #444;
    --background-color: #FFF;
    --text-color: #555;
    --white: #FFF;
}

/* Base Styles - Apply to the entire document */
html {
    box-sizing: border-box;
    font-size: 16px; /* AMENDMENT 1: Set base font size for consistent REM units */
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    font-family: 'Helvetica Neue', 'Futura', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-align: left; /* Keep body text-align left for layout control, individual elements will be centered */
    width: 100%;
}

/* Typography - General heading styles */
h1, h2, h3, h4, h5, h6 {
    text-align: center;
    color: var(--primary-color);
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 3.8rem;
    letter-spacing: 3px;
    margin-top: 16px; /* Reduced by 20% from 20px */
    margin-bottom: 20px;
}

h2 {
    font-size: 1.8rem;
    margin-top: 15px;
    color: var(--accent-color);
}

h3 {
    font-size: 1.5rem;
    margin-top: 25px;
    color: var(--accent-color);
}

/* Consolidated Paragraph Styles */
p {
    font-size: 1.3rem;
    margin: 0 0 25px 0;
    line-height: 1.4;
    max-width: 600px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

/* Specific paragraph styling for "Hi, I'm Josh." */
.intro-text {
    font-size: 2.75rem;
    text-align: left;
    margin-bottom: 0.5em; /* Reduced from 1em to 0.5em for less space below */
}

ul, ol {
    font-size: 1.1rem;
    line-height: 1.4;
    text-align: center; /* ALIGNED TO CENTER */
    margin: 0 auto 1rem auto; /* Center the block itself and its content */
    padding-left: 0; /* Remove padding if you want list items to center perfectly with text */
    max-width: 600px; /* Constrain width like paragraphs */
    width: 90%; /* Constrain width like paragraphs */
}

li {
    margin-bottom: 0.5rem;
}

/* Images - General image styles */
img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* Specific image container styles for main portrait images (used on index.html) */
.image-container img {
    width: 75%;
    max-width: 500px;
    height: auto;
    border: 5px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
}

/* NEW: Repertoire Page Image Container Styles */
.repertoire-image-container {
    width: 100%;
    margin-top: 15px;
    margin-bottom: 25px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.repertoire-image-container video {
    width: 60%; /* Smaller than the 75% image */
    max-width: 400px; /* Smaller than the 500px image max */
    height: auto;
    border: 5px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    display: block;
    margin: 0 auto;
}
/* Layout & Components */

/* Main Header (for the page title) */
header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

/* Nav Bar - Master Flex Container for Desktop & Mobile */
nav {
    position: relative; /* Default to relative for desktop */
    top: 0;
    left: 0;
    width: 100%;
    background: var(--primary-color);
    padding: 18px 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: top 0.3s ease-in-out;
    display: flex;
    justify-content: center; /* Center the main content */
    align-items: center;
    flex-wrap: nowrap;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Social Links Container - Position absolutely to avoid affecting center alignment */
.social-links-container {
    position: absolute;
    left: 20px; /* Position from left edge */
    top: 50%;
    transform: translateY(-50%); /* Center vertically */
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.social-icon-link {
    display: flex;
    align-items: center;
    padding: 5px;
}

.social-icon-link img {
    width: 40px;
    height: 40px;
    margin: 0;
}

/* Nav Menu (ul) - Main navigation links - Now truly centered */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Default to flex for desktop */
    align-items: center;
    transition: all 0.3s ease-in-out;
    position: relative; /* Default to relative for desktop */
    justify-content: center; /* Center the nav items */
}

/* Center the main navigation items with closer spacing */
nav ul li {
    margin: 0 15px;
}

/* Mobile navigation menu when open - This will be overridden by media query for mobile */
nav ul.show {
    /* These styles will be applied by JS when the menu is open, but only relevant on mobile */
    flex-direction: column;
    background: var(--primary-color);
    position: absolute;
    top: 60px;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-in-out;
    align-items: center;
    gap: 10px;
    display: flex;
    height: calc(100vh - 60px);
    overflow-y: auto;
    justify-content: flex-start;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.6rem;
    text-transform: uppercase;
    font-weight: bold;
    padding: 12px 24px;
    transition: all 0.3s ease-in-out;
}

nav a:hover {
    background: var(--accent-color);
    border-radius: 5px;
}

/* Hamburger Menu Toggle Button - Position absolutely to avoid affecting center alignment */
.menu-toggle {
    position: absolute;
    right: 20px; /* Position from right edge */
    top: 50%;
    transform: translateY(-50%); /* Center vertically */
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--white);
    border-radius: 4px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger icon animation to an "X" when open */
.menu-toggle.open span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Wrapper - Main content container */
.wrapper {
    padding-top: 120px; /* Default desktop padding */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 30px);
    padding-bottom: 60px;
}

/* Dividers */
.divider {
    width: 100%;
    max-width: 800px;
    height: 3px;
    background: var(--accent-color);
    margin: 50px auto;
    border-radius: 2px;
}

/* Call to Action Buttons */
.cta-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 60px;
    margin-bottom: 60px;
}

.cta-item {
    display: inline-block;
    font-size: 1.6rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--primary-color);
    padding: 14px 26px;
    border: 3px solid var(--primary-color);
    border-radius: 12px;
    background: var(--background-color);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    box-shadow: 4px 4px 0px var(--accent-color);
}

.cta-item:hover {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: none;
    transform: scale(1.07);
}

/* Listen Links Container (for Spotify and YouTube logos) */
.listen-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.spotify-logo-link,
.youtube-logo-link {
    display: block;
    transition: transform 0.3s ease-in-out;
}

.spotify-logo-link img,
.youtube-logo-link img {
    width: 104px;
    height: auto;
    display: block;
}

.spotify-logo-link:hover,
.youtube-logo-link:hover {
    transform: scale(1.05);
}

/* Repertoire Table Styles */
.repertoire-table {
    width: 100%;
    max-width: 600px;
    margin-top: 15px;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
    border-collapse: collapse;
    font-size: 1.1rem;
    line-height: 1.5;
    table-layout: fixed;
}

.repertoire-table th,
.repertoire-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
}

.repertoire-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1rem;
}

.repertoire-table tbody tr:nth-child(even) {
    background-color: #f8f8f8;
}

/* Modified: Hover effect for individual cells */
.repertoire-table td:hover {
    background-color: #f0f0f0;
}

/* Footer Styles */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 40px 0 20px;
    width: 100%;
    margin-top: auto;
    box-sizing: border-box;
    text-align: center;
}

footer p {
    margin: 0;
    text-align: center;
    width: 100%;
    max-width: none;
}

/* Contact Form Styles (if used on a contact page) */
.contact-form {
    max-width: 800px;
    width: 100%;
    margin: 50px auto;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-form label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    padding: 14px 20px;
    font-size: 1rem;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #555;
}

/* Media Queries */
@media (max-width: 768px) {
    nav {
        padding: 0 10px;
        height: 60px;
        justify-content: center;
        position: fixed; /* Make the nav bar fixed at the top */
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000; /* Ensure it stays on top */
    }

    /* Adjust wrapper padding to account for the fixed nav */
    .wrapper {
        padding-top: 80px; /* Increased padding to push content below fixed nav */
        padding-bottom: 40px;
        padding-left: 20px;
        padding-right: 20px;
        width: 100%;
    }

    .social-links-container {
        left: 10px;
        gap: 8px;
    }

    .social-icon-link img {
        width: 32px;
        height: 32px;
    }

    /* Mobile Nav UL - This is the key */
    nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: none; /* Crucial: Hidden by default on mobile */
        flex-direction: column;
        align-items: center;
        position: fixed; /* Make the full menu fixed */
        top: 60px; /* Position it right below the nav bar */
        bottom: 0;
        right: 0;
        left: 0;
        background: var(--primary-color); /* Full background for the menu */
        padding-top: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        animation: slideDown 0.3s ease-in-out;
        gap: 10px;
        height: calc(100vh - 60px); /* Fill the rest of the viewport height */
        overflow-y: auto; /* Allow scrolling if menu content is tall */
        justify-content: flex-start;
        z-index: 999; /* Lower z-index than menu-toggle but higher than content */
    }

    /* When .show class is added by JS, display the menu */
    nav ul.show {
        display: flex;
    }

    nav a {
        font-size: 1.3rem;
        padding: 10px;
        width: 100%;
        text-align: center;
    }

    nav ul.show a {
        display: block;
        width: 90%;
        margin: 0 auto;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul.show li:last-child a {
        border-bottom: none;
    }

    /* Hamburger Menu Toggle Button - Display on mobile */
    .menu-toggle {
        display: flex; /* Show hamburger on mobile */
        right: 10px; /* Adjust for mobile padding */
    }

    /* General body/wrapper adjustments for smaller screens */
    body {
        padding-top: 60px; /* Add this to ensure content starts below the fixed nav */
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    p {
        font-size: 0.9rem;
        margin-bottom: 15px;
        width: calc(100% - 40px);
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        text-align: left;
    }

    ul, ol {
        font-size: 1rem;
        padding-left: 0;
        margin: 0 auto 15px auto;
        width: calc(100% - 40px);
        max-width: 600px;
    }

    .divider {
        margin: 30px auto;
    }

    .cta-item {
        font-size: 1.4rem;
        padding: 12px 20px;
    }

    .listen-links {
        gap: 15px;
    }

    .spotify-logo-link img,
    .youtube-logo-link img {
        width: 78px;
    }

    .repertoire-image-container {
        margin-top: 10px;
        margin-bottom: 15px;
        max-width: 95%;
    }
}

/* Add a class for hiding the nav bar when scrolling down */
.hide-nav {
    top: -60px; /* Move the nav bar completely out of view */
}

/* Desktop-specific overrides for positioning (min-width: 769px) */
@media (min-width: 769px) {
    nav {
        justify-content: center;
        padding: 18px 20px;
        position: relative; /* Back to relative on desktop */
        height: auto; /* Allow height to adjust to content */
        top: auto; /* Remove fixed positioning */
    }

    /* Remove hide-nav class effect on desktop */
    .hide-nav {
        top: auto;
    }

    .social-links-container {
        left: 20px;
    }

    /* Main nav UL for desktop */
    nav ul {
        display: flex !important; /* Force display flex for desktop */
        position: static;
        flex-direction: row;
        width: auto;
        box-shadow: none;
        padding: 0;
        margin: 0;
        justify-content: center; /* Center the nav items */
        height: auto;
        overflow-y: visible;
    }

    nav ul li {
        margin: 0 15px;
    }

    /* Ensure menu toggle is hidden on desktop */
    .menu-toggle {
        display: none;
    }

    /* Reset wrapper padding for desktop */
    .wrapper {
        padding-top: 60px; /* Reduced to 60px for a more noticeable change */
    }

    body {
        padding-top: 0; /* No top padding needed on body for desktop */
    }
}
/* Review Slider Container */
.review-slider-container {
  position: relative;
  max-width: 600px;
  width: 90%;
  margin: 60px auto 40px auto;
  box-sizing: border-box;
}

/* Review Slider Inner - The viewport for the slides */
.review-slider-inner {
  position: relative;
  overflow: hidden; /* This is correct to hide extra slides */
  border: 5px solid var(--primary-color);
  border-radius: 12px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
  aspect-ratio: 16 / 9;
  min-height: 250px;
  display: flex; /* Correct for centering the single visible slide */
  align-items: center;
  justify-content: center;
  width: 100%; /* Ensures this is the definitive width of one slide's view */
}

/* Review Slider Content - This needs to be wide enough for ALL slides */
.review-slider-content {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
  /* --- CRITICAL CHANGE HERE --- */
  /* This needs to be 'totalSlides * 100%' for the translateX to work */
  /* Since JavaScript calculates totalSlides, we need a flexible way to set this.
     The best way is to ensure flex items (slides) don't shrink and fill the width. */
  width: auto; /* Remove width: 100% here */
  /* Add these properties to make it work correctly as a flex container for the slides */
  flex-wrap: nowrap; /* Ensure slides stay on one line */
  justify-content: flex-start; /* Start from the left */
}

/* Individual Review Slide */
.review-slide {
  flex-shrink: 0; /* Prevents slides from shrinking */
  width: 100%; /* Each slide takes up 100% of the visible .review-slider-inner width */
  height: 100%;
  object-fit: contain; /* Good for the image itself */
}

/* Arrow Styles (already positioned at bottom) */
.slider-arrow {
  position: absolute;
  top: 90%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  border: none;
  color: #333;
  font-size: 2rem;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  transition: background 0.3s, color 0.3s;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 1);
  color: #000;
}

.left-arrow {
  left: 10px;
}

.right-arrow {
  right: 10px;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .review-slider-inner {
    min-height: 200px;
  }
}