/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Thai', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #FAFAFA;
    overflow-x: hidden;
}

/* CSS Custom Properties */
:root {
    --primary-color: #00BCD4;
    --secondary-color: #26C6DA;
    --accent-color: #4CAF50;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --bg-primary: #FAFAFA;
    --bg-white: #FFFFFF;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

.text-center {
    text-align: center;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

/* Section header variant for services */
.services-header { margin-bottom: 1.5rem; }
.section-title-teal { color: var(--primary-color); display: inline-block; }
.section-icon { color: var(--primary-color); font-size: 1.5rem; margin-bottom: 0.25rem; }

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-line {
    background: var(--accent-color);
    color: white;
}

.btn-line:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-phone {
    background: var(--primary-color);
    color: white;
}

.btn-phone:hover {
    background: #00acc1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #00acc1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transform: scale(7.2);
    transform-origin: left center;
    transition: transform var(--transition);
}

.brand-text { line-height: 1.1; }
.brand-title { font-weight: 700; font-size: 1.3rem; color: #222; }
.brand-subtitle { font-size: 0.85rem; color: #444; opacity: .85; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after { width: 36px; }

.nav-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-white);
    color: var(--text-medium);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.nav-cta { display:flex; gap: 1rem; }
.header-cta { box-shadow: 0 10px 18px rgba(0,0,0,.15); border-radius: 999px; padding: 10px 18px; font-weight: 800; }

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
    border-radius: 2px;
}

.navbar.scrolled {
    box-shadow: var(--shadow-light);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-image: url('../images/uploads/header.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 100px;
    overflow: hidden;
}

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

.hero-content {
    display: grid;
    /* Give text column a bit more room on desktop so long Thai words don't wrap */
    grid-template-columns: 1.4fr 0.6fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    max-width: 820px;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    color: #212121;
    margin-bottom: 1rem;
    line-height: 1.12;
    /* Avoid breaking Thai phrase mid-word on desktop */
    word-break: keep-all;
    overflow-wrap: normal;
}

.hero-subtitle {
    font-size: 1.75rem;
    color: #212121;
    font-weight: 700;
    margin-bottom: 1.75rem;
}

.hero-cta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.hero-eyebrow {
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.btn-hero {
    border-radius: 999px;
    padding: 14px 22px 14px 18px;
    font-size: 1.1rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    display: grid;
    place-items: center;
}

.btn-line.btn-hero {
    background: #1BB65B;
}

.btn-phone.btn-hero {
    background: #19B9C8;
}

.btn-hero .btn-text { letter-spacing: 1px; }

/* Removed hero floating image collage */

.hero-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23e0f7fa" opacity="0.3"/><circle cx="75" cy="75" r="1.5" fill="%2300bcd4" opacity="0.2"/><circle cx="50" cy="10" r="0.5" fill="%234caf50" opacity="0.4"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
    z-index: 0;
}

/* About Section */
.about {
    padding: 7.5rem 0;
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow-medium);
}

.about-text {
    max-width: 720px;
}

.about-title { font-size: 2.25rem; font-weight: 800; margin: 10px 0 14px; color: var(--text-dark); }
.section-eyebrow { color: var(--primary-color); font-weight: 700; margin-bottom: 6px; display: inline-flex; align-items:center; gap:8px }
.about-description { font-size: 1.05rem; line-height: 1.9; color: var(--text-medium); margin-bottom: 0.75rem; }
.about-quote { font-size: 1.05rem; color: var(--text-dark); font-weight: 800; margin: 0.5rem 0; }
.link-underline-teal { color: var(--primary-color); font-weight: 700; text-decoration: none; border-bottom: 3px solid var(--primary-color); padding-bottom: 4px; display: inline-block; }
.link-underline-teal:hover { opacity: 0.85; }

/* Services Section */
.services {
    padding: 5rem 0;
    background: var(--bg-primary);
    background-image: url('../images/uploads/Group 91.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 420px);
    justify-content: center;
    gap: 2.5rem 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--bg-white);
    border-radius: 22px;
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
    transition: var(--transition);
    text-align: center;
    overflow: hidden;
    border: 1px solid #eef3f5;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(0,0,0,.12);
}

/* New card structure to match reference */
.card-head {
    display: flex;
    justify-content: center;
    padding: 24px 24px 0;
}

.avatar {
    width: 162px;
    height: 162px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 30px rgba(0,0,0,.12);
}

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

.card-body {
    border-top: 1px solid #e9eef1;
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 6px 0 4px;
}

.service-subtitle {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.service-description {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}



.service-features {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    width: 320px;
    max-width: 85%;
}

.service-features li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-medium);
    text-align: left;
}

.service-features li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 0.15rem;
    color: var(--accent-color);
    font-weight: 800;
    font-size: 0.9rem;
}

/* Gallery Section */
.gallery {
    padding: 5rem 0;
    background: var(--bg-white);
}

.gallery-header { display:flex; align-items:flex-start; gap:24px; justify-content:center; margin-bottom: 10px; }
.gallery-headings { text-align:left; max-width: 960px; }
.gallery-logo img { width: 180px; height:auto; object-fit:contain; }
.gallery-headings .section-title { margin:0; }
.gallery-headings .section-subtitle { margin: 6px 0 0; text-align:left; }
.gallery-description { margin-top: 10px; color: var(--text-medium); line-height: 1.9; max-width: 860px; text-align:left; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Conditions Section */
.conditions {
    padding: 5rem 0;
    background: linear-gradient(180deg, rgba(0,188,212,0.06) 0%, rgba(0,188,212,0.02) 100%), var(--bg-white);
}

.conditions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    justify-content: center;
    align-items: center;
    margin: 2rem auto 0;
    max-width: 1100px;
}

.condition-tag {
    background: linear-gradient(180deg, #2ED8D6 0%, #0EB5C7 100%);
    color: #fff;
    border: none;
    padding: 16px 28px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 18px 28px rgba(0, 188, 212, 0.25);
}

.condition-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 36px rgba(0, 188, 212, 0.34);
}

.conditions-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2.25rem;
}

.conditions-title { font-size: 2.4rem; font-weight: 800; }
.conditions-subtitle { color: #00BFCB; font-weight: 800; margin-top: -4px; }

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background: var(--bg-white);
}
.testimonials .section-title { font-weight: 900; letter-spacing: .5px; }
.testimonials .section-subtitle { font-weight: 700; color: var(--text-dark); }

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid #e0e0e0;
}

.testimonial-full {
    grid-column: 1 / -1;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}
.testimonial-full img { width: 100%; height: auto; display:block; }

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.testimonial-rating {
    color: #ffc107;
}

.testimonial-text {
    color: var(--text-medium);
    line-height: 1.6;
    font-style: italic;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.contact-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-medium);
    line-height: 1.6;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-map {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    height: 450px;
}
.contact-map iframe { width:100%; height:100%; display:block; }

/* Body state when nav open */
body.nav-open {
    overflow: hidden;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #97EFEA 0%, #0CB6C7 100%);
    color: white;
    padding: 4rem 0 1.25rem;
}

.footer-grid { display:grid; grid-template-columns: 1.2fr 1fr; align-items:center; gap:40px; margin-bottom:30px; }

.footer-left { display:flex; flex-direction:column; align-items:center; gap:16px; }
.footer-brand-mark { width: 360px; height:auto; object-fit:contain; filter: brightness(0) invert(1); }
.footer-thai { margin-top: 8px; font-weight:800; }

.footer-right { display:flex; flex-direction:column; align-items:flex-start; }
.footer-heading { font-size:1.25rem; font-weight:800; margin-bottom:12px; }
.footer-contact-list { list-style:none; padding:0; margin:0 0 14px; display:flex; flex-direction:column; gap:10px; }
.footer-contact-list li i { width:22px; text-align:center; margin-right:8px; }
.footer-contact-list a { color:#fff; text-decoration:none; }
.footer-contact-list a:hover { text-decoration:underline; }
.footer-social-row { display:flex; gap:16px; margin-top:12px; }
.social-icon-lg { width:40px; height:40px; display:grid; place-items:center; background:rgba(255,255,255,.15); color:#fff; border-radius:8px; }
.social-icon-lg:hover { background:rgba(255,255,255,.25); }

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.footer .social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.footer .social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--secondary-color);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.lightbox-content {
    position: relative;
    max-width: min(1000px, 95vw);
    max-height: 85vh;
}

.lightbox-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.lightbox-caption {
    margin-top: 10px;
    color: #fff;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
    cursor: pointer;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll animations */
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles */
.btn:focus,
.nav-link:focus,
.social-link:focus,
.condition-tag:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-cta,
    .conditions-cta,
    .footer {
        display: none;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    body {
        background: white;
        color: black;
    }
}
