
/* ========================================
   成語典首頁
======================================== */

.cy-container {
    margin-top: 20px;
    margin-bottom: 40px;
}

.cy-container .row {
    align-items: flex-start;
}

/* ========================================
   搜尋 Hero
======================================== */

.cy-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #edf8f1 0%, #f8fcf9 100%);
    border: 1px solid #dcefe3;
    border-radius: 14px;
    padding: 38px 25px 32px;
    margin-bottom: 25px;
    text-align: center;
}

.cy-hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.cy-hero-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: #278454;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 14px rgba(39, 132, 84, 0.18);
}

.cy-hero h1 {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 700;
    color: #245b3d;
    letter-spacing: 1px;
}

.cy-hero-desc {
    color: #64766b;
    font-size: 15px;
    margin-bottom: 25px;
}

/* 搜尋框 */

.cy-search-form {
    width: 100%;
}

.cy-search-box {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 56px;
    background: #fff;
    border: 2px solid #d6e9dc;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cy-search-box:focus-within {
    border-color: #278454;
    box-shadow: 0 0 0 3px rgba(39, 132, 84, 0.1);
}

.cy-search-box input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 18px;
    font-size: 16px;
    color: #333;
    background: transparent;
}

.cy-search-box input::placeholder {
    color: #a0aaa4;
}

.cy-search-btn {
    width: 125px;
    flex-shrink: 0;
    border: none;
    background: #278454;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cy-search-btn:hover {
    background: #1d6b43;
}

.cy-search-btn i {
    margin-right: 5px;
}

.cy-search-tips {
    margin-top: 14px;
    color: #78877e;
    font-size: 13px;
}

.cy-search-tips i {
    color: #e6a23c;
    margin-right: 4px;
}



.cy-result-section {
    background: #fff;
    margin-bottom: 25px;
    padding:10px 15px;
    border-radius:8px;
}

.cy-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #edf0ed;
}

.cy-section-header h2 {
    position: relative;
    margin: 0 0 8px;
    padding-left: 13px;
    font-size: 21px;
    font-weight: 700;
    color: #303d35;
}

.cy-section-header h2:before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 4px;
    height: 20px;
    background: #278454;
    border-radius: 3px;
}
.cy-section-header h2 b{
    color:#086411;
}

.cy-section-header p {
    margin: 0;
    color: #000;
    font-size: 15px;
}

.cy-section-header strong {
    color: #278454;
    font-size: 15px;
}



.cy-word-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cy-word-card {
    display: block;
    min-width: 0;
    padding: 16px 15px;
    background: #fff;
    border: 1px solid #666;
    border-radius: 10px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.cy-word-card:hover {
    border-color: #086411;
    background: #f8fcf9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 91, 57, 0.06);
}

.cy-word-card-title {
    font-size: 19px;
    font-weight: 700;
    color: #086411;
    margin-bottom: 7px;
    line-height: 1.5;
    word-break: break-word;
}

.cy-word-card-pinyin {
    color: #000;
    font-size: 12px;
    margin-bottom: 9px;
    min-height: 16px;
    word-break: break-word;
}

.cy-word-card-meaning {
    color: #000;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 12px;
    min-height: 40px;
    word-break: break-word;
}

.cy-word-card-more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 9px;
    border-top: 1px solid #f0f3f0;
    color: #086411;
    font-size: 12px;
}

.cy-word-card-more i {
    font-size: 13px;
}



.cy-empty {
    padding: 50px 20px;
    text-align: center;
    background: #f8faf8;
    border-radius: 10px;
}

.cy-empty > i {
    font-size: 42px;
    color: #bdcbc1;
    margin-bottom: 18px;
}

.cy-empty h3 {
    font-size: 20px;
    color: #46554b;
    margin-bottom: 10px;
}

.cy-empty p {
    color: #849088;
    font-size: 14px;
}



.cy-pagination {
    margin-top: 25px;
    text-align: center;
}

.cy-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.cy-pagination .pagination li {
    margin: 0;
}

.cy-pagination .pagination li a,
.cy-pagination .pagination li span {
    display: inline-block;
    min-width: 36px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e2eae4;
    color: #52645a;
    background: #fff;
    text-decoration: none;
}

.cy-pagination .pagination li.active span {
    color: #fff;
    background: #278454;
    border-color: #278454;
}

.cy-pagination .pagination li a:hover {
    color: #278454;
    border-color: #278454;
}



.cy-right-sidebar {
    margin-bottom: 20px;
}

.cy-position-box {
    background: #fff;
    border: 1px solid #e4ece6;
    border-radius: 12px;
    padding: 18px 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(36, 90, 58, 0.03);
}

.cy-position-title {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 13px;
    border-bottom: 1px solid #edf1ed;
}

.cy-position-title > i {
    width: 30px;
    height: 30px;
    background: #eaf5ee;
    color: #278454;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cy-position-title h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #34473b;
}

.cy-position-desc {
    margin: 12px 0 15px;
    font-size: 12px;
    color: #849087;
    line-height: 1.6;
}

.cy-position-form {
    margin-bottom: 10px;
}

.cy-position-form:last-child {
    margin-bottom: 0;
}

.cy-position-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cy-position-label {
    flex-shrink: 0;
    width: 43px;
    font-size: 13px;
    color: #526359;
}

.cy-position-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 38px;
    border: 1px solid #dce7df;
    border-radius: 6px;
    padding: 0 8px;
    font-size: 14px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

.cy-position-input:focus {
    border-color: #278454;
}

.cy-position-input::placeholder {
    color: #bdc7c0;
}

.cy-position-submit {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: none;
    border-radius: 6px;
    background: #278454;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.cy-position-submit:hover {
    background: #1d6b43;
}



.cy-intro-section {
    background: #fff;
    padding: 22px 20px;
    border: 1px solid #edf0ed;
    border-radius: 10px;
    margin-bottom: 25px;
}

.cy-intro-section h2 {
    font-size: 21px;
    color: #303d35;
    margin: 0 0 16px;
    padding-left: 13px;
    border-left: 4px solid #278454;
}

.cy-intro-section > p {
    color: #66746b;
    font-size: 14px;
    line-height: 2;
    margin-bottom: 20px;
}

.cy-intro-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cy-intro-item {
    display: flex;
    gap: 13px;
    align-items: flex-start;
}

.cy-intro-item > i {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #edf7f0;
    color: #278454;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cy-intro-item strong {
    display: block;
    font-size: 14px;
    color: #3c5143;
    margin-bottom: 5px;
}

.cy-intro-item p {
    font-size: 13px;
    line-height: 1.7;
    color: #7b877f;
    margin: 0;
}

.chengyu-no-result {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.chengyu-no-result-title {
    font-size: 16px;
    color: #000;
    margin-bottom: 15px;
}

.chengyu-char-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chengyu-char-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 64px;
    padding: 0 12px;
    border: 1px solid #086411;
    border-radius: 6px;
    background: #fff;
    font-size: 22px;
    color: #086411;
    text-decoration: none;
    transition: all .2s;
}

.chengyu-char-item:hover {
    background: #086411;
    border-color: #086411;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 991px) {

    .cy-word-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cy-hero {
        padding: 30px 20px;
    }

    .cy-position-box {
        padding: 15px 12px;
    }

    .cy-position-label {
        width: 38px;
        font-size: 12px;
    }

}



@media (max-width: 767px) {

    .cy-container {
        margin-top: 12px;
    }

    .cy-hero {
        padding: 25px 15px;
        border-radius: 10px;
    }

    .cy-hero-icon {
        width: 48px;
        height: 48px;
        font-size: 21px;
        margin-bottom: 12px;
    }

    .cy-hero h1 {
        font-size: 25px;
    }

    .cy-hero-desc {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .cy-search-box {
        height: 49px;
    }

    .cy-search-box input {
        font-size: 14px;
        padding: 0 12px;
    }

    .cy-search-btn {
        width: 95px;
        font-size: 13px;
    }

    .cy-search-btn i {
        margin-right: 3px;
    }

    .cy-search-tips {
        font-size: 12px;
        line-height: 1.7;
    }

    .cy-word-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .cy-word-card {
        padding: 12px;
        border-radius: 8px;
    }

    .cy-word-card-title {
        font-size: 17px;
    }

    .cy-word-card-meaning {
        font-size: 12px;
        min-height: 36px;
    }

    .cy-section-header h2 {
        font-size: 19px;
    }

    .cy-intro-section {
        padding: 18px 15px;
    }

}



@media (max-width: 380px) {

    .cy-word-grid {
        grid-template-columns: 1fr;
    }

    .cy-search-btn {
        width: 85px;
    }

}
