/* Base Styles & Aesthetics */
:root {
    --primary: #81c8be;
    --primary-deep: #6ab5ab;
    --text-dark: #1a2a2a;
    --text-light: #ffffff;
    --bg-light: #f4fafa;
    --glass-white-bg: rgba(255, 255, 255, 0.18);
    --glass-white-border: rgba(255, 255, 255, 0.45);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-white {
    color: var(--text-light);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Typography */
h1 {
    font-size: 5rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.subtitle {
    font-size: 1.15rem;
    font-weight: 300;
    margin-bottom: 22px;
    opacity: 0.95;
    max-width: 550px;
}

/* Custom App Backgrounds */
.bg-orange {
    background: linear-gradient(135deg, #81c8be 0%, #6ab5ab 100%);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.main-wrapper {
    position: relative;
    z-index: 10;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    padding-bottom: 10px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Navbar with Glassmorphism */
.navbar {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.glass-pill {
    background: var(--glass-white-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-white-border);
    border-radius: 50px;
    padding: 10px 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    flex: 0 0 auto;
}

.soft-shadow {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.navbar ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 20px;
}

.navbar a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.3s ease;

    /* Glassmorphism 2.0 hover base */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0);
    backdrop-filter: blur(0px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.navbar a:hover,
.navbar a.active {
    color: #ffffff;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(129, 200, 190, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}


.navbar i {
    font-size: 1.4rem;
}

/* Buttons - Glassmorphism 2.0 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Kanit', sans-serif;
    min-width: 140px;
    text-align: center;
}

.btn-white.glass-btn {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-dark);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.btn-white.glass-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    background-color: #ffffff;
}

.btn-dark.glass-btn {
    background: linear-gradient(135deg, #81c8be, #6ab5ab);
    color: #1a3a36;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 20px rgba(129, 200, 190, 0.35);
}

.btn-dark.glass-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(129, 200, 190, 0.5);
    background: linear-gradient(135deg, #6ab5ab, #5aa09a);
}

.btn-outline.glass-btn {
    background: transparent;
    color: #6ab5ab;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid #81c8be;
}

.btn-outline.glass-btn:hover {
    background: #81c8be;
    color: var(--text-light);
}

.btn-outline-white.glass-btn {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-outline-white.glass-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.book-card-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.book-card .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    min-width: 120px;
}

/* Hero Carousel */
.hero-carousel-wrapper {
    padding-top: 35px;
    padding-bottom: 30px;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    /* Extra padding so shadows/effects are not clipped */
    padding: 35px 30px 55px;
    margin: 0 -20px;
}

.hero-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Ensure no child steals horizontal touch from the carousel */
.hero-carousel,
.hero-carousel * {
    touch-action: pan-y;
}

.hero-slide {
    display: flex;
    align-items: center;
    min-width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
}

/* Carousel Navigation Arrows - Glassmorphism 2.0 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 25px rgba(129, 200, 190, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-60%) scale(1.08);
}

/* Carousel Dot Indicators */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    width: 28px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.carousel-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

/* Hero Section (shared slide layout) */
.hero-left {
    flex: 0 0 35%;
    display: flex;
    justify-content: center;
    padding-right: 20px;
    position: relative;
}

.book-container.tilt {
    position: relative;
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) scale(1.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 20;
}

.book-container.tilt:hover {
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) scale(1.05) translateY(-10px);
}

.hero-book {
    width: 345px;
    aspect-ratio: 1 / 1.414;
    object-fit: cover;
    object-position: center;
    max-width: 100%;
    border-radius: 3px 6px 6px 3px;
    border: none;
    display: block;
}

/* Book Image Wrapper — enables gradient overlay on top of img */
.book-img-wrap {
    position: relative;
    display: inline-block;
    border-radius: 3px 6px 6px 3px;
    overflow: hidden;
}

/* Stacked pages on hero wrapper */
.book-container .book-img-wrap {
    /* Page layers - creates visible thickness */
    box-shadow:
        3px 3px 0 0 #f2ede7,
        5px 5px 0 0 #ebe6e0,
        7px 7px 0 0 #e4dfda,
        9px 9px 0 0 #ddd8d3,
        11px 11px 0 0 #d6d1cc,
        14px 18px 30px rgba(0, 0, 0, 0.18);
}

/* Spine crease overlay — gradient that sits ON TOP of the image */
.book-img-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.06) 0%,
        rgba(0, 0, 0, 0.03) 35%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 100%
    );
    z-index: 5;
}

.hero-right {
    flex: 0 0 65%;
    padding-left: 40px;
}

/* About Section */
.section-spacing {
    padding: 50px 0;
}

/* Overlapping Portrait */
.overlap-portrait-wrapper {
    position: relative;
    z-index: 20;
    height: 0;
}

.overlap-portrait-wrapper .container {
    display: flex;
    justify-content: flex-end;
}

.overlap-portrait {
    transform: translateY(-50%);
    border: 5px solid #ffffff;
    box-shadow: 0 10px 30px rgba(129, 200, 190, 0.2);
}

.about {
    background-color: #ffffff;
    position: relative;
    z-index: 2;
}

.about-grid {
    display: block;
}

.about-text {
    max-width: 60%;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: #4a4d53;
}


.circle-crop {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.circle-crop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Book Series Section */
.book-series {
    background-color: var(--bg-light);
}

.series-title {
    text-align: left;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.book-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.book-card img {
    width: 100%;
    aspect-ratio: 1 / 1.414;
    object-fit: cover;
    object-position: center;
    border-radius: 3px 5px 5px 3px;
    display: block;
}

.book-card .book-img-wrap {
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Stacked pages on card wrapper */
    box-shadow:
        2px 2px 0 0 #f2ede7,
        4px 4px 0 0 #ebe6e0,
        6px 6px 0 0 #e4dfda,
        8px 8px 0 0 #ddd8d3,
        12px 16px 28px rgba(0, 0, 0, 0.2);
}

.book-card .book-img-wrap:hover {
    transform: translateY(-10px);
    box-shadow:
        2px 2px 0 0 #f2ede7,
        4px 4px 0 0 #ebe6e0,
        6px 6px 0 0 #e4dfda,
        8px 8px 0 0 #ddd8d3,
        14px 24px 35px rgba(0, 0, 0, 0.25);
}

/* Author Section */
.author-section {
    background-color: #faf5f0;
    padding: 80px 0;
}

.author-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.author-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #5a3a28;
    margin-bottom: 25px;
    font-style: italic;
}

.author-text p {
    font-size: 1rem;
    color: #6b5a4e;
    line-height: 1.8;
    margin-bottom: 18px;
}

.author-text .btn {
    margin-top: 10px;
}

.author-socials {
    display: flex;
    gap: 14px;
    margin-top: 28px;
}

.author-social-btn.glass-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(129, 200, 190, 0.3);
    background: rgba(129, 200, 190, 0.1);
    color: #6ab5ab;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(129, 200, 190, 0.1);
}

.author-social-btn.glass-btn:hover {
    background: rgba(129, 200, 190, 0.22);
    border-color: rgba(129, 200, 190, 0.6);
    box-shadow: 0 6px 20px rgba(129, 200, 190, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    color: #5aa09a;
}

.author-image {
    display: flex;
    justify-content: flex-end;
}

.author-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Footer Section */
.footer {
    background: linear-gradient(135deg, #1a3a3a 0%, #0d2626 100%);
    color: #ffffff;
    padding: 60px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-link {
    color: #8b8e94;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    body {
        background-color: var(--primary);
        color: white;
    }

    .hero-slide {
        flex-direction: column-reverse;
        text-align: center;
        padding: 0 20px;
        gap: 20px;
    }

    .hero-left,
    .hero-right {
        flex: none;
        width: 100%;
        padding: 0;
    }

    .hero-right {
        margin-bottom: 0;
    }

    .hero-book {
        width: 220px;
    }

    .hero-carousel-wrapper {
        padding-top: 20px;
        padding-bottom: 10px;
    }

    .hero-carousel {
        margin: 0;
        overflow: hidden;
        padding: 15px 0 55px;
    }

    .carousel-arrow {
        display: none;
    }

    .carousel-dots {
        bottom: 12px;
        margin-bottom: 0;
    }

    h1 {
        font-size: 2.8rem;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 1rem;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 12px;
    }

    .hero-actions {
        justify-content: center;
    }

    .logo {
        color: white;
    }

    .about-grid,
    .books-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about {
        color: var(--text-dark);
    }

    .about h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
        color: var(--text-dark);
    }

    .about-text {
        max-width: 100%;
    }

    .section-spacing {
        padding: 35px 0;
    }

    .author-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .author-socials {
        justify-content: center;
    }

    .circle-crop {
        width: 75px;
        height: 75px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

}