@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f6f3eb;
    --nav-bg: #e6dfca;
    --primary-red: #7b181a;
    --primary-green: #486a34;
    --text-color: #333333;
    --white: #ffffff;
    --card-bg: #e1d3bc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* Navbar */
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

header {
    background-color: var(--nav-bg);
    padding: 15px 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
}

.logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-red);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-red);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    padding: 8px 20px;
    border-radius: 25px;
    white-space: nowrap;
}

nav ul li a:hover {
    color: var(--primary-green);
}

nav ul li a.active {
    background-color: var(--primary-red);
    color: var(--white);
}

/* Footer */
.site-footer {
    width: 100%;
    margin-top: 60px;
    font-family: inherit;
}

.footer-main {
    background-color: #f9f1cc;
    position: relative;
    padding: 40px 0;
    overflow: hidden;
}

.footer-left-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background-color: var(--primary-green);
    clip-path: polygon(0 0, 50px 0, 200px 100%, 0 100%);
    z-index: 1;
}

.footer-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding: 0 20px;
}

.footer-logo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    margin-left: 10px;
}

.footer-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid var(--primary-red);
    background-color: white;
}

.footer-company {
    flex: 1.2;
    color: #444;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-company h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--primary-green);
}

.footer-company p {
    margin: 2px 0;
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}

.footer-contact {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-contact h4 {
    margin: 0 0 10px 0;
    color: var(--primary-green);
    font-size: 1.1rem;
}

.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact ul li {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.footer-bottom {
    background-color: var(--primary-green);
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Common Layouts */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-title {
    text-align: center;
    color: var(--primary-red);
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 700;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
}

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

.btn-red:hover {
    background-color: #5c1113;
}

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

.btn-green:hover {
    background-color: #355026;
}

/* Hero Section (Home) */
.hero-wrapper {
    background-color: #fdf6f0;
    /* light pinkish */
    padding: 80px 0;
    margin-bottom: 60px;
    background-image: linear-gradient(90deg, transparent 98%, rgba(0, 0, 0, 0.03) 98%);
    background-size: 80px 80px;
    /* vertical grid lines */
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
    transform: translateY(-20px);
    /* ขยับขึ้นมานิดนึงเพื่อให้ดูกึ่งกลางมากขึ้น */
}

.hero-text h1 {
    font-size: 5rem;
    color: var(--primary-red);
    margin-bottom: 0px;
    /* Reduced to bring line closer */
    line-height: 1.1;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.hero-line-long {
    width: 100%;
    max-width: 450px;
    height: 8px;
    background-color: var(--primary-green);
    position: relative;
    margin-bottom: 20px;
    z-index: 1;
}

.hero-line-long::after {
    content: '';
    position: absolute;
    right: -10px;
    top: -5px;
    width: 18px;
    height: 18px;
    background-color: var(--primary-green);
    transform: rotate(45deg);
}

.hero-subtitle p {
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
    margin: 0;
    line-height: 1.5;
}

.hero-visuals {
    flex: 1;
    position: relative;
    height: 420px;
    /* ลดความสูงลงมาเล็กน้อย */
    display: flex;
    justify-content: center;
    align-items: center;
}

.shape-green {
    width: 240px;
    height: 320px;
    background-color: var(--primary-green);
    border-radius: 100px 0 100px 0;
    position: absolute;
    left: 40px;
    top: 10px;
    z-index: 1;
}

.shape-red {
    width: 240px;
    height: 320px;
    background-color: var(--primary-red);
    border-radius: 100px 0 100px 0;
    position: absolute;
    right: 40px;
    bottom: 10px;
    z-index: 2;
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.1);
}

.animal-img {
    position: absolute;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    object-fit: cover;
}

.img-gecko {
    width: 280px;
    height: 190px;
    top: 30px;
    left: 20px;
    z-index: 3;
    transform: rotate(-3deg);
}

.img-axolotl {
    width: 300px;
    height: 210px;
    bottom: 30px;
    right: 10px;
    z-index: 4;
    transform: rotate(3deg);
}

/* Banner Slider Section */
.banner-slider {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 0 auto 60px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.slides-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-overlay {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 30px 50px;
    border-radius: 15px;
    text-align: center;
    color: white;
    max-width: 80%;
    backdrop-filter: blur(5px);
}

.slide-overlay h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-overlay p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    font-size: 24px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 2;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active,
.dot:hover {
    background-color: white;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

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

.card-content {
    padding: 20px;
}

.card.bg-red .card-content {
    background-color: var(--primary-red);
    color: var(--white);
}

.card.bg-green .card-content {
    background-color: var(--primary-green);
    color: var(--white);
}

.card h3 {
    margin-bottom: 10px;
}

/* About Page Styles */
.timeline-box {
    background-color: #fdfaf3;
    border: 2px solid #e2d1b3;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.about-flex {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.about-flex:nth-child(even) {
    flex-direction: row-reverse;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-content {
    flex: 1;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info,
.contact-form {
    background-color: #fdfaf3;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2d1b3;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 10px;
    margin-top: 20px;
}

/* Custom Contact Page */
.contact-grid-new {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.contact-heading {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.contact-heading.red {
    color: var(--primary-red);
}

.contact-heading.green {
    color: var(--primary-green);
}

.qa-box {
    background-color: #d1a8a2;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
    color: #4a2220;
}

.qa-box p {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.qa-box p:last-child {
    margin-bottom: 0;
}

.social-links-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-icon {
    width: 45px;
    height: 45px;
    background-color: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.social-icon.fb {
    border-radius: 8px;
    font-size: 1.8rem;
    font-family: serif;
}

.social-icon.line {
    border-radius: 50%;
    font-size: 0.8rem;
}

.social-icon.ig {
    border-radius: 12px;
}

.ig-inner {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 6px;
    position: relative;
}

.ig-inner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border: 2px solid white;
    border-radius: 50%;
}

.social-pill {
    flex: 1;
    background-color: #d2e0c7;
    color: #27401c;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
}

.custom-contact-form .form-group-custom {
    margin-bottom: 20px;
}

.custom-contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--primary-red);
    margin-left: 5px;
}

.custom-contact-form input,
.custom-contact-form textarea {
    width: 100%;
    background-color: #d1a8a2;
    border: none;
    border-radius: 20px;
    padding: 15px 20px;
    font-size: 1rem;
    color: #333;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
    outline: none;
}

.custom-contact-form textarea {
    border-radius: 20px;
    resize: none;
    min-height: 120px;
}

/* Section Titles styling */
.section-title {
    background-color: var(--white);
    padding: 15px 50px;
    border-radius: 50px;
    display: table;
    margin: 0 auto 40px auto;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);
    font-weight: 700;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    overflow: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

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

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

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--primary-red);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: #000;
}

.modal-body {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.modal-image {
    width: 40%;
    border-radius: 10px;
    object-fit: cover;
}

.modal-info {
    width: 60%;
}

.modal-info h2 {
    color: var(--primary-green);
    margin-bottom: 15px;
    font-size: 2rem;
}

.modal-info p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #444;
}

@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }

    .modal-image,
    .modal-info {
        width: 100%;
    }
}

/* Buttons */
.btn-outline {
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: inherit;
}

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

/* Responsive Design */
@media (max-width: 1100px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        transform: none;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .hero-line-long {
        margin: 15px auto;
    }

    .hero-visuals {
        height: 350px;
        width: 100%;
        max-width: 500px;
    }

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

    .footer-left-shape {
        display: none;
    }

    .footer-logo {
        margin: 0 auto;
    }

    .footer-contact ul li {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.8rem;
        white-space: normal;
    }

    .cards-grid,
    .cards-grid-2col {
        grid-template-columns: 1fr !important;
    }

    .about-flex,
    .about-flex:nth-child(even) {
        flex-direction: column;
        text-align: center;
    }

    .contact-grid,
    .contact-grid-new {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-title {
        font-size: 1.8rem;
        padding: 12px 30px;
    }

    .banner-slider {
        height: 300px;
    }

    .slide-overlay {
        padding: 20px;
        max-width: 95%;
    }

    .slide-overlay h2 {
        font-size: 1.8rem;
    }

    .slide-overlay p {
        font-size: 1rem;
    }

    .hero-visuals img {
        transform: scale(0.8);
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }

    .logo img {
        width: 50px;
        height: 50px;
    }

    nav ul {
        gap: 10px;
    }

    nav ul li a {
        font-size: 0.95rem;
        padding: 6px 12px;
    }

    .section-title {
        font-size: 1.4rem;
        padding: 10px 20px;
    }
}

/* Web App Mobile Bottom Nav */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    justify-content: space-around;
    padding: 10px 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #777;
    text-decoration: none;
    font-size: 0.75rem;
    transition: 0.3s;
}

.mobile-bottom-nav a.active {
    color: var(--primary-red);
    font-weight: 700;
}

.mobile-bottom-nav .icon {
    font-size: 1.5rem;
    margin-bottom: 3px;
}

@media (max-width: 768px) {
    header nav {
        display: none;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 70px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .hero-visuals {
        height: 250px;
    }
}

/* Fix Hero Mobile */
@media (max-width: 768px) {
    .hero-wrapper {
        height: auto;
        min-height: auto;
        padding: 40px 0;
    }

    .hero-visuals {
        height: 350px;
        margin-top: 20px;
        transform: scale(0.9);
    }

    .shape-green {
        width: 160px;
        height: 220px;
        left: 10px;
    }

    .shape-red {
        width: 140px;
        height: 200px;
        right: 10px;
        bottom: 20px;
    }

    .img-gecko {
        width: 200px;
        height: 135px;
        top: 20px;
        left: -10px;
    }

    .img-axolotl {
        width: 220px;
        height: 150px;
        bottom: 40px;
        right: -10px;
    }
}

/* Scroll to Top Button */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 99;
    font-size: 24px;
    border: none;
    outline: none;
    background-color: var(--primary-red);
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.3s;
    align-items: center;
    justify-content: center;
}

#scrollTopBtn:hover {
    background-color: var(--primary-green);
    transform: translateY(-5px);
}

@media (min-width: 769px) {
    #scrollTopBtn {
        bottom: 40px;
        right: 40px;
    }
}
