/* 首頁主視覺 */
.hero {
    max-width: 1440px;
    margin: 0 auto;
    padding: 65px 40px 25px;
    text-align: center;
    position: relative;
}
.hero-content {
    margin-bottom: 38px;
}
.hero-tagline { /* 橘色小標籤 */
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    background: #ffe8d5;
    color: #a35b2e;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 25px;
}
.hero h1 {
    font-size: clamp(36px, 5vw, 68px);
    font-weight: 800;
    letter-spacing: 2px; /* 控制字元之間的距離 */
    line-height: 1.4;
}
.hero h1 span {
    color: var(--primary);
}
.hero-description {
    margin-top: 18px;
    font-size: 18px;
    line-height: 1.9;
    color: var(--text-gray);
}

/* Search 搜尋欄位 */
.search-box {
    background: var(--white);
    border-radius: 32px;
    padding: 20px 25px;

    display: flex;
    align-items: center;
    gap: 18px;

    box-shadow: 0 12px 35px rgba(184, 119, 66, 0.08);
}
.search-field {
    flex: 1;
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 18px;

    padding: 5px 18px;
    border-right: 1px solid #eee2d8;
}
.search-field > svg { /* 搜尋欄位的 Icon */
    width: 30px;
    height: 30px;
    flex-shrink: 0; /* 不允許這個 Icon 因為 Flexbox 空間不足而縮小 */
    color: var(--primary);
}
.field-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.field-content label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}
.field-content select {
    width: 100%;
    border: none; /* 移除選單的預設邊框 */
    outline: none; /* 移除輪廓線 */
    background: transparent;
    color: var(--text-gray);
    font-size: 14px;
    cursor: pointer;
}
.location-field {
    position: relative;
}
.location-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    padding: 0;

    border: none;
    outline: none;
    background: transparent;
    box-shadow: none;
    appearance: none;

    color: var(--text-gray);
    font-size: 14px;
    font-weight: 400;
    text-align: left;

    cursor: pointer;
}
.location-trigger svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-gray);
}
.location-trigger:focus-visible { /* 鍵盤操作時的焦點提示 */
    outline: 2px solid var(--primary);
    outline-offset: 5px;
    border-radius: 4px;
}
.location-dropdown[hidden] { /* 預設隱藏下拉面板 */
    display: none;
}
.location-dropdown { /* 展開後的白色浮動面板 */
    position: absolute;
    z-index: 20;
    top: calc(100% + 12px);
    left: 0;
    width: min(440px, 85vw);
    padding: 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(80, 54, 35, 0.14);
}
.location-dropdown-content { /* 縣市與行政區左右排列 */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.location-option { /* 縣市與行政區欄位 */
    min-width: 0;
    text-align: left;
}
.location-option label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}
.location-option select { /* 縣市與行政區下拉選單 */
    width: 100%;
    padding: 12px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fffaf5;
    color: var(--text-dark);
    font-size: 14px;
    cursor: pointer;
}
.location-option select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.location-option select:disabled {
    color: #aaaaaa;
    background: #f7f7f7;
    cursor: not-allowed;
}
.search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    background: var(--primary);
    color: white;
    border: none;
    border-radius: 35px;

    padding: 20px 32px;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;

    transition: background 0.2s, transform 0.2s; /* 設定滑鼠移入時的過渡效果 */
}
.search-button svg {
    width: 23px;
    height: 23px;
}
.search-button:hover { /* 滑鼠移入時的效果 */
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Become a Tutor 成為家教 */
.become-tutor {
    max-width: 1360px;
    margin: 28px auto;
    padding: 0 20px;
}
.tutor-content {
    background: linear-gradient( /* 設定漸層背景 */
        110deg,
        #fff0df 0%,
        #ffead6 100%
    );
    border-radius: 32px;
    padding: 35px 40px;

    display: flex;
    flex-direction: column; /* 設定為垂直排列 */
    align-items: center;
    gap: 16px;
    text-align: center;
}
.tutor-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #ffdfc4;

    display: flex;
    align-items: center;
    justify-content: center;
}
.tutor-icon svg {
    width: 42px;
    height: 42px;
    color: var(--primary);
}
.tutor-content h2 {
    font-size: 30px;
    font-weight: 800;
}
.tutor-description {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.8;
}
.tutor-benefits {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* 允許換行 */
    gap: 30px;
    margin: 8px 0;
}
.tutor-benefit {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 600;
}
.tutor-benefit svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}
.btn-become-tutor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 15px 32px;
    border-radius: 30px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 16px;

    transition: background 0.2s, transform 0.2s; /* 設定滑鼠移入時的過渡效果 */
}
.btn-become-tutor:hover { /* 滑鼠移入時的效果 */
    background: var(--primary-dark);
    transform: translateY(-2px);
}
.btn-become-tutor svg {
    width: 20px;
    height: 20px;
}

/* Features 平台特色 */
.features {
    max-width: 1360px;
    margin: 28px auto;
    padding: 0 25px;

    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 設定為四欄的網格 */
    gap: 20px;
}
.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 18px 10px;
}
.feature-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid #ffddc4;
    background: #fff1e5;

    display: flex;
    align-items: center;
    justify-content: center;
}
.feature-icon svg {
    width: 30px;
    height: 30px;
    color: var(--primary);
}
.feature-item h3 {
    font-size: 18px;
    margin-bottom: 6px;
}
.feature-item p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
}

/* Popular Subjects 熱門科目 */
.popular-subjects {
    max-width: 1360px;
    margin: 25px auto 70px;
    padding: 30px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.85);
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.section-header h2 {
    font-size: 25px;
}
.section-header a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
}
.section-header a svg {
    width: 19px;
    height: 19px;
}
.subject-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.subject-card {
    min-height: 120px;
    border-radius: 18px;
    border: 1px solid #f5e9df;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    font-size: 16px;
    font-weight: 700;

    transition: transform 0.2s, box-shadow 0.2s; /* 設定滑鼠移入時的過渡效果 */
}
.subject-card:hover { /* 滑鼠移入時的效果 */
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.subject-card svg {
    width: 35px;
    height: 35px;
}
.math {
    background: #fff0ed;
    color: #e47770;
}
.english {
    background: #fff5df;
    color: #d99a28;
}
.chinese {
    background: #effaf2;
    color: #5fc784;
}
.science {
    background: #eef8ff;
    color: #58b9ee;
}
.social {
    background: #f5f0ff;
    color: #9b7ae0;
}

/* RWD 平板 */
@media (max-width: 1100px) {
    .hero {
        padding: 55px 25px 25px;
    }
    .search-box {
        flex-wrap: wrap;
    }
    .search-field {
        flex: 1 1 28%;
    }
    .search-button {
        width: 100%;
    }
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    .subject-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* RWD 手機 */
@media (max-width: 600px) {
    .hero {
        padding: 45px 16px 20px;
    }
    .hero-tagline {
        font-size: 12px;
    }
    .hero h1 {
        font-size: 30px;
        letter-spacing: 0;
    }
    .hero-description {
        font-size: 14px;
    }
    .hero-description br {
        display: none;
    }
    .search-box {
        flex-direction: column;
        padding: 20px;
        border-radius: 22px;
        gap: 12px;
    }
    .search-field {
        width: 100%;
        flex: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 12px 5px;
    }
    .search-button {
        padding: 16px;
        font-size: 15px;
    }
    .features {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 0 15px;
    }
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .feature-item h3 {
        font-size: 15px;
    }
    .feature-item p {
        font-size: 12px;
    }
    .feature-icon {
        width: 50px;
        height: 50px;
    }
    .popular-subjects {
        margin: 20px 15px 45px;
        padding: 20px 15px;
    }
    .section-header h2 {
        font-size: 21px;
    }
    .section-header a {
        font-size: 12px;
    }
    .subject-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .subject-card {
        min-height: 105px;
    }
    .become-tutor {
        margin: 20px auto;
        padding: 0 15px;
    }
    .become-tutor h2 {
        font-size: clamp(18px, 4.5vw, 24px);
        letter-spacing: -0.5px;
        line-height: 1.5;
        white-space: nowrap;
    }
    .tutor-content {
        padding: 30px 20px;
    }
    .tutor-description {
        font-size: 14px;
    }
    .tutor-description br {
        display: none;
    }
    .tutor-benefits {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}