/* 
========================================
    MUSEA Website For Careers Stylesheet
========================================
*/

/* 1. Base (Variables, Reset, Fundamentals) */
:root {
    /* Colors */
    --musea-bg-light: #f0eaf3;
    --musea-bg-white: #FFFFFF;
    --musea-primary: #D4A5D1;
    --musea-primary-dark: #B586B2;
    --musea-accent: #9B72AA;
    --musea-text-main: #4A4A4A;
    --musea-text-sub: #787878;

    /* Shadows */
    --musea-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
    --musea-shadow-float: 0 15px 40px rgba(155, 114, 170, 0.15);

    /* Spacing & Sizes */
    --nav-height: 66px;
    --section-padding: clamp(50px, 8vw, 10px);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
    overflow-x: hidden;
}

body {
    font-family: 'Noto Serif JP', serif;
    color: var(--musea-text-main);
    background-color: var(--musea-bg-light);
    line-height: 1.8;
    letter-spacing: 0.05em;
    word-break: break-word;
    overflow-wrap: anywhere;
    overflow-x: hidden;
}

/* Typography Defaults */
h1,
h2,
h3 {
    margin-bottom: 20px;
}

/* 2. Layout (Global structures) */
.top-space {
    height: var(--nav-height);
}

.container {
    max-width: 1200px;
}

.text-content-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.text-content-container h1 {
    font-size: clamp(1.6rem, 5vw, 3.5rem);
}

.text-content-container h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.text-content-container h3 {
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.text-content-container p {
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
}

.section-padding {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
}

/* 3. Components (Reusable UI elements) */

/* Buttons */
.btn-primary {
    background-color: var(--musea-primary);
    border-color: var(--musea-primary);
    color: #fff;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 0.1em;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(212, 165, 209, 0.4);
}

.btn-primary:hover {
    background-color: var(--musea-primary-dark);
    border-color: var(--musea-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 165, 209, 0.6);
}

/* Service Tags */
#otherServicesAccordion .accordion-button {
    color: var(--musea-text-main);
    background-color: transparent;
    transition: all 0.3s ease;
}

#otherServicesAccordion .accordion-button:not(.collapsed) {
    background-color: var(--musea-bg-light);
    color: var(--musea-text-main);
    box-shadow: none;
}

#otherServicesAccordion .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(212, 165, 209, 0.1);
}

.service-tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 10px 0;
}

.service-tag-item {
    display: inline-block;
    padding: 8px 24px;
    background-color: var(--musea-bg-light);
    color: var(--musea-text-main);
    /* border: 1px solid var(--musea-primary); */
    border-radius: 50px;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.service-tag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(212, 165, 209, 0.3);
}

/* Cards (Flipping Logic) */
.section-card-content {
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    padding: clamp(20px, 5vw, 60px);
    border-radius: 30px;
    box-shadow: var(--musea-shadow-card);
    margin: 40px 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.section-card-content img.rounded {
    border-radius: 10px !important;
    /* Bootstrapの標準設定を確実に上書き */
    transition: transform 0.4s ease;
}

.section-card-content img:hover {
    transform: scale(1.02);
}

.card {
    border: none;
    background: transparent;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    min-height: 280px;
    perspective: 1000px;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
}

.card-body {
    padding: 0;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    position: relative;
    width: 100%;
    height: 100%;
}

.card.is-flipped .card-body {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 1);
    /* 透過を防止 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover .card-front,
.card:hover .card-back {
    box-shadow: var(--musea-shadow-float);
    border-color: var(--musea-primary);
}

.card-front {
    transform: rotateY(0deg) translateZ(1px);
    z-index: 2;
}

.card-back {
    transform: rotateY(180deg) translateZ(1px);
    background: var(--musea-bg-white);
    color: var(--musea-text-main);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 1.5rem;
}

.card-back-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.card-back::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(252, 249, 251, 0.9) 0%, rgba(235, 224, 234, 0.7) 20%, rgba(255, 255, 255, 0.2) 40%);
    z-index: 1;
}

.card-back p {
    font-size: 0.95rem;
    margin: 0;
    position: relative;
    z-index: 2;
    color: var(--musea-text-main);
    font-weight: 500;
    text-shadow: 0 0 5px rgba(255, 255, 255, 1),
        0 0 5px rgba(255, 255, 255, 1),
        0 0 5px rgba(255, 255, 255, 1),
        0 0 5px rgba(255, 255, 255, 1),
        0 0 5px rgba(255, 255, 255, 1)
}

.card-front img {
    color: var(--musea-primary);
    filter: drop-shadow(0 4px 6px rgba(212, 165, 209, 0.3));
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.card-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--musea-text-main);
    font-size: 1.1rem;
}

.card-text {
    font-size: 0.9rem;
    color: var(--musea-text-sub);
    margin-bottom: 0;
}

/* Animation trigger classes for cards */
.stagger-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-card.is-visible {
    opacity: 1;
    transform: none;
}

.stagger-card:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-card:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-card:nth-child(3) {
    transition-delay: 0.3s;
}

@media (max-width: 991px) {
    .stagger-card.is-visible .card-body {
        animation: card-peek 1.0s cubic-bezier(0.50, 1, 0.30, 1) 0.75s;
    }
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    padding: 10px 15px;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand img {
    height: 30px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: var(--musea-text-main) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--musea-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--musea-primary) !important;
}

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

.navbar-toggler {
    border: none;
    outline: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

@media (min-width: 992px) {
    .navbar .d-flex.align-items-center {
        margin-left: auto;
    }
}

@media (max-width: 991px) {
    .custom-navbar-collapse {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
        background-color: rgba(255, 255, 255, 0.95);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        width: 100%;
        position: absolute;
        left: 0;
        top: 100%;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }

    .custom-navbar-collapse.show {
        max-height: 500px;
    }

    .navbar-nav {
        text-align: center;
        padding: 20px 0;
    }

    .nav-item {
        margin: 15px 0;
    }
}

/* 4. Page Sections */

/* Hero Section */
.hero-section {
    background: linear-gradient(to bottom, #FFF0F5 0%, #F5E6FA 30%, rgba(245, 230, 250, 0.5) 70%, transparent 100%);
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-fixed-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    max-width: 700px;
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
}

.hero-text {
    width: clamp(70%, 80%, 1000px);
    margin: 0 auto 50px;
    padding: 0 20px;
    z-index: 2;
    text-align: center;
}

.hero-text-svg {
    filter: drop-shadow(1px 1px 0 rgb(0, 0, 0));
}

.hero-text-content {
    position: relative;
    z-index: 2;
    padding-top: 80px;
    width: 100%;
}

.hero-text-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--musea-primary), var(--musea-primary-dark));
    background-clip: text;
    -webkit-background-clip: text;
    letter-spacing: 0.1em;
    text-shadow: 0 0 2px var(--musea-primary-dark), 0 0 5px #838383, 0 0 30px #ffffff;
    color: #FFFFFF;
}

.hero-text-content p {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: rgb(136, 136, 136);
    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 0 0 30px rgba(255, 255, 255, 1),
        0 0 30px rgba(255, 255, 255, 1),
        0 0 30px rgba(255, 255, 255, 1)
}

@media (max-width: 768px) {
    .hero-text {
        width: min(120%, 100vw);
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Hero Images (Desktop) */
.hero-images-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 2000px;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 100px;
}

@media (max-width: 1370px) {
    .hero-images-container {
        display: none;
    }
}

.hero-image-wrap {
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    max-width: 300px;
    overflow: hidden;
}

.hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-image-wrap:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

.hero-image-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 2;
    pointer-events: none;
}

.hero-images-left {
    display: flex;
    flex-direction: column;
    gap: -10px;
    align-items: flex-start;
}

.hero-images-right {
    display: flex;
    flex-direction: column;
    gap: -10px;
    align-items: flex-end;
}

.hero-images-left .hero-image-wrap {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: -10px;
}

.hero-images-right .hero-image-wrap {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: -10px;
}

.hero-image-wrap.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.hero-image-1 {
    width: 250px;
    height: 250px;
    scale: 1.2;
    z-index: 1;
}

.hero-image-2 {
    width: auto;
    height: auto;
    z-index: 2;
    margin-left: 20px;
    transition-delay: 0.9s;
}

.hero-image-3 {
    width: 275px;
    height: 250px;
    scale: 1.05;
    z-index: 1;
    transition-delay: 0.6s;
}

.hero-image-3 img {
    object-position: right center;
}

.hero-image-4 {
    width: 150%;
    height: 150%;
    z-index: 2;
    margin-right: 30px;
    transition-delay: 0.3s;
}

/* Hero Images (Mobile Slideshow) */
.hero-images-mobile {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

@media (max-width: 1370px) {
    .hero-images-mobile {
        display: block;
    }
}

.hero-images-mobile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(0deg, #f0eaf300, #f0eaf39c 30%);
    z-index: 2;
}

.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: image-switch-animation 20s infinite;
}

.slide-img:nth-child(2) {
    animation-delay: 5s;
}

.slide-img:nth-child(3) {
    animation-delay: 10s;
}

.slide-img:nth-child(4) {
    animation-delay: 15s;
}

.slide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
    filter: blur(2px);
}

/* Footer */
.footer {
    background-color: #fff;
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer p {
    color: var(--musea-text-sub);
    font-size: 0.9rem;
}

.footer img {
    height: 60px;
    opacity: 0.8;
    margin-top: 20px;
}

/* 5. Animations */
@keyframes card-peek {

    0%,
    100% {
        transform: rotateY(0);
    }

    40% {
        transform: rotateY(20deg);
    }
}

@keyframes image-switch-animation {

    0%,
    30%,
    100% {
        opacity: 0;
    }

    5%,
    25% {
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

.scroll-indicator {
    margin-top: 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

.scroll-text {
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-arrow {
    font-size: 0.8rem;
}

/* 6. Utilities (Functional classes) */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Break control */
.sp {
    display: none;
}

@media (max-width: 768px) {
    .sp {
        display: block;
    }
}

.pc-br {
    display: none;
}

@media (max-width: 1600px) {
    .pc-br {
        display: block;
    }
}

/* No-wrap for titles on mobile - Removed to prevent horizontal overflow */
@media (max-width: 768px) {
    .text-content-container h1 {
        white-space: normal;
    }
}

/* 7. Splash Screen */
#splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--musea-bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#splash img {
    width: clamp(150px, 30vw, 300px);
    opacity: 0;
    animation: splash-logo-anim 1.2s ease-in-out forwards;
}

#splash.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes splash-logo-anim {
    0% {
        opacity: 0;
        transform: scale(0.95);
        filter: blur(10px);
    }

    30% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }

    70% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0.1;
        transform: scale(1.05);
        filter: blur(5px);
    }
}