:root {
    --primary: #059669;
    --primary-hover: #047857;
    --bg-main: #F0FDFA;
    --card-bg: #ffffff;
    --text-main: #374151;
    --text-heading: #111827;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px -15px rgba(0, 0, 0, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
    -webkit-tap-highlight-color: transparent;
    /* Remove blue highlight on tap */
}

body {
    font-family: 'Noto Sans Thai', 'Inter', sans-serif;
    background: var(--bg-main);
    margin: 0;
    padding: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    color: #374151;
    /* Softer gray */
    line-height: 1.7;
    font-size: 16px;
    overscroll-behavior-y: none;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-family: 'Kanit', sans-serif;
    color: var(--text-heading);
    margin-top: 0;
    line-height: 1.2;
}

h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5em;
    color: #064e3b;
}

h2 {
    font-size: clamp(26px, 4vw, 32px);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 0.5em;
    color: #064e3b;
    display: inline-block;
    position: relative;
}

h3 {
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.5em;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 150px;
    background: #F0FDFA;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--primary);
    position: fixed;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    top: 0;
}


.navbar.scrolled {
    padding: 10px 150px;
    background: #F0FDFA;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.navbar.hidden {
    transform: translateY(-100%);
}


.nav-items {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.navbar .menu {
    display: flex;
    gap: 20px;
}

.navbar .menu a {
    color: #059669;
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    /* Elegant size */
    padding: 10px 20px;
    border-radius: 50px;
    /* Pill shape hover */
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.3px;
}

.navbar .menu a:active {
    transform: scale(0.95);
    background-color: rgba(5, 150, 105, 0.1);
}

.nav-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    /* Bigger */
    font-weight: 500;
    color: #059669;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-phone:hover {
    color: #047857;
}

.nav-phone::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #10b981;
    transition: all 0.3s ease;
}

.nav-phone:hover::after {
    width: 100%;
    left: 0;
}


.navbar .menu a:hover,
.navbar .menu a.active {
    color: #047857;
}

.navbar .menu a.active::after {
    width: 100%;
    left: 0;
}

.navbar .menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #10b981;
    transition: all 0.3s ease;
}

.navbar .menu a:hover::after {
    width: 100%;
    left: 0;
}

/* Hide contact info when hamburger becomes active */
@media (max-width: 992px) {
    .nav-contact {
        display: none;
    }
}

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

.navbar .logo img {
    height: 55px;
    /* Increased size for visibility */
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.8)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

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

/* Language Button */
.lang-btn {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    background: transparent;
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-btn img {
    width: 20px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.lang-btn:hover {
    background: #059669;
    background: rgba(16, 185, 129, 0.1);
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #059669;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hero-slider {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* ---- Slide ---- */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    /* Parallax Effect */
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

/* Slide Active */
.slide.active {
    opacity: 1;
}

/* ---- Overlay + Gradient + Texture ---- */
.slide::before {
    content: none;
    /* Blue overlay removed as per request */
}

/* ---- Content อยู่บน overlay ---- */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    z-index: 10;
    animation: fadeInUp 1.2s ease-out;

}

.hero-content h1 {
    font-size: clamp(32px, 5vw, 56px);
    /* Responsive sizing */
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.hero-content img {
    transition: transform 0.3s ease;
}

.hero-content img:hover {
    transform: scale(1.05);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ---- ลดขยาย Hero ทำให้ภาพคมขึ้น ---- */
.hero {
    padding: 90px 20px;
    /* เดิม 150px → ปรับลดเพื่อความคม */
}

/* Wave Divider */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: -1px;
    /* แก้รอยต่อให้เนียนสนิท */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 5;
}

.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 120px;
    /* เพิ่มความสูงของคลื่นให้ดูพริ้วไหว */
}

.custom-shape-divider-bottom .shape-fill {
    fill: #059669;
    /* สีเดียวกับ Stats Section */
}

.stats-wave .shape-fill {
    fill: #ffffff;
    /* สีขาวเพื่อให้กลมกลืนกับส่วนถัดไป */
}


.btn {
    display: inline-block;
    margin-top: 25px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 14px 32px;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-family: 'Kanit', sans-serif;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.btn:active {
    transform: scale(0.96);
}

/* Button Shine Effect */
.btn::before,
.btn-call::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 100%);
    transform: skewX(-25deg);
}

.btn:hover::before,
.btn-call:hover::before {
    animation: shine 0.75s;
}

@keyframes shine {
    100% {
        left: 125%;
    }
}

.btn.btn-line {
    display: inline-block;
    margin: 0 auto;
}

/* Section */
.section {
    padding: 60px 20px;
    text-align: center;
}

.section h2 {
    margin-bottom: 40px;
}

/* .section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #059669);
    margin: 10px auto 0;
    border-radius: 2px;
} */

/* Service Highlights */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    padding: 20px 100px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #d1fae5 0%, #ffffff 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.1);
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    fill: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* Packages */
.packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.package-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Highlight Popular Package */
.package-card.popular {
    border: 2px solid #10b981;
    transform: scale(1.05);
    z-index: 1;
}

.package-card.popular:hover {
    transform: scale(1.08) translateY(-10px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.package-card h3 {
    margin-top: 0;
    font-size: 26px;
    color: #059669;
}

.price {
    font-size: 28px;
    margin-top: 10px;
    margin-bottom: 20px;
    color: #10b981;
    font-weight: 700;
}

/* Gallery Filter */
.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid #10b981;
    color: #10b981;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Kanit', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    opacity: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.gallery img:active {
    transform: scale(0.98);
    filter: brightness(0.9);
}

.gallery img.reveal {
    opacity: 1;
    transform: translateY(0);
    animation: galleryRevealAnim 0.8s ease-out;
}

@keyframes galleryRevealAnim {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery img:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    filter: brightness(1.05);
}

/* Load More Button */
.load-more-btn {
    display: block;
    margin: 40px auto 0;
    padding: 12px 40px;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(90deg, #059669 0%, #047857 100%);
}

/* Product Gallery */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    justify-content: center;
}

.product-item {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.product-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.2);
}

.product-item img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    border-radius: 12px;
    background: #fbfbfb;
    padding: 15px;
    box-sizing: border-box;
    transition: transform 0.5s ease;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-name {
    margin-top: 15px;
    font-family: 'Kanit', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #064e3b;
    text-transform: capitalize;
    text-align: center;
    padding: 5px 10px;
    width: 100%;
}

.product-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #059669);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.product-item:hover::after {
    transform: scaleX(1);
}

/* PDF Indicator */
.pdf-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #059669;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.product-item:hover .pdf-indicator {
    color: #047857;
    transform: scale(1.1);
    opacity: 1;
}

/* Contact */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
    gap: 40px;
    text-align: left;
}

.contact-info {
    flex: 1;
    min-width: 280px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.company-desc {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 15px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.contact-item:hover {
    background: #f0fdf4;
    transform: translateX(5px);
}

.map-container {
    flex-direction: column;
    align-items: stretch !important;
    padding: 0 !important;
}

.map-container:hover {
    background: transparent !important;
    transform: none !important;
}

.contact-item i {
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item .label {
    font-weight: 600;
    color: #065f46;
    margin-right: 5px;
}

.contact-item a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #10b981;
}

.contact-buttons {
    text-align: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.05);
}

.contact-form-wrapper {
    flex: 1;
    min-width: 280px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.contact-form-wrapper h3 {
    margin-top: 0;
    color: #0a1a3a;
    flex-shrink: 0;
    /* Prevent h3 from shrinking */
}

.contact-form-wrapper form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Make form fill available space */
}

.form-group:last-child {
    margin-top: 0;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 12px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    outline: none;
}

.form-group button {
    display: block;
    margin: 0 auto;
    cursor: pointer;
}

/* Footer */
.footer {
    background: #F0FDFA;
    color: var(--text-main);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 80px 100px 40px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-width: 1100px;
    margin: 0 auto 40px;
    gap: 40px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
}

.footer-col h4 {
    color: #047857;
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-col p,
.footer-col a {
    color: #065f46;
    font-size: 15px;
    line-height: 1.6;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: #10b981;
}

.navbar .logo img {
    height: 90px;
    width: auto;
    /* filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.2)); */
    transition: height 0.3s ease;
}

.btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 40px;
}

.btn-call {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-call:hover,
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-call.secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 17px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    border: none;
    cursor: pointer;
    width: auto;
    min-width: 180px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.2);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
    background: linear-gradient(90deg, #059669 0%, #047857 100%);
}

.slide {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* กล่องสถิติ */
.stats-section {
    background: linear-gradient(to bottom, #059669 0%, #047857 100%);
    /* ปรับ Gradient ให้ขอบบนสีตรงกับคลื่นเป๊ะๆ */
    padding: 40px 50px 80px;
    /* ลด Padding บนล่างให้กระชับขึ้นอีก */
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-container {
    max-width: 800px;
    /* ลดความกว้างรวมลงอีก */
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    /* ลดขนาดคอลัมน์ขั้นต่ำ */
    gap: 10px;
    /* ลดช่องว่างระหว่างกล่อง */
    position: relative;
    z-index: 1;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 15px;
    /* ลด Padding ภายในให้เล็กสุดๆ */
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(5px);
}

.stat-box:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
}

.stat-icon-wrapper {
    width: 40px;
    /* ลดขนาดพื้นหลังไอคอน */
    height: 40px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: #10b981;
}

.stat-icon-wrapper svg {
    width: 20px;
    /* ลดขนาดไอคอน */
    height: 20px;
    fill: currentColor;
}

.stat-title {
    font-size: 12px;
    /* ลดขนาดตัวหนังสือหัวข้อ */
    color: #b0b8c4;
    margin: 0;
}

.stat-number {
    font-size: 28px;
    /* ลดขนาดตัวเลข */
    font-weight: 700;
    color: #fff;
    margin: 5px 0;
    line-height: 1;
}

.stat-number span.unit {
    font-size: 12px;
    color: #10b981;
    font-weight: 500;
    display: block;
    margin-top: 5px;
}


/* โลโก้พันธมิตร */
.partners-section {
    background: #ffffff;
    padding: 30px 0;
    overflow: hidden;
    position: relative;
}

.partners-section::before,
.partners-section::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.partners-section::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-main) 20%, rgba(240, 253, 250, 0));
}

.partners-section::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-main) 20%, rgba(240, 253, 250, 0));
}

.partners-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

#partners-logos {
    display: flex;
    gap: 60px;
    align-items: center;
    white-space: nowrap;
    /* animation removed for JS control */
    transform: translateX(0);
}

#partners-logos img {
    height: 85px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: 0.4s ease;
}

#partners-logos img:hover {
    transform: scale(1.1);
}

/* Tablet & Small Laptop (iPad Pro / Small Laptop) */
@media (min-width: 993px) and (max-width: 1350px) {

    .navbar,
    .navbar.scrolled {
        padding: 10px 40px;
    }

    .navbar .menu a {
        font-size: 16px;
        padding: 8px 15px;
    }

    .nav-items {
        gap: 15px;
    }

    .section {
        padding: 60px 80px;
        /* Reduced from 200px */
    }

    #partners-section {
        padding: 60px 80px;
        /* Reduced from 200px */
    }

    .features,
    .packages {
        padding: 20px 0;
    }
}

@media (max-width: 992px) {
    .navbar {
        position: fixed;
        background: #F0FDFA;
        flex-wrap: wrap;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 30px;
        top: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .navbar.scrolled {
        padding: 15px 30px;
    }

    .navbar .logo img {
        height: 55px;
    }

    .nav-items {
        display: none;
        order: 1;
        flex-basis: 100%;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-items.active {
        display: flex;
    }

    .navbar .menu {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 12px;
        padding-bottom: 12px;
    }

    .navbar .menu a {
        font-size: 16px;
        width: 100%;
        text-align: center;
        color: #1f2937;
        font-weight: 600;
        padding: 8px 0;
    }

    .navbar .menu a i {
        display: none;
    }

    .section {
        padding: 60px 40px;
        /* Tablet horizontal padding */
    }

    .features,
    .packages {
        padding: 20px 0;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .gallery {
        grid-template-columns: repeat(3, 1fr);
        /* 3 cols on regular tablet */
        gap: 15px;
    }

    #partners-section {
        padding: 60px 40px;
    }

    #partners-gallery,
    #portfolio-sup-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .contact-container {
        padding: 0;
        gap: 30px;
    }
}

/* Floating Buttons - Commonalities */
#backToTop,
.line-float-btn,
.fb-float-btn {
    position: fixed;
    right: 20px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: none;
    cursor: pointer;
    padding: 0;
}

#backToTop:hover,
.line-float-btn:hover,
.fb-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Back to Top Button */
#backToTop {
    bottom: 170px;
    /* Above FB (95) + 60 + 15 */
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop.show:hover {
    transform: scale(1.1) translateY(0);
}

/* Line Button */
.line-float-btn {
    bottom: 20px;
    background-color: #06C755;
    text-decoration: none;
}

.line-float-btn i {
    font-size: 32px;
    color: white;
}

/* Facebook Button */
.fb-float-btn {
    bottom: 95px;
    /* Above Line (20) + 60 + 15 */
    background: transparent;
    /* Remove background to show full logo circle */
    text-decoration: none;
}

.fb-float-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Responsive Scaling for Floating Buttons */
@media (max-width: 768px) {

    #backToTop,
    .line-float-btn,
    .fb-float-btn {
        width: 50px;
        height: 50px;
        right: 15px;
    }

    .line-float-btn {
        bottom: 15px;
    }

    .fb-float-btn {
        bottom: 80px;
        /* 15 + 50 + 15 */
    }

    #backToTop {
        bottom: 145px;
        /* 80 + 50 + 15 */
        font-size: 20px;
    }

    .line-float-btn i {
        font-size: 32px;
    }

    .fb-float-btn i {
        display: none;
        /* Hide if legacy i tag exists */
    }
}

/* Redundant floating button styles removed - consolidated above */

.social-links {
    display: flex;
    justify-content: center;
    /* จัดให้อยู่กลางจอ */
    gap: 10px;
    /* ระยะห่างระหว่างปุ่ม */
    align-items: center;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    /* กันข้อความตกรอบ */
}

/* Footer Social Links */
.footer .social-links {
    margin-bottom: 15px;
    text-align: center;
}

.footer .social-links a {
    border-color: #10b981;
    color: #10b981;
    margin: 0 10px;
    text-decoration: none;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer .social-links a .lni {
    font-size: 20px;
}

.footer .social-links a.fb {
    border-color: #1877F2;
    color: #1877F2;
}

.footer .social-links a.fb:hover {
    background: #10b981;
    color: #ffffff;
}

.footer .social-links a.line {
    border-color: #06C755;
    color: #06C755;
}

.footer .social-links a.line:hover {
    background: #06C755;
    color: white;
}

/* Lightbox */
.lightbox {
    display: none;
    /* Will be set to 'flex' by JS */
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 2100;
    /* Higher than navbar/floating buttons */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Prevent scrolling within lightbox */
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 75vh;
    object-fit: contain;
    animation: zoomIn 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    transition: transform 0.2s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #ffffff;
    font-size: 35px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2200;
}

.close:hover {
    color: #10b981;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /* Better vertical centering */
    width: auto;
    padding: 20px;
    color: white;
    font-weight: bold;
    font-size: 35px;
    transition: 0.3s ease;
    user-select: none;
    z-index: 2150;
    /* Ensure it's above the image but below close button */
    background: rgba(0, 0, 0, 0.2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev {
    left: 0;
    border-radius: 0 15px 15px 0;
}

.next {
    right: 0;
    border-radius: 15px 0 0 15px;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 25px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.zoom-btn {
    color: #f1f1f1;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.zoom-btn:hover {
    color: #10b981;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#zoom-level {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    user-select: none;
}

/* Extra Small Mobile (< 576px) */
@media (max-width: 576px) {
    .navbar {
        padding: 10px 15px;
    }

    .navbar.scrolled {
        padding: 10px 15px;
    }

    .navbar .logo img {
        height: 40px;
    }

    .navbar .menu a {
        font-size: 14px;
        padding: 8px 5px;
    }

    .hero-slider {
        height: 60vh;
    }

    .hero-content {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .hero-content img {
        height: 140px !important;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .btn-call {
        font-size: 12px;
        padding: 8px 15px;
        width: 90%;
        max-width: 280px;
    }

    .section {
        padding: 30px 15px;
    }

    .section h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .stats-container {
        padding: 0 15px;
    }

    .stats-section {
        padding: 30px 15px 60px;
    }

    .stats-container {
        gap: 15px;
    }

    .stat-box {
        padding: 18px 12px;
    }

    .stat-icon-wrapper {
        width: 35px;
        height: 35px;
        margin: 0 auto 6px;
    }

    .stat-icon-wrapper svg {
        width: 18px;
        height: 18px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-title {
        font-size: 12px;
    }

    .stat-number span.unit {
        font-size: 11px;
        margin-top: 3px;
    }

    .features,
    .packages {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .feature,
    .package {
        margin: 15px auto;
        max-width: 95%;
    }

    .gallery {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .load-more-btn {
        padding: 10px 25px;
        font-size: 13px;
        margin: 25px auto 0;
        width: 90%;
        max-width: 280px;
    }

    .gallery-item {
        margin: 10px auto;
    }

    .contact-container {
        padding: 15px;
        gap: 15px;
        flex-direction: column;
    }

    .contact-info,
    .contact-form-wrapper {
        padding: 20px 15px;
        min-width: 100%;
    }

    .contact-form-wrapper h3,
    .contact-info h3 {
        font-size: 16px;
    }

    input,
    textarea {
        font-size: 14px !important;
        padding: 10px 10px !important;
    }

    .footer {
        padding: 30px 15px 15px 15px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    #backToTop {
        bottom: 150px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .line-float-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .fb-float-btn {
        bottom: 85px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .partners-section {
        padding: 15px 0;
    }

    #partners-logos img {
        height: 45px;
    }

    #partners-logos {
        gap: 30px;
    }
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 12px 18px;
    font-weight: 600;

    width: 100%;
    max-width: 320px;
    /* คุมความกว้างบนจอใหญ่ */
    min-width: unset;
    /* ❌ ยกเลิก min-width เดิม */
}

.btn-line {
    background-color: #06C755 !important;
}

.btn-fb {
    background-color: #ffffff;
    color: #1877F2;
    border: 1px solid #1877F2;
    display: inline-block;
    margin: 0 auto;
}

.btn-fb:hover {
    background-color: #f0f7ff;
}

/* GitHub Gallery Section */
#github-gallery-section {
    background-color: #f0fdfa;
    /* Light green background */
}

#github-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

#github-gallery .gallery-item {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

#github-gallery .gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

#github-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#portfolio-sup-section h2 {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.map-link {
    color: #059669;
    /* เขียวโทนเว็บ */
    text-decoration: none;
    /* เอาขีดล่างออก */
    font-weight: 500;
}

.map-link:hover {
    color: #065f46;
    opacity: 0.85;
}

/* กล่องสถิติ */
.stats-section {
    background: linear-gradient(to bottom, #059669 0%, #047857 100%);
    /* ปรับ Gradient ให้ขอบบนสีตรงกับคลื่นเป๊ะๆ */
    padding: 40px 50px 80px;
    /* ลด Padding บนล่างให้กระชับขึ้นอีก */
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-container {
    max-width: 800px;
    /* ลดความกว้างรวมลงอีก */
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    /* ลดขนาดคอลัมน์ขั้นต่ำ */
    gap: 10px;
    /* ลดช่องว่างระหว่างกล่อง */
    position: relative;
    z-index: 1;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 15px;
    /* ลด Padding ภายในให้เล็กสุดๆ */
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(5px);
}

.stat-box:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
}

.stat-icon-wrapper {
    width: 40px;
    /* ลดขนาดพื้นหลังไอคอน */
    height: 40px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: #10b981;
}

.stat-icon-wrapper svg {
    width: 20px;
    /* ลดขนาดไอคอน */
    height: 20px;
    fill: currentColor;
}

.stat-title {
    font-size: 12px;
    /* ลดขนาดตัวหนังสือหัวข้อ */
    color: #b0b8c4;
    margin: 0;
}

.stat-number {
    font-size: 28px;
    /* ลดขนาดตัวเลข */
    font-weight: 700;
    color: #fff;
    margin: 5px 0;
    line-height: 1;
}

.stat-number span.unit {
    font-size: 12px;
    color: #10b981;
    font-weight: 500;
    display: block;
    margin-top: 5px;
}

/* ===== Portfolio Sup Gallery — responsive grid ===== */
#portfolio-sup-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 20px;
}

#partners-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 20px;
}

#partners-gallery img,
#portfolio-sup-gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

#partners-gallery img:hover,
#portfolio-sup-gallery img:hover {
    transform: translateY(-10px) scale(1.04);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.3);
}

#partners-section {
    padding: 120px 10% 80px;
    background: #f0fdfa;
}

#portfolio-sup-section {
    background: #f0fdf4;
}

#partners-section h2,
#portfolio-sup-section h2 {
    font-size: 32px;
    margin-bottom: 0;
}

@media (max-width: 768px) {

    #partners-section h2,
    #portfolio-sup-section h2 {
        font-size: 20px;
    }
}


/* Tablet */
@media (max-width: 1200px) {

    #partners-section {
        padding: 100px 50px 60px;
    }

    #partners-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    #portfolio-sup-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {

    #partners-section {
        padding: 80px 20px 50px;
    }

    #partners-gallery,
    #portfolio-sup-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    #portfolio-sup-gallery img {
        border-radius: 14px;
    }
}

/* Mobile เล็ก */
@media (max-width: 480px) {

    #partners-gallery,
    #portfolio-sup-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    #portfolio-sup-gallery img {
        border-radius: 12px;
    }
}

/* iPad: 3 columns */
@media (max-width: 1024px) {
    .product-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile: 2 columns */
@media (max-width: 600px) {
    .product-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-gallery img {
        height: 200px;
        padding: 10px;
    }
}


#portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    #portfolio-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 420px) {
    #portfolio-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}



/* ===== Partners Section ===== */
#partners-section {
    background: var(--bg-main);
}

#partners-section h2 {
    margin-bottom: 30px;
}

#partners-section {
    background: transparent;
}

/* Floating Buttons Styles consolidated above */

/* Mobile Adjustments */
@media (max-width: 768px) {
    /* Floating buttons handled in consolidated media query above */
}

/* Footer Typography Refinement */
.footer-col h4 {
    font-size: 1.125rem;
    /* 18px */
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    color: #059669;
}

.footer-col p,
.footer-col a {
    font-size: 0.95rem;
    /* ~15px */
    line-height: 1.7;
    color: #4b5563;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #10b981;
}

/* Footer Social Buttons */
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.footer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    /* Pill shape */
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 15px;
}

.footer-social-btn i {
    font-size: 18px;
}

.footer-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fb-footer {
    background-color: #1877F2;
}

.line-footer {
    background-color: #06C755;
}

/* Product Modal */
.modal {
    display: none;
    /* Will be set to 'flex' by JS */
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Let modal-content handle overflow if needed */
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    padding: 20px;
    /* Safety margin for small screens */
}

.modal-content {
    background-color: #fefefe;
    margin: 0;
    /* Centered by flex parent */
    padding: 30px;
    border-radius: 20px;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    /* Prevent modal from exceeding screen height */
    overflow-y: auto;
    /* Scrollable if content is too long */
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    color: #aaa;
    position: absolute;
    right: 25px;
    top: 15px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #059669;
}

.product-modal-body {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.product-modal-image {
    flex: 1;
    min-width: 300px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
}

.product-modal-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.product-modal-info {
    flex: 1.2;
    min-width: 300px;
    text-align: left;
}

.product-modal-info h2 {
    color: #064e3b;
    margin-top: 0;
    font-size: 32px;
}

.product-modal-info p {
    color: #4b5563;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    /* Professional PDF Red */
    color: white;
    padding: 12px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Kanit', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
    background: linear-gradient(90deg, #dc2626, #b91c1c);
}

.btn-download i {
    font-size: 20px;
}

@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        max-width: 450px;
        margin: 0;
        padding: 25px 20px;
        border-radius: 20px;
        max-height: 85vh;
    }

    .close-modal {
        right: 15px;
        top: 10px;
        font-size: 30px;
    }

    .product-modal-body {
        flex-direction: column;
        gap: 20px;
    }

    .product-modal-image {
        width: 100%;
        min-width: unset;
        padding: 15px;
        background: #f9f9f9;
        border-radius: 15px;
    }

    .product-modal-image img {
        max-height: 220px;
        width: auto;
    }

    .product-modal-info {
        text-align: center;
        width: 100%;
        min-width: unset;
    }

    .product-modal-info h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .product-modal-info p {
        font-size: 14px;
        margin-bottom: 25px;
        line-height: 1.6;
    }

    #pdf-download-container {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .btn-download {
        display: flex;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 15px;
        box-sizing: border-box;
        /* Ensure padding doesn't cause overflow */
    }

    /* Lightbox Mobile Adjustments */
    .lightbox-content {
        width: 95%;
        max-height: 60vh;
    }

    .prev,
    .next {
        padding: 15px 10px;
        font-size: 24px;
    }

    .zoom-controls {
        bottom: 40px;
        padding: 8px 15px;
        gap: 15px;
    }

    .zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    #zoom-level {
        font-size: 14px;
    }
}

/* ===== Latest News Section ===== */
#news {
    background: #f0fdf4;
}

#works {
    background: #f0fdf4;
}

#product-info {
    background: #f0fdf4 !important;
}

#product-info .section-card {
    background: #f0fdf4;
}

#portfolio-sup-section {
    background: #f0fdf4;
}

.section-card {
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    padding: 60px 60px;
    max-width: 1600px;
    margin: 0 auto;
    border: 1px solid rgba(16, 185, 129, 0.05);
}

@media (max-width: 768px) {
    .section-card {
        padding: 40px 20px;
        border-radius: 20px;
    }
}

#contact {
    background: #f0fdf4;
}

#news h2 {
    background: linear-gradient(90deg, #059669, #10b981);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 40px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.news-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(5, 150, 105, 0.15);
}

.news-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.news-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.news-card:hover .news-img-wrap img {
    transform: scale(1.06);
}

.news-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    text-align: left;
}

.news-date {
    display: inline-block;
    background: linear-gradient(90deg, #059669, #10b981);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    width: fit-content;
}

.news-text {
    font-size: 15px;
    line-height: 1.75;
    color: #374151;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1024px) {
    .news-grid {
        gap: 24px;
    }
}

@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .news-body {
        padding: 18px 20px;
    }

    .news-text {
        font-size: 14px;
    }
}

/* ===== News Modal ===== */
.news-modal-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 0;
    width: 95%;
    max-width: 860px;
    max-height: 90vh;
    overflow: hidden;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-modal-img-wrap {
    width: 100%;
    background: #f8f8f8;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-modal-img-wrap img {
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: contain;
    display: block;
}

.news-modal-info {
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.news-modal-info .news-date {
    font-size: 13px;
    font-weight: 600;
}

.news-modal-info p {
    font-size: 16px;
    line-height: 1.85;
    color: #374151;
    margin: 0;
}

@media (max-width: 600px) {
    .news-modal-content {
        max-width: 100%;
        border-radius: 16px;
    }

    .news-modal-img-wrap {
        max-height: 220px;
        border-radius: 16px 16px 0 0;
    }

    .news-modal-info {
        padding: 20px 18px 22px;
    }

    .news-modal-info p {
        font-size: 14px;
    }
}