/* Custom refinements for "Kogao Salon Calina" */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll Animation for FV */
@keyframes scrollDown {
    0% {
        transform: translateY(-100%);
    }

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

.scroll-line {
    animation: scrollDown 2s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

/* Section Margins as requested (PC: 120px+, SP: 80px+) */
section {
    position: relative;
}

@media (min-width: 768px) {
    section {
        margin-bottom: 120px;
    }
}

@media (max-width: 767px) {
    section {
        margin-bottom: 80px;
    }
}

/* Exclude certain sections from margin-bottom if they are adjacent or have specific background */
#header,
#pagetop,
#sp-menu,
footer,
#contact,
.cta-section {
    margin-bottom: 0 !important;
}

#fv,
#sv {
    margin-bottom: 0 !important;
    /* FV and SV are connected as per instructions */
}

/* Header background change on scroll */
header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    height: 70px;
}

/* Swiper Fade Transition refinement */
.swiper-slide {
    transition-timing-function: ease-in-out;
}

/* Gallery Hover Effect */
.gallery-link {
    display: block;
    overflow: hidden;
}

.gallery-link img {
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-link:hover img {
    transform: scale(1.08);
}

/* Parallax Effect (Mobile optimization) */
@media (max-width: 768px) {
    .bg-fixed {
        background-attachment: scroll;
        /* Performance on mobile */
    }
}

/* Voice Card Shadow */
.voiceSwiper .swiper-slide>div {
    transition: transform 0.3s ease;
}

.voiceSwiper .swiper-slide-active>div {
    transform: translateY(-5px);
}

/* Prevent context menu (Right click lock) - Applied via JS but can be hinted here */
* {
    -webkit-touch-callout: none;
    -webkit-user-select: text;
    user-select: text;
}

/* Floating button behavior */
#pagetop.visible {
    opacity: 1;
    translate: 0 0;
}

/* Voice Card Refinements */
.voiceSwiper .swiper-slide {
    height: auto;
    display: flex;
}

.voiceSwiper .swiper-slide>div {
    height: auto;
    width: 100%;
    align-self: flex-start;
    /* Prevent stretching to fill taller cards in the same row */
}

.line-clamp-5 {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-text.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

/* Responsive FV image ratio preservation */
#fv,
.fvSwiper,
.fvSwiper .swiper-wrapper,
.fvSwiper .swiper-slide {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: block !important;
    /* Forces block for proper height calculation */
}

#fv picture {
    display: block !important;
    width: 100% !important;
}

#fv img {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    /* Safety for edge cases */
}

/* Voice Swiper Navigation Custom Positions */
.voiceSwiper .swiper-button-prev,
.voiceSwiper .swiper-button-next {
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.voiceSwiper .swiper-button-prev {
    left: -10px;
}

.voiceSwiper .swiper-button-next {
    right: -10px;
}

@media (min-width: 1200px) {
    .voiceSwiper .swiper-button-prev {
        left: -50px;
    }

    .voiceSwiper .swiper-button-next {
        right: -50px;
    }
}

.voiceSwiper .swiper-button-prev:hover,
.voiceSwiper .swiper-button-next:hover {
    background: #F472B6;
    /* pink-400 */
    color: white !important;
}