/* 
   home.css — หน้าแรก (Home Page)
/* ---------- Variables ---------- */
:root {
    --color-primary: #374780;
    --color-primary-dark: #374780;
    --color-secondary: #00abff;
    --color-light: #ffffff;
    --color-danger: #e74c3c;
    --color-text-muted: #58595B;
    --color-border: #f5f5f5;
    --color-text-dark: #303033;
}

/* ---------- Layout ---------- */
.home-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 60px 24px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.home-page {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(104vh - 156px);
    background-image: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url('/image/home-bg1.png');
    background-size: cover;
    /* background-position: right center; */
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: 310px center;
}

/* ---------- Hero (Left) ---------- */
.hero-section {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-title {
    color: var(--color-primary);
    flex: 1;
    font-size: clamp(28px, 5vw, 50px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1px;
    text-align: center;
}

.hero-subtitle {
    color: var(--color-primary);
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 700;
    flex: 1;
    margin-bottom: 24px;
    text-align: center;
}

.hero-warning {
    color: var(--color-danger);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 32px;
}

/* ---------- Search Form ---------- */
.search-form {
    width: 100%;
    max-width: 672px;
    margin: 0 auto;
}

.search-row {
    display: flex;
    flex-direction: row;
    border: 2px solid #374780;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 4px 16px rgba(55, 71, 128, 0.08);
    transition: border-color 0.3s, box-shadow 0.3s;
    justify-content: center;
    align-items: stretch;
    gap: 0px;
    overflow: hidden;
}

.search-row:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 6px 24px rgba(55, 71, 128, 0.15);
}

.search-input {
    flex: 1;
    padding: 18px 24px;
    font-size: 17px;
    color: #303033;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Google Sans', 'Helvetica Neue', Arial, sans-serif;
    min-width: 0;
}

.search-input::placeholder {
    color: #94a3b8;
}

.btn-search {
    padding: 16px 36px;
    background: linear-gradient(135deg, #374780 0%, #2c3a6e 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Google Sans', 'Helvetica Neue', Arial, sans-serif;
    white-space: nowrap;
    border-radius: 2 14px 14px 0;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.btn-search:hover {
    background: linear-gradient(135deg, #2c3a6e 0%, #1e2a5a 100%);
    box-shadow: 0 4px 12px rgba(55, 71, 128, 0.3);
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
    font-family: 'Google Sans', 'Helvetica Neue', Arial, sans-serif;
}

.btn-view-all:hover {
    color: var(--color-primary);
}

.btn-view-all svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ---------- Rules Card (Right) ---------- */
.rules-card {
    background-color: var(--color-light);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rules-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #58595B;
    text-align: center;
    margin-bottom: 24px;
}

.rules-preview-list {
    font-size: 12px;
    color: #58595B;
    line-height: 1.75;
    margin-bottom: 24px;
}

.rules-preview-list p {
    margin-bottom: 8px;
}

.rules-preview-list ul {
    padding-left: 16px;
    margin-top: 4px;
    list-style: none;
}

.rules-preview-list ul li {
    margin-bottom: 4px;
}

.rules-card-footer {
    text-align: right;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #58595B;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    font-family: 'Google Sans', 'Helvetica Neue', Arial, sans-serif;
}

.btn-read-more:hover {
    color: var(--color-primary);
}

.btn-read-more svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ---------- Hero Actions & Buttons ---------- */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    width: 100%;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-family: 'Google Sans', 'Helvetica Neue', Arial, sans-serif;
    border: 1.5px solid transparent;
}

.btn-hero-primary {
    background-color: var(--color-light);
    border-color: #cbd5e1;
    color: var(--color-text-muted);
}

.btn-hero-primary:hover {
    background-color: var(--color-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1.5px);
    box-shadow: 0 2px 8px rgba(55, 71, 128, 0.15);
}

.btn-hero-primary:active {
    transform: translateY(0);
}

.btn-hero-secondary {
    background-color: var(--color-light);
    border-color: #cbd5e1;
    color: var(--color-text-muted);
}

.btn-hero-secondary:hover {
    background-color: var(--color-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1.5px);
    box-shadow: 0 2px 8px rgba(55, 71, 128, 0.15);
}

.btn-hero-secondary:active {
    transform: translateY(0);
}

/* ---------- Responsive — Tablet (≥900px) ---------- */
@media (min-width: 900px) {
    .home-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        padding: 60px 32px;
        position: relative;
    }

    .hero-section {
        align-items: center;
        text-align: center;
        position: relative;
        justify-content: center !important;
    }

    .search-form {
        margin: 0 auto;
        position: relative;
    }
}

/* ---------- Responsive — Mobile (< 480px) ---------- */
@media (max-width: 479px) {
    .home-page {
        background-attachment: scroll;
        min-height: calc(100vh - 156px);
    }

    .home-wrapper {
        position: relative;
        padding: 32px 20px;
        gap: 20px;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 0px;
    }

    .search-form {
        width: 100%;
        max-width: 100%;
    }

    .search-row {
        position: relative;
        flex-direction: row;
        border-radius: 12px;
    }

    .search-input {
        font-size: 14px;
        padding: 14px 16px;
    }

    .btn-search {
        padding: 14px 24px;
        font-size: 14px;
    }

    .hero-actions {
        gap: 10px;
        flex-direction: column;
        width: 100%;
    }

    .btn-hero {
        width: 73%;
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* ---------- Responsive — Tablet (480px – 639px) ---------- */
@media (min-width: 480px) and (max-width: 639px) {
    .home-page {
        background-attachment: scroll;
    }

    .home-wrapper {
        padding: 36px 28px;
        position: relative;
    }

    .search-row {
        flex-direction: row;
        position: relative;
        border-radius: 14px;
    }

    .btn-search {
        padding: 16px 32px;
        position: relative;
    }

    .hero-actions {
        flex-direction: row;
    }
}

/* ---------- Responsive — Tablet Landscape (640px – 1023px) ---------- */
@media (min-width: 640px) and (max-width: 1023px) {
    .home-page {
        background-attachment: fixed;
    }

    .home-wrapper {
        padding: 36px 48px;
        position: relative;
    }

    .hero-title,
    .hero-subtitle {
        text-align: center;
        position: relative;
    }

    .search-row {
        flex-direction: row;
        position: relative;
    }

    .btn-search {
        width: auto;
        position: relative;
    }
}

/* ---------- Responsive — Desktop (≥ 1024px) ---------- */
@media (min-width: 1024px) {
    .home-page {
        background-attachment: fixed;
    }

    .home-wrapper {
        padding: 40px 64px;
        position: relative;
    }

    .search-row {
        flex-direction: row;
        position: relative;
    }

    .btn-search {
        width: auto;
        position: relative;
    }
}

/* ---------- Responsive — Large Desktop (≥ 1440px) ---------- */
@media (min-width: 1440px) {
    .home-wrapper {
        position: relative;
        padding: 48px 80px;
        max-width: 900px;
        margin: 0 auto;
    }
}