@import url('https://fonts.googleapis.com/css2?family=Cormorant+Infant:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

html, body {
    height: 100%;
}

body {
    z-index: 0;
    font-size: 16px;                  
    font-family: "Cormorant Infant", serif;

    display: flex;
    flex-direction: column;

    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

main {
    flex: 1;
    padding-top: 70px !important;
}

a[href] {
    cursor: pointer !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a[href]:hover .logo-badge {
    opacity: 0.85;
}

.fs-testimonial {
    font-size: calc(1.275rem + .3vw) !important;
}

.fs-5-gallery_text {
    font-size: 1.25rem;
}

.fs-2 {
    font-size: calc(1.325rem + .7vw)!important;
}

@media (max-width:1097px) {
    .fs-1 {
        font-size: calc(1.375rem + .9vw) !important;
    }
    .fs-2 {
        font-size: calc(1.3rem + .6vw) !important;
    }
    .fs-5 {
        font-size: 1rem !important;
    }
    .fs-6 {
        font-size: 0.9rem !important;
    }
}

@media (max-width:992px) {
    .fs-2 {
        font-size: calc(1rem + .5vw) !important;
    }
}

@media (max-width:845px) {
    .fs-1 {
        font-size: calc(1.375rem + .9vw) !important;
    }
    .fs-5 {
        font-size: 0.9rem !important;
    }
    .fs-6 {
        font-size: 0.83rem !important;
    }
}

@media (max-width:767px) {
    .fs-1 {
        font-size: calc(1.175rem + .7vw) !important;
    }
    .fs-2 {
        font-size: calc(1.25rem + .3vw) !important;
    }
}

@media (max-width:650px) {
    .fs-1 {
        font-size: calc(1.075rem + .5vw) !important;
    }
}

.fs-small {
    font-size: 13px !important; /* 13px = 0.835rem */
}

.ff-thai {
    font-family: "Sarabun", serif;
    font-weight: 200;
    font-style: normal;
}

.ff-eng {
    font-family: "Cormorant Infant", serif;
}

.vh-79 {
    height: 79vh !important;
}

.vh-82 {
    max-height: 82vh;
}

@media (min-width: 576px) and (max-width: 1366px) and (orientation: portrait) {
    .vh-82 {
        height: auto !important;
        max-height: 70vh;
    }  
}

.vw-92 {
    width: 92vw !important;
}

.letter-spacing {
    letter-spacing: 0.05em;
}

.text-editorial {
    line-height: 1.85;
    max-width: 75ch;
    text-align: center;
    opacity: 0.9;
    letter-spacing: 0.01em;
}

@media (min-width: 992px) {
    .text-editorial {
        line-height: 2;
    }
}

.press-logos img {
    max-height: 28px;
    opacity: 0.65;
    transition: opacity .3s ease;
}

.press-logos img:hover {
    opacity: 1;
}

/* Text & Background */
.main-text-color {
    color: #154859 !important;
}

a.main-text-color:hover {
    color: #154859cc !important;
}

.main-bg-color {
    background-color: #F7F4F0 !important;
}

.second-text-color {
    color: #666 !important;
}

.footer {
    color: #2a292a !important;
    font-size: 12px !important;
}

/* Carousel */
.carousel-item {
    transition: transform 2s ease-in-out;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    transition: opacity 0s 2s;
}

/* Navbar */
.navbar-toggler {
    width: 30px;
    height: 30px;
    position: relative;
    transition: all .5s ease-in-out;
    margin-right: 1rem !important;
}

.navbar-toggler,
.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggle-icon:focus {
    outline: none;
    box-shadow: none;
    border: 0;
}

.navbar-toggler span {
    margin: 0;
    padding: 0;
}

@media (max-width: 991.98px) {
    .margin-mw992 {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
}

/* Navbar Hamberger to X */
.toggler-icon {
    display: block;
    position: absolute;
    height: 2.5px;
    width: 100%;
    /* background: #daa520; */
    background: #154859;
    border-radius: 1px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all .7s ease-in-out;
}

.middle-bar {
    margin-top: 0;
}

/* State Wwhen navigation is clicked */
.navbar-toggler .top-bar {
    margin-top: 0;
    transform: rotate(135deg);
}

.navbar-toggler .middle-bar {
    opacity: 0;
    filter: alpha(opacity=0);
    transition: .7s ease-in-out;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.navbar-toggler .bottom-bar {
    margin-top: 0px;
    transform: rotate(-135deg);
}

/* State when the navbar is collapsed */
.navbar-toggler.collapsed .top-bar {
    margin-top: -18px;
    transform: rotate(0deg);
    width: 28px;
    height: 2.5px;
    /* border-radius: 50%; */
    /* background: #daa520; */
    background: #2a292a;
}
.navbar-toggler.collapsed:hover .top-bar {
    width: 8px;
}

.navbar-toggler.collapsed .middle-bar {
    opacity: 1;
    filter: alpha(opacity=100);
    transition: .5s ease-in-out;
    width: 18px;
    height: 2.5px;
    /* border-radius: 50%; */
    /* background: #154859; */
    background: #2a292a;
}

.navbar-toggler.collapsed .bottom-bar {
    margin-top: 18px;
    transform: rotate(0deg);
    width: 8px;
    height: 2.5px;
    /* border-radius: 50%; */
    /* background: #666666; */
    background: #2a292a;
}
.navbar-toggler.collapsed:hover .bottom-bar {
    width: 28px;
}
/* //End Navbar Hamberger to X */

.navbar-collapse {
    margin-left: 2rem;
    transition: all .8s ease-in-out;
}

.nav-link {
    /* margin-left: 1rem !important; */
    /* color: #154859; */
    color: #2a292a;
    display: inline-block;
}

.nav-link:focus {
    outline: none;
    box-shadow: none;
    border: 0;
}

.nav-link:hover:after,
.nav-link.active:after {
    transform: scaleX(1);
}

.nav-link:after {
    display:block;
    content: '';
    border-bottom: solid 2px #154859;  
    border-radius: 5%;
    transform-origin: 0% 50%;
    transform: scaleX(0);
    transition: transform .6s ease-in-out;
}

.nav-link:hover {
    color: #154859;
}

.navbar-nav .nav-link.active, 
.navbar-nav .nav-link.show {
    /* color:#cb9d52 ; */
    /* font-weight: 900; */
    color: #154859;
    padding-bottom: 0px;
    margin-bottom: 0.5rem;
    margin-left: 2rem;
    transition: all .6s ease-in-out;
}

.dropdown-item.active,
.dropdown-item:hover {
    color: #154859;
    background-color: transparent;
}

.animate-dropdown {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-dropdown.dropdown-animate-show {
    opacity: 1;
    transform: translateY(0);
}

.animate-dropdown li {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-dropdown.dropdown-animate-show li:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.animate-dropdown.dropdown-animate-show li:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

/* Zoom Hover */
.gallery_block {
    position: relative;
}

.gallery_block img {
    aspect-ratio: 2/3;
}

.gallery_image {
    opacity: 1;
    display: block;
    transition: .8s ease-in-out;
    backface-visibility: hidden;
}

.gallery_text {
    opacity: 1;
}

.gallery_block:hover .gallery_image {
    color: #8a5e06;
    transition: .5s ease-in-out;
}

.gallery_block:hover .gallery_text {
    opacity: 1;
}

.testimonial-page {
    height: calc(100dvh - 100px - 80px);
    height: calc(100svh - 100px - 80px);
    height: calc(100vh - 100px - 80px);
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-snap-stop: always;
}

.testimonial-container {
    height: 100%;
}

.testimonial-track {
    display: block;
}

/* ===== 1 frame = 1 screen ===== */
.frame {
    height: calc(100dvh - 100px - 80px);
    height: calc(100svh - 100px - 80px);
    height: calc(100vh - 100px - 80px);
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== inner layout ===== */
.frame-inner {
    width: 92vw;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 3vw, 4rem);
}

/* ===== image ===== */
.frame-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1vh 0;
}

.frame-image img {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ===== text ===== */
.frame-text {
    max-width: 60ch;
    width:100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.testimonial-figure {
    margin: 0;
}

.blockquote {
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.blockquote-footer {
    margin-top: 1.5rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.blockquote-footer::before {
    content: unset;
}

.review-text {
    position: relative;
}

.review-text p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 3;
}

/* .review-text::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40%;
    height: 1.5em;
    background: linear-gradient(to right, transparent, #F7F4F0 80%);
} */

.review-meta {
    margin-top: 0.5rem;
    opacity: 0.8;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
}

.review-meta a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.planner-logo {
    height: clamp(30px, 5.5vh, 85px);
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

/* SE */
@media (max-width: 599px) {
    .planner-logo {
        height: clamp(30px, 5vh, 80px);
    }
}

@media (min-width: 600px) and (max-width: 767px) and (orientation: landscape) {
    .frame {
        align-items: center !important;
    }
    
    .frame-inner {
        flex-direction: row !important;
        height: auto;
        padding: 4vh 0 2vh !important;
    }

    .frame-image img {
        max-height: 40vh;
    }
}

/* iPad / 768+ */
@media (min-width: 768px) {
    .review-text p {
        -webkit-line-clamp: 4;
    }
}

@media (max-width: 768px) {
    .frame {
        align-items: flex-start;
    }
    
    .frame-inner {
        height: auto; 
        flex: 0 0 auto;
        flex-direction: column;
        text-align: center;
        padding: 3vh 0 2vh;
    }

    .frame-image img {
        width: 100%;
        height: auto;
        max-height: 45vh;
    }

    .frame-text p {
        max-width: 90%;
    }
}

@media (min-height: 1024px) {
    .planner-logo {
        height: clamp(40px, 7vh, 90px);
    }
}

/* 1200+ */
@media (min-width: 1200px) {
    .review-text p {
        -webkit-line-clamp: 5;
    }
}

/* 1500+ */
@media (min-width: 1500px) {
    .review-text p {
        -webkit-line-clamp: 7;
    }
}

/* 2000+ */
@media (min-width: 2000px) {
    .review-text p {
        -webkit-line-clamp: 9;
    }
}

/* Form */
.form-control:focus {
    color: #154859;
    border-color: #15485940;
    box-shadow: 0 0 0 .1rem #15485940;
}

/* Reset styles for non-required fields */
.was-validated .form-control:not(:required) {
    border-color: #ced4da;
    background-color: #ffffff;
    background-image: none;
    border-color: #15485940 !important;
    box-shadow: 0 0 0 .1rem #15485940 !important;
    padding-right: calc(0em + .75rem) !important;
}

.btn-submit {
    color: #ffffff;
    background-color: #154859;
}

.btn-submit:hover,
.btn-submit:active,
.btn:first-child:active {
    color: #154859;
    background-color: #C9F2E9;
    border-color: #a6c8c1;
}

#loading {
    display: none; /* Initially hidden */
    font-size: 16px;
    color: #154859;
    /* background-color: #C9F2E9;
    border-color: #a6c8c1; */
    animation: fadeInOut 2s ease-in-out infinite;
}
@keyframes fadeInOut {
    0%, 100% {
      opacity: 0;
    }
    50% {
      opacity: 1;
    }
}

.lazy-img {
    opacity: 0;
    transform: translateY(0px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    /* will-change: opacity, transform; */
}

.lazy-img.visible {
    opacity: 1;
    transform: translateY(0);
}

.smooth-transition {
    transition: all 1s ease;
}

#backToTop {
    position: fixed;
    display: flex;
    align-items: center;
    flex-direction: column;
    bottom: 30px;
    right: 15px;
    border: none;
    padding: 6px;
    border-radius: 20px;
    cursor: pointer;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s ease;
    z-index: 1000;
    font-size: 0.8rem;
    gap:8;
    background-color: #F7F4F0;
}

#backToTop.show {
    opacity: 0.6;
    pointer-events: auto;
}

#backToTop:active {
    opacity: 0.9;
    transform: scale(0.96);
}

@media (hover: hover) and (pointer: fine) {
    #backToTop:hover {
        opacity: 1;
        color: #154859;
        transform: translateY(-2px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
}