/* =========================
   HOMEPAGE
========================= */

.homepage .container {
    max-width: 900px;
    margin: 30px auto;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 63, 127, 0.25);
    border-radius: 16px;
    background: white;
}

.homepage .intro {
    font-size: 1.1em;
    color: #555;
    margin: 0 0 32px 0;
    padding-top: 4px;
    line-height: 1.5;
}

.homepage .intro a {
    color: #007BFF;
    font-weight: 600;
    text-decoration: none;
}

.homepage .intro a:hover {
    text-decoration: underline;
}

.search-wrap {
    margin-bottom: 24px;
}

.tool-search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 18px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 12px;
    box-sizing: border-box;
}

.tool-search-input:focus {
    outline: none;
    border-color: #007BFF;
}

.shortcuts-section {
    margin-bottom: 28px;
    text-align: left;
}

.shortcuts-section .shortcuts-title {
    font-size: 1em;
    color: #c41e3a;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.shortcuts-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.shortcuts-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: #ffd6d6;
    color: #c41e3a;
    border: 2px solid #e8a0a0;
    transition: all 0.2s;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.shortcuts-btn:hover {
    background: #e84c4c;
    color: white;
    border-color: #b01830;
    transform: scale(1.05);
}

.tool-btn-wrap {
    position: relative;
    display: inline-flex;
}

.tool-fav {
    position: absolute;
    right: 6px;
    top: 6px;
    background: rgba(0,0,0,0.2);
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    z-index: 1;
}

.tool-fav:hover {
    color: #ffd700;
    background: rgba(0,0,0,0.3);
}

.tool-fav.is-favorite {
    color: #dc3545;
}

.tool-fav.is-favorite:hover {
    color: #ff4d5a;
}

.tool-section {
    margin-bottom: 24px;
}

.tool-section:first-of-type {
    margin-top: 0;
}

.homepage h2 {
    color: #003f7f;
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
    margin: 28px 0 16px 0;
    letter-spacing: 0.02em;
}

.tool-section:first-of-type h2 {
    margin-top: 0;
}

.homepage .tool-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.homepage .tool-btn {
    width: 180px;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #003f7f;
    color: white;
    font-weight: 600;
    font-size: 1em;
    text-decoration: none;
    border-radius: 12px;
    transition: transform 0.2s, background 0.2s;
}

.homepage .tool-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .homepage .container {
        margin: 20px 16px;
        padding: 36px 28px;
    }
    .homepage .tool-btn {
        width: 160px;
        min-height: 52px;
    }
}

@media (max-width: 600px) {
    .homepage .container {
        margin: 12px 10px;
        padding: 24px 18px;
    }
    .homepage .intro {
        font-size: 1rem;
        margin-bottom: 24px;
    }
    .homepage h2 {
        font-size: 1.1em;
        margin: 24px 0 12px 0;
    }
    .homepage .tool-grid {
        gap: 12px;
        margin-bottom: 24px;
    }
    .homepage .tool-btn {
        width: 100%;
        max-width: 100%;
        min-height: 48px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .homepage .container {
        margin: 8px 8px;
        padding: 20px 14px;
    }
    .homepage h2 {
        font-size: 1em;
    }
}
