/* --- [CSS Variables] --- */
:root {
    --c-bg-pastel: #F9E6E8; /* ชมพูพาสเทล */
    --c-bg-white: #FFFFFF;
    --c-accent: #B76E79;    /* โรสโกลด์ */
    --c-accent-dark: #965a63;
    --c-text: #4A4A4A;      /* เทาเข้ม */
    --c-text-light: #666;
    --font-header: 'Playfair Display', serif;
    --font-body: 'Kanit', sans-serif;
}

/* --- [Global Reset] --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--c-text);
    line-height: 1.7;
    background-color: var(--c-bg-white);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 0;
}

h1, h2, h3 {
    font-family: var(--font-header);
    color: var(--c-accent);
    margin-bottom: 15px;
}

h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 40px; position: relative; }
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--c-accent);
    margin: 15px auto 0;
}
h3 { font-size: 1.5rem; color: #333; }
p { margin-bottom: 15px; color: var(--c-text-light); }

.btn {
    display: inline-block;
    background-color: var(--c-accent);
    color: var(--c-bg-white);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid var(--c-accent);
    cursor: pointer;
    border: none;
}
.btn:hover {
    background-color: var(--c-accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(183, 110, 121, 0.4);
}
.btn.outline {
    background-color: transparent;
    color: var(--c-accent);
    border: 2px solid var(--c-accent);
}
.btn.outline:hover {
    background-color: var(--c-accent);
    color: white;
}

/* --- [Header / Navigation] --- */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.logo {
    font-family: var(--font-header);
    font-size: 1.8rem;
    color: var(--c-accent);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--c-text);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    cursor: pointer;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--c-accent);
    transition: width 0.3s;
}

nav ul li a:hover {
    color: var(--c-accent);
}
nav ul li a:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--c-text);
    cursor: pointer;
}

/* --- [Hero Section] --- */
.hero {
    /* เพิ่มความเข้มของพื้นหลัง (0.3 -> 0.5) เพื่อให้ตัวหนังสือชัดขึ้น */
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6)), url('unnamed.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

/* --- [About Us] --- */
#about {
    background-color: white;
    display: flex;
    align-items: center;
}
.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- [Services (Price List Style)] --- */
#services {
    background-color: var(--c-bg-pastel);
}

.service-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.card {
    background-color: var(--c-bg-white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: 350px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
    
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(183, 110, 121, 0.2);
}

.card-header-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 30px 25px;
    flex-grow: 1;
}

.card-content h3 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.6rem;
    border-bottom: 2px solid var(--c-bg-pastel);
    padding-bottom: 10px;
}

/* Price List Styles */
.price-list {
    list-style: none;
    padding: 0;
}
.price-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 8px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.price-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.price-item .name {
    font-size: 1rem;
    color: var(--c-text);
    font-weight: 500;
}
.price-item .price {
    font-weight: 700;
    color: var(--c-accent);
    font-size: 1.1rem;
    white-space: nowrap;
}
.price-item .note {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    margin-top: 2px;
}

.price-note {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin-top: 15px;
    font-style: italic;
    background: #fcfcfc;
    padding: 10px;
    border-radius: 5px;
}

/* --- [Gallery] --- */
#gallery {
    background-color: white;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    height: 300px;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2rem;
}
.gallery-item:hover .overlay {
    opacity: 1;
}

/* --- [Review Section & Form] --- */
#reviews {
    background-color: #fffafb;
    text-align: center;
}

.review-section-header {
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* Review Form */
.review-form-container {
    background: white;
    max-width: 600px;
    margin: 0 auto 40px auto;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    display: none; /* Hidden by default */
}
.review-form-container.active {
    display: block;
    animation: fadeInDown 0.5s ease;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}
.form-control:focus {
    border-color: var(--c-accent);
}

/* Star Rating */
.rating-input {
    display: flex;
    gap: 10px;
    font-size: 1.5rem;
    cursor: pointer;
}
.rating-input i {
    color: #ddd;
    transition: color 0.2s;
}
.rating-input i.active, .rating-input i:hover, .rating-input i:hover ~ i {
    color: #FFD700; 
}

/* Dynamic Review Grid */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.review-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    text-align: left;
    display: flex;
    flex-direction: column;
}
.review-stars {
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.review-text {
    font-style: italic;
    color: #555;
    flex-grow: 1;
    margin-bottom: 15px;
}
.review-author {
    font-weight: bold;
    color: var(--c-accent);
    display: flex;
    align-items: center;
    gap: 10px;
}
.review-author::before {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--c-bg-pastel);
}
.review-date {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 5px;
    display: block;
}

/* --- [Contact / Footer] --- */
footer {
    background-color: #2a2a2a;
    color: #e0e0e0;
    padding-top: 60px;
    padding-bottom: 20px;
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-info, .footer-map {
    flex: 1;
    min-width: 300px;
}
footer h2 {
    color: var(--c-accent);
    text-align: left;
    margin-bottom: 20px;
}
footer h2::after {
    margin: 15px 0 0;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.contact-item i {
    width: 30px;
    color: var(--c-accent);
    font-size: 1.2rem;
    margin-top: 5px;
}
.social-links {
    margin-top: 20px;
}
.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    text-decoration: none;
    transition: background 0.3s;
}
.social-links a:hover {
    background: var(--c-accent);
}
.copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: #888;
}

/* --- [Lightbox (Modal)] --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 5px;
    animation: zoomIn 0.3s;
}
.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.close:hover {
    color: var(--c-accent);
}

/* --- [Animations] --- */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes zoomIn {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* --- [Responsive - FIX FOR IPAD/TABLET] --- */

/* ⚠️ เพิ่มส่วนนี้เพื่อแก้ปัญหาภาพพื้นหลังเพี้ยนใน iPad/Tablet 
   (ครอบคลุมหน้าจอไม่เกิน 1366px เช่น iPad Pro)
*/
@media (max-width: 1366px) {
    .hero {
        background-attachment: scroll; /* เปลี่ยนเป็น scroll แทน fixed */
        background-position: center center;
        background-size: cover;
    }
}

/* กฎเดิมสำหรับ Mobile เล็กๆ (ยังคงไว้) */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
    }
    nav ul.active {
        display: flex;
    }
    nav ul li {
        margin: 15px 0;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .footer-content {
        flex-direction: column;
    }
}

.hero h1 {
    color: white;
    font-size: 4rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero p {
    color: #ffffff; /* เปลี่ยนเป็นสีขาวล้วนเพื่อให้ตัดกับพื้นหลัง */
    font-size: 1.4rem;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9); /* เพิ่มเงาดำเข้มเพื่อให้ตัวหนังสือลอยออกมา */
    font-weight: 600; /* เพิ่มความหนาตัวอักษร */
    animation: fadeInUp 1s ease 0.3s backwards;
}

.hero .btn {
    animation: fadeInUp 1s ease 0.6s backwards;
}
