/* =========================
   DISCOVER PAGE
========================= */

.discover-page {
    max-width: 1120px;

    margin: 24px auto 75px;

    padding: 0 20px;

    box-sizing: border-box;
}

.discover-header {
    max-width: 680px;

    margin: 0 auto 42px;

    text-align: center;
}

.discover-header h1 {
    margin: 0 0 8px;

    color: #3f351d;

    font-size: clamp(30px, 4vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.discover-header p {
    max-width: 540px;

    margin: 0 auto;

    color: #746746;

    font-size: 15px;
    line-height: 1.55;
}


/* =========================
   SECTIONS
========================= */

.discover-section {
    margin-bottom: 58px;
}

.discover-section:last-child {
    margin-bottom: 0;
}

.discover-section-header {
    margin-bottom: 20px;

    padding-bottom: 12px;

    border-bottom:
        1px solid rgba(90, 70, 20, 0.12);
}

.discover-section-header h2 {
    margin: 0 0 5px;

    color: #3f351d;

    font-size: 22px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.discover-section-header p {
    margin: 0;

    color: #7a6d4d;

    font-size: 13px;
    line-height: 1.5;
}


/* =========================
   PROJECTS
========================= */

.discover-project-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.discover-project-card {
    overflow: hidden;

    background:
        rgba(255, 250, 224, 0.96);

    border:
        1px solid rgba(90, 70, 20, 0.18);

    border-radius: 18px;

    box-shadow:
        0 4px 16px rgba(80, 60, 20, 0.07);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.discover-project-card:hover {
    transform: translateY(-3px);

    border-color:
        rgba(90, 70, 20, 0.26);

    box-shadow:
        0 9px 24px rgba(80, 60, 20, 0.11);
}

.discover-project-image {
    display: block;

    width: 100%;
    aspect-ratio: 16 / 10;

    overflow: hidden;

    background:
        rgba(255, 225, 120, 0.28);
}

.discover-project-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.35s ease;
}

.discover-project-card:hover
.discover-project-image img {
    transform: scale(1.025);
}

.discover-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            145deg,
            rgba(255, 239, 172, 0.65),
            rgba(255, 225, 120, 0.3)
        );

    color: #6a5727;

    font-size: 40px;
}

.discover-project-content {
    padding: 17px 18px 18px;
}

.discover-hobby-label {
    display: inline-flex;
    align-items: center;

    padding: 3px 8px;

    border-radius: 999px;

    background:
        rgba(216, 173, 53, 0.12);

    color: #66501d;

    font-size: 11px;
    font-weight: 650;
    line-height: 1.4;

    text-decoration: none;

    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

.discover-hobby-label:hover {
    background:
        rgba(216, 173, 53, 0.22);

    color: #49380f;
}

.discover-project-content h3 {
    margin: 10px 0 7px;

    font-size: 18px;
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: -0.01em;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.discover-project-content h3 a {
    color: #3f351d;

    text-decoration: none;
}

.discover-project-content h3 a:hover {
    color: #594512;

    text-decoration: none;
}

.discover-project-author {
    margin: 0;

    color: #847657;

    font-size: 12px;
    line-height: 1.4;
}

.discover-project-author a {
    color: #66552d;

    font-weight: 650;

    text-decoration: none;
}

.discover-project-author a:hover {
    text-decoration: underline;
}

.discover-project-date {
    color: #968867;

    white-space: nowrap;
}

.discover-project-stats {
    display: flex;
    align-items: center;

    gap: 7px;

    margin-top: 14px;
    padding-top: 12px;

    border-top:
        1px solid rgba(90, 70, 20, 0.1);

    color: #66552d;

    font-size: 12px;
}

.discover-project-stats span {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    padding: 4px 8px;

    border-radius: 999px;

    background:
        rgba(90, 70, 20, 0.055);

    font-weight: 600;
}


/* =========================
   USERS
========================= */

.discover-user-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.discover-user-card {
    padding: 24px 20px;

    text-align: center;

    background:
        rgba(255, 250, 224, 0.96);

    border:
        1px solid rgba(90, 70, 20, 0.18);

    border-radius: 18px;

    box-shadow:
        0 4px 16px rgba(80, 60, 20, 0.06);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.discover-user-card:hover {
    transform: translateY(-3px);

    border-color:
        rgba(90, 70, 20, 0.26);

    box-shadow:
        0 9px 24px rgba(80, 60, 20, 0.1);
}

.discover-user-avatar {
    width: 76px;
    height: 76px;

    margin: 0 auto 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border:
        2px solid rgba(216, 173, 53, 0.3);

    border-radius: 50%;

    background:
        rgba(255, 225, 120, 0.6);

    color: #3f351d;

    font-size: 30px;

    text-decoration: none;

    box-shadow:
        0 3px 10px rgba(80, 60, 20, 0.08);

    transition:
        transform 0.18s ease,
        border-color 0.18s ease;
}

.discover-user-avatar:hover {
    transform: scale(1.04);

    border-color:
        rgba(216, 173, 53, 0.58);
}

.discover-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discover-user-card h3 {
    margin: 0 0 8px;

    font-size: 18px;
    font-weight: 750;
    line-height: 1.25;
}

.discover-user-card h3 a {
    color: #3f351d;

    text-decoration: none;

    transition:
        color 0.18s ease;
}

.discover-user-card h3 a:hover {
    color: #594512;
}

.discover-user-bio {
    max-width: 260px;

    margin: 0 auto 14px;

    color: #716343;

    font-size: 13px;
    line-height: 1.5;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.discover-user-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 7px;

    margin: 14px 0 16px;

    color: #66552d;

    font-size: 12px;
}

.discover-user-stats span {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: 999px;

    background:
        rgba(90, 70, 20, 0.055);

    font-weight: 600;
}

.discover-profile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 7px 14px;

    box-sizing: border-box;

    border:
        1px solid rgba(90, 70, 20, 0.2);

    border-radius: 999px;

    background:
        rgba(255, 250, 224, 0.8);

    color: #574414;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.discover-profile-button:hover {
    transform: translateY(-2px);

    background:
        rgba(255, 225, 120, 0.45);

    border-color:
        rgba(90, 70, 20, 0.28);
}


/* =========================
   HOBBIES
========================= */

.discover-hobby-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.discover-hobby-card {
    position: relative;

    display: flex;
    flex-direction: column;

    gap: 6px;

    min-height: 76px;
    padding: 17px 18px;

    box-sizing: border-box;

    background:
        rgba(255, 250, 224, 0.94);

    border:
        1px solid rgba(90, 70, 20, 0.16);

    border-radius: 14px;

    color: #3f351d;

    text-decoration: none;

    box-shadow:
        0 2px 9px rgba(80, 60, 20, 0.05);

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.discover-hobby-card::after {
    content: "→";

    position: absolute;
    top: 50%;
    right: 16px;

    color: #9a843f;

    font-size: 15px;

    transform: translateY(-50%);

    transition:
        transform 0.18s ease;
}

.discover-hobby-card:hover {
    transform: translateY(-2px);

    background:
        rgba(255, 239, 172, 0.8);

    border-color:
        rgba(90, 70, 20, 0.24);

    box-shadow:
        0 5px 13px rgba(80, 60, 20, 0.08);
}

.discover-hobby-card:hover::after {
    transform:
        translate(3px, -50%);
}

.discover-hobby-card strong {
    padding-right: 24px;

    font-size: 14px;
    font-weight: 750;
    line-height: 1.3;
}

.discover-hobby-card span {
    padding-right: 24px;

    color: #817452;

    font-size: 12px;
    line-height: 1.35;
}

/* =========================
   EMPTY
========================= */

.discover-empty {
    padding: 32px 24px;

    background:
        rgba(255, 250, 224, 0.9);

    border:
        1px dashed rgba(90, 70, 20, 0.2);

    border-radius: 14px;

    color: #716343;

    font-size: 14px;
    line-height: 1.5;

    text-align: center;
}



/* =========================
   ACCESSIBILITY
========================= */

.discover-page a:focus-visible,
.discover-page button:focus-visible {
    outline: 3px solid rgba(111, 82, 18, 0.55);
    outline-offset: 3px;
}

.discover-project-image:focus-visible,
.discover-user-avatar:focus-visible,
.discover-hobby-card:focus-visible {
    border-radius: 14px;
}



/* =========================
   FOLLOW ACTIONS
========================= */

.discover-user-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 8px;
}


.discover-user-actions form {
    margin: 0;
}


.discover-follow-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 7px 15px;

    box-sizing: border-box;

    border:
        1px solid rgba(90, 70, 20, 0.24);

    border-radius: 999px;

    background:
        rgba(255, 221, 103, 0.82);

    color: #493a14;

    font-family: inherit;
    font-size: 12px;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 2px 7px rgba(80, 60, 20, 0.06);

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.discover-follow-button:hover {
    transform: translateY(-2px);

    background:
        rgba(255, 211, 72, 0.9);

    box-shadow:
        0 4px 10px rgba(80, 60, 20, 0.09);
}


/* =========================
   FOLLOW SUCCESS
========================= */

.discover-success {
    max-width: 620px;

    margin: -18px auto 32px;
    padding: 12px 16px;

    box-sizing: border-box;

    background:
        rgba(120, 150, 90, 0.12);

    border:
        1px solid rgba(100, 130, 75, 0.22);

    border-radius: 12px;

    color: #536b3f;

    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;

    text-align: center;

    box-shadow:
        0 2px 8px rgba(70, 90, 55, 0.05);
}

/* =========================
   USER MATCH
========================= */

.discover-user-match {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0 0 16px;
    padding: 6px 11px;

    border:
        1px solid rgba(100, 130, 75, 0.18);

    border-radius: 999px;

    background:
        rgba(120, 150, 90, 0.11);

    color: #536b3f;

    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

/* =========================
   INTEREST MATCH
========================= */

.discover-interest-match {
    display: inline-flex;
    align-items: center;

    margin-left: 5px;
    padding: 3px 8px;

    border: 1px solid rgba(216, 173, 53, 0.18);
    border-radius: 999px;

    background:
        rgba(255, 225, 120, 0.28);

    color: #66501d;

    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}

/* =========================
   RESPONSIVE
========================= */


@media (max-width: 800px) {

    .discover-page {
        margin-top: 20px;
        margin-bottom: 60px;
    }

    .discover-header {
        margin-bottom: 36px;
    }

    .discover-section {
        margin-bottom: 48px;
    }

    .discover-project-grid,
    .discover-user-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .discover-hobby-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {

    .discover-page {
        margin-top: 16px;
        margin-bottom: 50px;

        padding-left: 15px;
        padding-right: 15px;
    }

    .discover-header {
        margin-bottom: 32px;
    }

    .discover-header h1 {
        font-size: 30px;
    }

    .discover-header p {
        font-size: 14px;
    }

    .discover-section {
        margin-bottom: 42px;
    }

    .discover-section-header {
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .discover-section-header h2 {
        font-size: 20px;
    }

    .discover-project-grid,
    .discover-user-grid,
    .discover-hobby-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .discover-project-content {
        padding: 15px 16px 16px;
    }

    .discover-project-content h3 {
        font-size: 17px;
    }

    .discover-user-card {
        padding: 22px 17px;
    }

    .discover-user-avatar {
        width: 72px;
        height: 72px;
    }

    .discover-user-actions {
        gap: 7px;
    }

    .discover-follow-button,
    .discover-profile-button {
        min-height: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .discover-hobby-card {
        min-height: 72px;
        padding: 16px 17px;
    }

    .discover-success {
        margin-top: -12px;
        margin-bottom: 26px;
    }
}

@media (max-width: 350px) {

    .discover-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .discover-header h1 {
        font-size: 27px;
    }

    .discover-project-content {
        padding-left: 14px;
        padding-right: 14px;
    }

    .discover-user-card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .discover-user-stats {
        gap: 5px;
    }

    .discover-user-actions {
        flex-direction: column;
        width: 100%;
    }

    .discover-user-actions form {
        width: 100%;
    }

    .discover-follow-button,
    .discover-profile-button {
        width: 100%;
    }

    .discover-hobby-card {
        padding-left: 15px;
        padding-right: 15px;
    }
}


@media (prefers-reduced-motion: reduce) {

    .discover-project-card,
    .discover-project-image img,
    .discover-user-card,
    .discover-user-avatar,
    .discover-follow-button,
    .discover-profile-button,
    .discover-hobby-card,
    .discover-hobby-card::after {
        transition: none;
    }

    .discover-project-card:hover,
    .discover-user-card:hover,
    .discover-follow-button:hover,
    .discover-profile-button:hover,
    .discover-hobby-card:hover {
        transform: none;
    }

    .discover-project-card:hover
    .discover-project-image img {
        transform: none;
    }

    .discover-user-avatar:hover {
        transform: none;
    }

    .discover-hobby-card:hover::after {
        transform: translateY(-50%);
    }
}