/* style.css - DOTH Linktree Clone */

/* --- 1. การตั้งค่าพื้นฐาน (Reset & Base) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #F2F0EB;
    /* สีพื้นหลังครีมอ่อน */
    font-family: 'Prompt', sans-serif;
    color: #333;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    /* จำกัดความกว้างไม่ให้ยืดเกินไปในจอคอม */
    padding: 40px 20px;
    text-align: center;
    background-color: #F2F0EB;
    /* ให้สีเดียวกับ Body หรือเปลี่ยนเป็น white ถ้าอยากได้การ์ดขาว */
}

/* --- 2. ส่วนหัวโปรไฟล์ (Profile Header) --- */
.profile-header {
    margin-bottom: 25px;
}

.profile-logo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

h1 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 1px;
    color: #222;
}

.bio {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

/* กล่องที่อยู่ (Location Box) */
.bio-location {
    margin-top: 15px;
    padding: 25px 20px;
    background: #ffffff;
    border-radius: 16px;
    font-size: 13px;
    text-align: left;
    display: inline-block;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.bio-location strong {
    color: #222;
    font-size: 16px;
    display: block;
    text-align: center;
    margin-bottom: 20px;
}

.phone {
    color: #333;
    font-weight: 600;
}

/* --- 3. ปุ่มโซเชียลหลัก (Main Social Buttons) --- */
.main-social-buttons {
    display: flex;
    gap: 15px;
    /* ปรับลดช่องว่างเล็กน้อยเพื่อให้พอดีมือถือ */
    margin-bottom: 35px;
    justify-content: center;
    margin-top: 25px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
}

.social-btn i {
    margin-right: 15px;
    /* ระยะห่างไอคอนกับตัวหนังสือ */
    font-size: 20px;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* สีปุ่ม Facebook & Instagram */
.fb-btn {
    background-color: #1877F2;
}

.ig-btn {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

/* --- 4. ตารางรูปภาพ IG (Instagram Grid) --- */
.ig-feed-container {
    margin-bottom: 35px;
}

.ig-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.ig-post {
    width: 100%;
    aspect-ratio: 2 / 3;
    /* อัตราส่วนภาพแนวตั้งแบบ IG Story/Reels */
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ig-post:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* --- 5. การ์ดลิงก์ทั่วไป (General Link Cards) --- */
.link-card {
    background: white;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 18px;
    border-radius: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    position: relative;
    min-height: 68px;
    border: 1px solid #EAEAEA;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.link-text {
    flex-grow: 1;
    text-align: left;
    font-weight: 500;
    font-size: 15px;
    padding-right: 10px;
    color: #444;
}

/* จัดกึ่งกลางสำหรับปุ่ม Shopee */
.shopee-center .link-text {
    text-align: center;
    padding-right: 0;
}

/* --- 6. ปุ่มคู่ (Dual Cards) --- */
.dual-card-container {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
}

.dual-item {
    flex: 1;
    display: flex;
    flex-direction: row;
    /* จัดแนวนอน (ไอคอนซ้าย ข้อความขวา) */
    align-items: center;
    justify-content: flex-start;
    /* เริ่มจากซ้าย */
    margin-bottom: 0;
    padding: 15px 12px;
    min-height: 80px;
}

.dual-item .icon-box {
    width: 40px;
    height: 40px;
    font-size: 20px;
    margin-right: 10px;
}

.dual-item .link-text {
    font-size: 13px;
    padding-right: 0;
    line-height: 1.3;
    text-align: left;
}

/* สีไอคอนต่างๆ */
.shopee {
    background-color: #ee4d2d;
}

.whatsapp {
    background-color: #25d366;
}

.member {
    background: linear-gradient(135deg, #E2C275, #A6863A);
    color: white;
}

/* --- 7. ส่วนท้าย (Footer) --- */
.footer-slogan {
    margin-top: 50px;
    margin-bottom: 15px;
    font-style: italic;
    font-weight: 500;
    color: #666;
    font-size: 14px;
    letter-spacing: 0.8px;
}

.footer-credit {
    color: #999;
    font-size: 12px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive สำหรับมือถือหน้าจอเล็กมาก */
@media (max-width: 380px) {
    .main-social-buttons {
        gap: 10px;
    }

    .social-btn {
        font-size: 13px;
        padding: 12px;
    }

    .social-btn i {
        margin-right: 8px;
    }

    .dual-item .link-text {
        font-size: 12px;
    }
}