/* 
   HappiTomo CLINIC Custom Styles
   Theme: Magic Medical Resort (Disney-style)
*/

:root {
    --primary-yellow: #F9F6E8;
    --primary-blue: #1A328B;
    --accent-orange: #CC5533;
    --text-dark: #455A64;
    --white: #ffffff;
    --bg-light: #FAFAFA;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.8;
    /* ゆとりを持たせる */
    letter-spacing: 0.05em;
    /* 少し広げて上品さを出す */
    overflow-x: hidden;
    color: var(--text-dark);
}

/* Mobile-Specific Padding Optimization */
@media (max-width: 640px) {
    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Reduce Card Padding */
    .service-card .p-8,
    .service-card .p-6,
    #voice .p-8 {
        padding: 1.25rem !important;
    }

    #target .p-5 {
        padding: 1rem !important;
    }

    #message .p-10 {
        padding: 1.5rem !important;
    }
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
.font-bold {
    letter-spacing: 0.1em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}

/* Header Glassmorphism */
#header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 0;
}

/* Mobile Menu Link Stagger */
.mobile-link {
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

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

.mobile-link:hover::after {
    transform: translateX(0);
}

/* FV Swiper Force Coverage */
.fv,
.fv-swiper {
    width: 100%;
    height: auto !important;
}

.fv-swiper .swiper-slide {
    height: auto !important;
}

.fv-swiper .swiper-slide img {
    width: 100%;
    height: auto !important;
    vertical-align: bottom;
}

/* Section Margins removed to eliminate #FAFAFA gaps */
section {
    margin-bottom: 0;
}

@media (min-width: 1024px) {
    section {
        margin-bottom: 0;
    }
}

/* Service Cards */
.service-card {
    background-color: var(--white);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-0.5rem);
}

/* Voice Swiper Pagination Custom */
.swiper-pagination-bullet-active {
    background: var(--primary-blue) !important;
}

/* Magic Path Decoration (Abstract SVG or CSS) */
.magic-dot {
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: var(--accent-orange);
    opacity: 0.4;
}

/* Responsive Image Handling (Disabled shadows/rounding as per request) */
img {
    border-radius: 0 !important;
    box-shadow: none !important;
}

@keyframes bounce-slow {

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

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 3s infinite ease-in-out;
}

/* Stunning Premium Buttons */
.btn-premium {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 99px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    z-index: 1;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 50%, rgba(0, 0, 0, 0.05) 100%);
    z-index: -1;
}

.btn-premium:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.btn-premium:active {
    transform: translateY(-2px);
}

/* Shimmer Animation */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0) 40%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 60%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    animation: shimmer-btn 4s infinite;
}

@keyframes shimmer-btn {
    0% {
        transform: translateX(-150%) rotate(45deg);
    }

    30%,
    100% {
        transform: translateX(150%) rotate(45deg);
    }
}

/* Original CTA Button Upgrades */
@keyframes cta-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

.cta-btn {
    animation: cta-pulse 3s infinite ease-in-out;
    background: white;
    box-shadow: 0 8px 0px var(--primary-blue);
    border: 2px solid var(--primary-blue);
    transition: all 0.2s ease;
}

.cta-btn:hover {
    transform: translateY(4px);
    box-shadow: 0 4px 0px var(--primary-blue);
}

.cta-btn-line {
    background: #06C755 !important;
    border-color: #05a346 !important;
    box-shadow: 0 8px 0px #048639 !important;
    color: white !important;
}

.cta-btn-line:hover {
    box-shadow: 0 4px 0px #048639 !important;
}

/* Kids-Targeted Multicolor Section Title Box */
.section-title-box {
    display: inline-block;
    padding: 0.75rem 3rem;
    background: #ffffff;
    font-weight: 900;
    /* Extra Bold */
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
    border: 4px solid var(--primary-blue);
    border-radius: 24px 8px 24px 8px;
    /* Playful asymmetric shape */
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow: 6px 6px 0px var(--accent-orange);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.section-title-box:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 8px 8px 0px var(--accent-orange);
}

.section-title-box span {
    background: linear-gradient(to right, #1A328B 0%, #CC5533 33%, #CC5533 66%, #1A328B 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: title-rainbow 3s linear infinite;
    display: inline-block;
}

@keyframes title-rainbow {
    to {
        background-position: 200% center;
    }
}


/* Voice Section Truncation */
.voice-text-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.voice-text-expanded {
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    display: block !important;
}

/* Hamburger Menu Icon Fix */
#menu-toggle span {
    transition: all 0.3s ease;
}

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

#menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

/* Gallery Hover */
.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    transition: transform 0.3s ease;
}

/* .gallery-item:hover {
    transform: scale(1.02);
} */

/* Gallery Marquee Effect */
.gallery-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
}

.gallery-swiper {
    padding-bottom: 0;
}

.gallery-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Premium Gradient Backgrounds */
.bg-premium-blue {
    background: linear-gradient(135deg, #1A328B 0%, #0D1A4A 100%);
}

/* Utility to override tailwind if needed */
.text-primary-blue-700 {
    color: #1A328B;
}

.bg-primary-yellow-900 {
    background: #E6E2D1;
}

/* Asymmetrical Layout specific fine-tuning */
@media (min-width: 1024px) {
    .flex-asymmetry-right {
        flex-direction: row-reverse;
    }
}