
/* --- General Footer Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100%; /* Ensures the body is at least the full height of the viewport */
}

.main-content {
    flex-grow: 1; /* This is the key property that pushes the footer down */
}

footer {
    background-color: #FFDE59; /* สีเหลืองตามตัวอย่าง */
    color: #333;
    padding: 4rem 2rem 0; /* เพิ่ม padding ด้านบน */
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Grid layout for columns */
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

.footer-column {
    padding: 0 1rem;
}

.footer-column h3 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #996100, #998208);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
}

.footer-column p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6C6C6C;
}

.footer-column.social-media {
    /* Align social media icons to the right */
    margin-left: 100px;
}

/* --- Column 2: contactfoot Info --- */
.contactfoot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

.contactfoot-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.contactfoot-item img {
    width: 32px;
    height: 32px;
}

.contactfoot-item.location {
    grid-column: 1 / -1; /* Make location span full width */
}

.address-placeholder {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.address-placeholder .address-bar-1,
.address-placeholder .address-bar-2 {
    height: 12px;
    background-color: #D9D9D9;
    border-radius: 4px;
}

.address-placeholder .address-bar-1 {
    width: 120px;
}

.address-placeholder .address-bar-2 {
    width: 180px;
}

/* --- Column 3: Social Media --- */
.social-media ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-media ul li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #6C6C6C;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.social-media ul li a:hover {
    color: #007BFF; /* Example hover color */
}

.social-media img {
    width: 32px;
    height: 32px;
}

.contactfoot-item span {
  color: #6C6C6C; /* Sets the text color to a dark gray */
  text-align: left;
}

/* --- Footer Bottom: Copyright & Button --- */
.footer-bottom {
    background: linear-gradient(to right, #996100, #998208);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem;
    font-weight: 300;
}

.back-to-top {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: #4A4A4A;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    display: flex;
    gap: 0.5rem;
    cursor: pointer;
}

.back-to-top i {
    color: #E0E0E0;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
    .about-us {
        grid-column: 1 / -1; /* Make about section full width on tablets */
    }
}

@media (max-width: 768px) {
    .footer-column h3 {
        font-size: 1.2rem; /* ปรับเล็กลงจาก 1.5rem */
        margin-bottom: 1rem; /* ลดระยะห่างลงนิดหน่อย */
    }

    footer {
        padding-top: 2rem;
    }
    .footer-container {
        grid-template-columns: 1fr; /* Stack columns on mobile */
        text-align: center;
        gap: 1rem; /* ลดช่องว่างให้กะทัดรัด */
    }

    /* Contact info และ social */
    .contactfoot-grid {
        grid-template-columns: 1fr; /* เรียงลงมาแทน 2 คอลัมน์ */
        gap: 1rem;
    }
    .contactfoot-item {
        justify-content: center;
        text-align: center;
        font-size: 0.9rem;
    }
    
    /* Social media */
    .footer-column.social-media {
        margin-left: 0; /* ลบการขยับไปทางขวา */
    }
    .social-media ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 คอลัมน์ */
    gap: 1rem;
    justify-items: center; /* จัดให้อยู่ตรงกลาง */
    }

    .social-media ul li {
        list-style: none;
    }

    .social-media img {
        width: 40px;
        height: 40px;
    }


    /* Footer bottom */
    .footer-bottom {
        flex-direction: column;
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }
    .back-to-top {
        position: static;
        margin-top: 1rem;
    }
}