/* =========================================
Agent Portfolio
========================================= */

.portfolio-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 120px 20px 50px;
    box-sizing: border-box;
}

/* -----------------------------
Header
------------------------------*/

.portfolio-header {
    margin-bottom: 15px;
}

.portfolio-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* 광고 관리 */
.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.25s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.back-btn:hover {
    background: #f8fafc;
    border-color: #4169e1;
    color: #4169e1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(65, 105, 225, 0.12);
}

/* 시공사례 등록 */
.portfolio-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    background: #4169e1;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.25s;
    box-shadow: 0 2px 10px rgba(65, 105, 225, 0.2);
}

.portfolio-create-btn:hover {
    background: #3157c5;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(65, 105, 225, 0.3);
}

/* -----------------------------
Grid
------------------------------*/

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* -----------------------------
Card
------------------------------*/

.portfolio-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    transition: 0.25s;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    border-color: #4169e1;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.portfolio-card,
.portfolio-card > a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.portfolio-info h3,
.portfolio-date {
    text-decoration: none;
}

/* -----------------------------
Image
------------------------------*/

.portfolio-image {
    width: 100%;
    height: 230px;
    background: #f5f5f5;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.35s;
    display: block;
}

.portfolio-card:hover img {
    transform: scale(1.05);
}

/* -----------------------------
Info
------------------------------*/

.portfolio-info {
    padding: 18px;
}

.portfolio-info h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portfolio-date {
    color: #888;
    font-size: 14px;
}

/* -----------------------------
Delete
------------------------------*/

.portfolio-card form {
    padding: 0 18px 18px;
}

.portfolio-card button {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.portfolio-card button:hover {
    background: #ef4444;
    color: #fff;
}

/* -----------------------------
Empty
------------------------------*/

.empty-portfolio {
    grid-column: 1/-1;
    text-align: center;
    padding: 100px 0;
    color: #999;
    font-size: 16px;
}

/* 제목 + 검색 */
.portfolio-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 회사명 */
.company-title h1 {
    margin: 0 0 4px;
    font-size: 28px;
    font-weight: 700;
}

.company-title p {
    margin: 0;
    color: #777;
    font-size: 15px;
}

/* 검색 */
.portfolio-search {
    display: flex;
    gap: 8px;
}

.portfolio-search input {
    width: 230px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.portfolio-search input:focus {
    outline: none;
    border-color: #4169e1;
}

.portfolio-search button {
    height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: 8px;
    background: #4169e1;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.portfolio-search button:hover {
    background: #3157c5;
}

.portfolio-filter {
    display: flex;
    gap: 8px;
    align-items: center;
}

.portfolio-filter select {
    height: 42px;
    padding: 0 35px 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.portfolio-filter input {
    width: 220px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.portfolio-filter button {
    height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: 8px;
    background: #4169e1;
    color: white;
    font-weight: 600;
}

/* -----------------------------
Tablet
------------------------------*/

@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* -----------------------------
Mobile
------------------------------*/

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .portfolio-image {
        height: 150px;
    }

    .portfolio-info {
        padding: 12px;
    }

    .portfolio-info h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .portfolio-date {
        font-size: 12px;
    }

    .portfolio-card button {
        height: 36px;
        font-size: 13px;
    }

    @media (max-width: 768px) {
        .portfolio-title-wrap {
            flex-direction: column;
            align-items: stretch;
            gap: 20px;
        }

        .portfolio-filter {
            width: 100%;
            display: flex;
            gap: 8px;
        }

        .portfolio-filter select {
            flex-shrink: 0;
        }

        .portfolio-filter input {
            flex: 1;
            width: auto;
            min-width: 0;
        }

        .portfolio-filter button {
            flex-shrink: 0;
        }
    }
}
