/* Fonts are loaded via <link> tags in HTML for better mobile performance */


/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1.5s ease, visibility 1.5s;
}

.loader-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.loader-logo img {
    height: 80px;
    width: auto;
}

.loader-line {
    width: 100px;
    height: 2px;
    background: rgba(212, 175, 55, 0.2);
    position: relative;
    overflow: hidden;
}

.loader-line::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gold);
    animation: loading 2.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.floating {
    animation: float 5s ease-in-out infinite;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

:root {
    /* Color Palette - Updated to 3 colors only */
    --primary-dark: #345D3B;
    --primary-main: #4A8C4C;
    --primary-light: #A3CF8E;
    --secondary-main: #A3CF8E;
    --accent-gold: #A3CF8E;
    --bg-light: #FFFFFF;
    --bg-cream: #FFFFFF;
    --text-ink: #345D3B;
    --text-muted: #4A8C4C;
    --white: #ffffff;
    
    /* Typography */
    --font-heading: 'Yeseva One', 'Georgia', 'Times New Roman', serif;
    --font-accent: 'Ma Shan Zheng', 'STFangsong', 'FangSong', cursive, serif;
    --font-body: 'Lato', 'Helvetica Neue', 'Arial', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 5%;
    --header-height: 80px;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: scroll; /* Single scrollbar, always visible */
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-ink);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    text-align: center;
    overflow: hidden; /* html handles the scroll — prevents double scrollbar */
    width: 100%;
}

h1, h2, h3, h4, .serif {
    font-family: var(--font-heading);
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
    transition: var(--transition-smooth);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition-smooth);
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: var(--transition-smooth);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--white);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.2));
}

.hero-content {
    position: relative;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-main);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    border: 2px solid var(--primary-main);
}

.btn:hover {
    background: transparent;
    color: var(--primary-main);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(45, 106, 79, 0.2);
}

.btn-alt {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

.btn-alt:hover {
    color: var(--accent-gold);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

/* --- Reveal Animations --- */
[data-reveal] {
    opacity: 0;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal="up"], [data-reveal]:not([data-reveal="left"]):not([data-reveal="right"]):not([data-reveal="scale"]) {
    transform: translateY(40px);
}

[data-reveal="left"] {
    transform: translateX(-50px);
}

[data-reveal="right"] {
    transform: translateX(50px);
}

[data-reveal="scale"] {
    transform: scale(0.8);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translate(0) scale(1) !important;
}

/* Staggered Delay Helpers */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Hero Sections with Parallax */
.service-page-hero,
.contact-page-hero {
    height: 45vh;
    background-size: cover;
    background-position: center 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.service-page-hero {
    background-image: linear-gradient(rgba(73, 159, 104, 0.7), rgba(73, 159, 104, 0.7)), url('../assets/hero_bg.png');
}

.contact-page-hero {
    background-image: linear-gradient(rgba(73, 159, 104, 0.7), rgba(73, 159, 104, 0.7)), url('../assets/footer_bg.png');
}

/* --- Services Preview --- */
.services-preview {
    position: relative;
    background-image: linear-gradient(rgba(73, 159, 104, 0.75), rgba(73, 159, 104, 0.75)), url('../assets/specialties_bg.png');
    background-size: cover;
    background-position: center 0;
    background-repeat: no-repeat;
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 100px 5%;
    margin-bottom: 0;
}

.services-preview .section-title h2 {
    color: var(--white);
}

.services-preview .section-title .line {
    background: var(--accent-gold);
}

.service-preview-card h3 {
    color: var(--primary-dark) !important;
}

.service-preview-card p {
    color: var(--text-ink) !important;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.philosophy-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(73, 159, 104, 0.1);
}

.about-grid {
    align-items: center;
}

.about-grid .philosophy-text {
    padding-left: 50px;
}

.about-title {
    text-align: left;
    margin-bottom: 30px;
}

.about-title .line {
    margin: 15px 0;
}

.counter-box {
    margin-top: 40px;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

@media (max-width: 992px) {
    .about-grid {
        display: flex;
        flex-direction: column-reverse;
    }
    .about-grid .philosophy-text {
        padding-left: 0;
        margin-bottom: 40px;
        text-align: center;
    }
    .about-title {
        text-align: center;
    }
    .about-title .line {
        margin: 15px auto;
    }
    .counter-box {
        justify-content: center;
    }
}

/* --- Sections --- */
section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 3rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    max-width: 100%; /* Prevent text overflow */
}

.section-title .line {
    width: 60px;
    height: 4px;
    background: var(--accent-gold);
    margin: 0 auto;
    border-radius: 2px;
}

/* --- Cards Hover --- */
.service-preview-card, .service-card {
    transition: var(--transition-smooth);
}

.service-preview-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(73, 159, 104, 0.1);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    .service-card {
        flex-direction: column !important;
        gap: 30px;
    }
    .service-img {
        width: 100%;
        height: 300px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 5%;
    }
    .hero h1 { font-size: 2.8rem; }
    .nav-links { display: none; }
    .nav-cta { display: none !important; }
    nav { justify-content: center !important; }
    header.hero { height: 100vh; }
    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
/* --- Footer --- */
footer {
    background: linear-gradient(rgba(163, 207, 142, 0.9), rgba(163, 207, 142, 0.85)), url('../assets/footer_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 80px 5% 40px;
    margin-top: 0;
    position: relative;
    width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Reduced min-width */
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 60px;
    width: auto;
}

.footer-col h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 12px;
    opacity: 0.8;
}

.footer-col ul li:hover {
    opacity: 1;
    color: var(--accent-gold);
}

.copyright {
    text-align: center;
    padding: 40px 0 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.6;
}

/* FAB Menu - Mobile Only */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    display: none; /* Only show on mobile */
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.fab-container.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .fab-container { 
        display: flex; 
    }
}





.fab-main {
    width: 65px;
    height: 65px;
    background: var(--primary-main);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(52, 93, 59, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1002;
    border: 3px solid var(--white);
}

.fab-main:hover {
    transform: scale(1.05);
}

.fab-main.active {
    background: var(--accent-gold);
    color: var(--primary-dark);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.fab-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(30px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 10px;
}

.fab-container.active .fab-list {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1.0);
}

.fab-item {
    background: var(--white);
    padding: 14px 24px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    color: var(--primary-dark);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid rgba(74, 140, 76, 0.15);
}

.fab-item:hover {
    background: var(--primary-main);
    color: var(--white);
    transform: translateX(-8px);
}


/* Desktop Styles for Nos Soins - Removed as per user request */
.fixed-services-btn {
    display: none !important;
}


@media (max-width: 768px) {
    .fixed-services-btn { display: none !important; }
    .fab-container { display: flex; }
}

/* --- Blog Section --- */
.blog-page-hero {
    background-image: linear-gradient(rgba(73, 159, 104, 0.7), rgba(73, 159, 104, 0.7)), url('../assets/blog_wellness_interior.png');
    height: 45vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding-top: 80px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.blog-card {
    background: transparent; /* Remove background */
    border-radius: 0; /* Remove radius if no frame */
    overflow: hidden;
    box-shadow: none; /* Remove shadow to eliminate "frame" look */
    transition: var(--transition-smooth);
    text-align: left;
    display: flex;
    flex-direction: column;
    border: none;
}

.blog-card:hover {
    transform: translateY(-5px); /* Subtle lift without shadow */
}

.blog-card-img {
    height: 250px;
    overflow: hidden;
    position: relative;
    border-radius: 20px; /* Keep radius on image for a clean look */
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.1);
}

.blog-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent-gold);
    color: var(--primary-dark);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.blog-card-content {
    padding: 25px 0; /* Align with image edges */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.blog-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blog-card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
    line-height: 1.3;
}

.blog-card-content p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: justify; /* Better textual alignment */
}

.blog-read-more {
    margin-top: auto;
    color: var(--primary-main);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.blog-read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-read-more::after {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Blog Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    overflow: hidden; /* Prevent background scrolling */
    display: none; /* Changed back to hidden by default */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    padding: 20px;
}

/* Show modal using flex when style.display = "flex" in JS */
.modal.active {
    display: flex !important;
}


.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 20px;
    width: 95%;
    max-width: 500px; 
    max-height: 90vh; /* Don't exceed screen height */
    overflow-y: auto; /* Internal scroll if too long */
    position: relative;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    animation: modalScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin: auto;
}


@keyframes modalScale {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: fixed;
    right: 30px;
    top: 30px;
    color: var(--white);
    background: var(--primary-main);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2100;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-modal:hover {
    background: var(--accent-gold);
    transform: rotate(90deg);
}


.modal-body {
    text-align: left;
}

.modal-body img {
    width: 100%;
    height: 200px; /* Further reduced image height */
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 25px;
}

.modal-body h2 {
    font-size: 1.4rem; /* Considerably smaller title */
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.modal-body .post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modal-body .post-content {
    font-size: 0.95rem; /* More compact font size */
    line-height: 1.8;
    color: var(--text-ink);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-cream);
    padding: 10px 20px;
    border-radius: 50px;
    margin-top: 30px;
    cursor: pointer;
    font-weight: 700;
    color: var(--primary-dark);
    transition: var(--transition-smooth);
    border: none;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.share-btn:hover {
    background: var(--accent-gold);
    color: var(--white);
}

.card-share-link {
    font-size: 0.8rem;
    color: var(--primary-main);
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    background: var(--bg-cream);
    padding: 12px 20px; /* Increased for better touch target */
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(74, 140, 76, 0.1);
    position: relative;
    z-index: 10; /* Ensure it stays above the card's main surface */
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

@media (max-width: 768px) {
    .card-share-link {
        padding: 14px 22px; /* Even larger on mobile */
        font-size: 0.85rem;
    }
}


.card-share-link span {
    font-size: 0.9rem;
}

.card-share-link:hover {
    background: var(--primary-main);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 140, 76, 0.2);
}



/* Back to Top Button removed as per user request */
.back-to-top {
    display: none !important;
}






