/* 
  Hair Salon Iizuka - Premium Design System
  Theme Colors: White, Brown, Deep Gray
*/

:root {
  --primary-brown: #5D4037;
  --primary-brown-light: #8D6E63;
  --primary-brown-dark: #3E2723;
  --deep-gray: #212121;
  --light-gray: #F5F5F5;
  --white: #FFFFFF;
  --accent-gold: #D4AF37;
  --accent-orange: #F78B05;
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
body {
  font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
  color: var(--deep-gray);
  background-color: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, .font-serif {
  font-family: 'Noto Serif JP', serif;
}

/* Moving CSS Gradient Background */
.moving-gradient {
  background: linear-gradient(-45deg, #fdfcfb, #e2d1c3, #f5f5f5, #d7ccc8);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* MUI-inspired Components */
.mui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2), 
              0 2px 2px 0 rgba(0,0,0,0.14), 
              0 1px 5px 0 rgba(0,0,0,0.12);
  cursor: pointer;
  text-decoration: none;
}

.mui-button-contained {
  background-color: var(--primary-brown);
  color: var(--white);
}

.mui-button-contained:hover {
  background-color: var(--primary-brown-dark);
  box-shadow: 0 2px 4px -1px rgba(0,0,0,0.2), 
              0 4px 5px 0 rgba(0,0,0,0.14), 
              0 1px 10px 0 rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.mui-card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 1px -1px rgba(0,0,0,0.2), 
              0 1px 1px 0 rgba(0,0,0,0.14), 
              0 1px 3px 0 rgba(0,0,0,0.12);
  padding: 24px;
  transition: var(--transition-smooth);
}

.mui-card:hover {
  box-shadow: 0 5px 5px -3px rgba(0,0,0,0.2), 
              0 8px 10px 1px rgba(0,0,0,0.14), 
              0 3px 14px 2px rgba(0,0,0,0.12);
}

/* 50/50 Layout System (Updated from 40/60 to reduce image size) */
.layout-40-60 {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 450px;
  overflow: hidden;
}

.layout-text-40 {
  flex: 0 0 50%;
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: transparent;
}

.layout-image-60 {
  flex: 0 0 50%;
  position: relative;
}

.layout-image-60 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1024px) {
  .layout-40-60 {
    flex-direction: column;
  }
  .layout-text-40, .layout-image-60 {
    flex: 0 0 100%;
  }
  .layout-text-40 {
    padding: 60px 24px;
    order: 2;
  }
  .layout-image-60 {
    height: 300px;
    order: 1;
  }
}

/* Header Adjustments */
header {
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.85);
}

.nav-link {
  color: var(--deep-gray);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-brown);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Hamburger Menu Black */
#menu-trigger span {
  background-color: #000 !important;
}

/* Section Titles (ULU Style) */
.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  letter-spacing: 0.2em;
  color: var(--hair-brown);
  margin-bottom: 8px;
}

.section-title p {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--hair-brown-light);
  letter-spacing: 0.1em;
}

/* Wave Separator */
.wave-container {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 20;
}
.wave-svg {
    position: relative;
    display: block;
    width: 100%;
    height: 160px;
}

/* ULU-style: each path breathes independently */
.wave-svg path {
    transform-origin: center bottom;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

.wave-svg path:nth-child(1) {
    animation-name: wave-flow-1;
    animation-duration: 8s;
    animation-delay: 0s;
    opacity: 0.3;
}

.wave-svg path:nth-child(2) {
    animation-name: wave-flow-2;
    animation-duration: 6s;
    animation-delay: -3s;
    opacity: 0.55;
}

.wave-svg path:nth-child(3) {
    animation-name: wave-flow-3;
    animation-duration: 5s;
    animation-delay: -1s;
    filter: drop-shadow(0 -4px 8px rgba(255,255,255,0.4));
}

@keyframes wave-flow-1 {
    0%   { transform: scaleY(1); }
    50%  { transform: scaleY(1.15); }
    100% { transform: scaleY(0.65); }
}

@keyframes wave-flow-2 {
    0%   { transform: scaleY(0.8); }
    50%  { transform: scaleY(1.2); }
    100% { transform: scaleY(0.9); }
}

@keyframes wave-flow-3 {
    0%   { transform: scaleY(1); }
    50%  { transform: scaleY(0.85); }
    100% { transform: scaleY(1.1); }
}

/* Scroll Line Animation */
.fv-read-more-line {
    position: relative;
    overflow: hidden;
}

.fv-read-more-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #fff, transparent);
    animation: scroll-line 2s infinite;
}

@keyframes scroll-line {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Floating Buttons */
.floating-sns {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sns-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: var(--transition-smooth);
}

.sns-btn:hover {
    transform: scale(1.1);
}

.sns-btn.line { background-color: #06C755; }
.sns-btn.insta { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

/* Menu Section Images */
.menu-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

/* Gallery Styles */
.gallerySwiper {
    width: 100%;
    padding: 20px 0 50px;
}
.gallery-img-item {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.gallery-img-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Lightbox Modal */
#gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}
#gallery-modal.active {
    display: flex;
    opacity: 1;
}
.modal-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Let clicks pass to overlay for close */
}
#modal-img {
    max-width: 85%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
    transform: scale(0.95);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    user-select: none;
    pointer-events: auto; /* Stop clicks on image */
}
#gallery-modal.active #modal-img {
    transform: scale(1);
}

/* Modal Controls */
.modal-close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    border: 1px solid rgba(255,255,255,0.2);
    pointer-events: auto;
}
.modal-close:hover {
    background: white;
    color: black;
    transform: rotate(90deg);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    user-select: none;
    pointer-events: auto;
}
.modal-nav:hover {
    background: white;
    color: black;
}
.modal-prev { left: 40px; }
.modal-next { right: 40px; }

@media (max-width: 768px) {
    .modal-nav {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    .modal-prev { left: 15px; }
    .modal-next { right: 15px; }
    .modal-close { top: 20px; right: 20px; width: 40px; height: 40px; font-size: 24px; }
}

/* Utilities */
.mobile-only {
    display: none;
}
@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-brown);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none;
    outline: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--deep-gray);
    transform: translateY(-5px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 1024px) {
    .back-to-top {
        bottom: 90px; /* Above the mobile fixed footer CTA */
        right: 20px;
        width: 44px;
        height: 44px;
    }
}
