/* ========================================================================= */
/* 1. BASE STYLES & VARIABLES */
/* ========================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-background: #fff;
    --color-text: #000;
    --color-accent: #b3b3b3; /* Light grey for subtle accents */
    --color-border: #222222;
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth; 
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden; 
}

/* Typography */
h1, h2 {
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5em;
}

h1.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 0.25em;
}

h2.subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--color-accent);
    margin-bottom: 2em;
}

/* Links */
a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-accent);
}


/* ========================================================================= */
/* 2. HEADER & NAVIGATION */
/* ========================================================================= */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2vw 4vw;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo img {
    height: 50px; 
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-transform: uppercase;
    font-size: 0.85rem;
}


/* ========================================================================= */
/* 2.5. MOBILE MENU STYLES (Hamburger) */
/* ========================================================================= */

.menu-toggle {
    display: none; /* Hidden on Desktop by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 20; /* Ensure the toggle button is clickable */
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--color-text);
    transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}

/* Menu Toggle Active State (X Icon) */
.menu-toggle[aria-expanded="true"] .hamburger-icon {
    background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::after {
    transform: rotate(-45deg);
    top: 0;
}


/* --- Responsive Overrides for Mobile/Tablet --- */

@media (max-width: 900px) {
    /* HEADER Layout Adjustment */
    header {
        /* Ensure logo and toggle are correctly spaced */
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 4vw; /* Use fixed padding */
    }

    /* Show the Hamburger Icon */
    .menu-toggle {
        display: block;
    }

    /* Hide the Desktop Nav by Default */
    .nav-links {
        /* Full-screen overlay menu */
        display: none; /* Hide by default */
        position: absolute;
        top: 60px; /* Adjust based on header height */
        left: 0;
        width: 100%;
        height: 100vh; /* Takes full viewport height */
        background-color: var(--color-background); /* White background */
        z-index: 15;
        overflow-y: auto;
    }
    
    /* Display Menu when Toggled */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }
    
    /* Style the Menu List */
    .nav-links ul {
        flex-direction: column;
        width: 100%;
        padding-top: 40px;
        align-items: center;
    }

    .nav-links ul li {
        margin: 15px 0;
        text-align: center;
        width: 80%; /* Give list items width for touch targets */
    }

    .nav-links ul li a {
        font-size: 1.5rem; /* Larger font size for mobile readability */
        padding: 10px;
        display: block;
    }
}

/* Ensure desktop view doesn't break */
@media (min-width: 901px) {
    .nav-links {
        display: block !important; /* Force show nav on desktop */
    }
    .menu-toggle {
        display: none !important;
    }
}


/* ========================================================================= */
/* 3. MAIN CONTENT LAYOUT */
/* ========================================================================= */

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0; /* Sections handle their own side padding */
}

.hero-section,
.placeholder-section {
    padding: 80px 4vw; /* Default padding for standard sections */
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.hero-section {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10vh 4vw;
}

.hero-section .description {
    max-width: 600px;
    font-size: 1.1rem;
    line-height: 1.8;
}


/* ========================================================================= */
/* 4. IMAGE SLIDER STYLES */
/* ========================================================================= */

.slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    
    /* Full-width trick (breaking out of 'main' container) */
    margin-left: calc(-50vw + 50%); 
    margin-right: calc(-50vw + 50%);
    width: 100vw; 
}

.image-slider {
    height: 60vh; 
    min-height: 300px; 
}

.image-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.image-slider .slide.active {
    opacity: 1;
}

/* Slider Navigation Buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    z-index: 10;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.prev {
    border-radius: 0 3px 3px 0;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Dots Navigation */
.dots-container {
    text-align: center;
    position: absolute;
    bottom: 20px;
    width: 100%;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dot.active, .dot:hover {
    background-color: var(--color-text);
}


/* ========================================================================= */
/* 5. ABOUT SECTION */
/* ========================================================================= */

.about-section {
    padding: 80px 4vw;
    border-top: 1px solid var(--color-border);
    max-width: var(--max-width);
    margin: 0 auto;
}

.about-content-wrapper {
    display: flex;
    gap: 40px; 
    align-items: flex-start;
}

.about-text-column {
    flex: 1;
}

.about-text-column p {
    margin-bottom: 1.5em;
    font-size: 1.1rem;
    line-height: 1.7;
}

.about-image-column {
    flex: 1; 
    min-width: 300px;
}

.about-image-column img {
    width: 100%;
    min-height: 550px;
    display: block;
    object-fit: cover;
}


/* ========================================================================= */
/* 6. EQUIPMENT SECTION */
/* ========================================================================= */

.equipment-section {
    padding: 80px 0; 
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.equipment-section h2 {
    margin-bottom: 20px;
}

.equipment-columns-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 Grid */
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: 550px; 
    gap: 10px; 
}

.equipment-column {
    position: relative;
    background-size: cover;
    background-position: center;
    color: white; 
    display: flex;
    align-items: center; 
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.1); 
	min-height: 450px;
}

/* Background Images */
.acoustic-gear { background-image: url('../images/acoustic-bg.jpg'); }
.outboard-gear { background-image: url('../images/monitoring-bg.jpg'); }
.monitoring-gear { background-image: url('../images/outboard-bg.jpg'); }
.software-gear { background-image: url('../images/software-bg.jpg'); }

/* Overlay for Readability */
.column-overlay {
    background-color: rgba(0, 0, 0, 0.65); 
    padding: 40px;
    width: 100%!important;
    height: 100%;
    flex-direction: column;
    justify-content: center;
}

.equipment-column h3 {
    text-transform: uppercase;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.equipment-column ul {
    list-style: none;
    padding-left: 0;
}

.equipment-column li {
    padding: 8px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* リストを横並びにするための追加CSS */
.column-overlay .list-container {
    /* Flexboxを有効にして子要素(<ul>)を横並びにする */
    display: flex;
    /* <ul>間のスペースを調整 (任意) */
    gap: 40px; 
    /* 縦方向のスペースを確保 (column-overlayがflex-direction: column; のため) */
    margin-bottom: 25px;
}

/* <ul>が横に広がりすぎないように幅を設定 (任意) */
.column-overlay .list-container ul {
    /* 均等に幅を割り当てる */
    flex-grow: 1;
    /* または、特定の最大幅を設定: max-width: 50%; */
}


/* ========================================================================= */
/* 7. AUDIO SAMPLES SECTION */
/* ========================================================================= */

.audio-samples-section {
    position: relative;
    max-width: 100%;
    min-height: 700px;
    background-image: url('../images/samples-background.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff; 
}

.audio-samples-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
}

.samples-content-wrapper.two-grid {
    position: relative; 
    z-index: 2; 
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 4vw; 
    
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.samples-grid-column {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2); 
    background-color: rgba(0, 0, 0, 0.3); 
}

.samples-grid-column h2 {
    color: #fff;
    margin-top: 0;
}

.samples-grid-column h3 {
    color: #fff;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 1.25rem;
    margin-top: 30px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.section-description, .sample-final-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #ccc;
    margin-bottom: 30px;
}

.custom-audio-player {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 5px;
    filter: invert(100%) hue-rotate(180deg); /* Helps player visibility on dark BG */
}

.audio-track-info {
    font-size: 0.85rem;
    color: var(--color-accent);
    margin-bottom: 20px;
}


/* ========================================================================= */
/* 8. VIDEO SAMPLES SECTION */
/* ========================================================================= */

.video-samples-section {
    padding: 80px 4vw;
    border-top: 1px solid var(--color-border);
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.video-samples-section h2 {
    text-align: center;
}

.video-samples-section .section-description {
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text);
}

.video-player-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

.video-embed {
    flex: 1; 
    position: relative;
    padding-bottom: 28.125%; /* 16:9 aspect ratio for 50% width */
    height: 0;
    overflow: hidden;
    max-width: 50%;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* ========================================================================= */
/* 9. CONTACT SECTION */
/* ========================================================================= */

.contact-section {
    padding: 80px 4vw;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.contact-section form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 20px auto 0;
}

.contact-section input,
.contact-section textarea {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 15px;
    margin-bottom: 15px;
    font-size: 1rem;
}

.contact-section textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-section button {
    background-color: var(--color-text);
    color: var(--color-background);
    padding: 15px 20px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: opacity 0.3s;
}

.contact-section button:hover {
    opacity: 0.8;
}


/* ========================================================================= */
/* 10. FOOTER */
/* ========================================================================= */

footer {
    border-top: 1px solid var(--color-border);
    padding: 30px 4vw;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-accent);
}

footer p {
    margin-bottom: 5px;
}

.social-links {
    margin: 10px 0 15px;
}

.social-links a {
    color: var(--color-accent);
    margin: 0 10px;
    text-transform: uppercase;
    font-size: 0.75rem;
}


/* ========================================================================= */
/* 11. RESPONSIVE MEDIA QUERIES */
/* ========================================================================= */

/* Tablet/Small Desktop (up to 900px) */
@media (max-width: 900px) {
    header {
        padding: 3vw 4vw;
    }

    nav ul li {
        margin-left: 15px;
    }

    /* Samples Section: Stack 2-column grid */
    .samples-content-wrapper.two-grid {
        grid-template-columns: 1fr; 
        gap: 40px;
    }
}

/* Mobile Layout (up to 768px) */
@media (max-width: 768px) {
    /* Header/Navigation Stack */
    header {
        flex-direction: column;
        text-align: center;
        padding-bottom: 20px;
    }

    .logo {
        margin-bottom: 15px;
    }

    nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px;
    }
    
    /* Typography Scaling */
    h1.main-title {
        font-size: 2.2rem;
    }

    h2.subtitle {
        font-size: 1rem;
        margin-bottom: 1.5em;
    }

    /* Slider Height */
    .image-slider {
        height: 40vh; 
        min-height: 250px;
    }
    
    /* Section Padding */
    .hero-section,
    .about-section,
    .placeholder-section,
    .contact-section,
    .video-samples-section {
        padding: 60px 5vw;
    }

    /* Slider Buttons */
    .prev, .next {
        font-size: 16px;
        padding: 10px;
        margin-top: -15px;
    }

    /* About Section: Stack columns */
    .about-content-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    
    .about-image-column {
        min-width: unset;
    }
    
    /* Contact Form Width */
    .contact-section form {
        max-width: 90%; 
    }

    /* Video Samples: Stack videos */
    .video-player-container {
		flex-direction: column;
		column-gap: 40px;
	}

	.video-embed {
		max-width: 100%;
		width: 100%;        
        padding-bottom: 56.25%;
	}
	
	/* ABOUTセクションなどの縦積みレイアウトの修正 */
    .about-content-wrapper {
        flex-direction: column; /* 縦積みを強制 */
        gap: 30px; /* 縦積みの間隔を調整 */
    }

    /* テキスト列と画像列が縦積みになるので、どちらも幅100%にし、テキストを中央寄せにする */
    .about-text-column {
        flex: none;
        width: 100%;
        /* これを追記することで中央揃えになります */
        text-align: center; 
    }
	/* RATESセクションの中央揃えを強制する */
    #rates .about-text-column {
        /* テキストを中央揃えにする */
        text-align: center;
        /* コンテンツ幅を最大化し、左右にパディングを追加して見栄えを良くする */
        padding: 0 10px; 
    }
    
    /* RATESセクションのh2も中央揃え */
    #rates .about-text-column h2 {
        /* h2はすでに中央揃えですが、念のため確認 */
        text-align: center;
    }

	
}


/* Small Mobile Equipment (up to 650px) */
@media (max-width: 650px) {
    /* Equipment Section: Stack 2x2 grid to 1 column */
    .equipment-columns-wrapper {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .equipment-column {
        height: 350px;
    }

    .column-overlay {
        padding: 30px 20px;
    }
}