/* =========================================
   JOUK - OTHER USER PROFILE
   PART 1
========================================= */

:root {
    --bg: #f8f5ef;
    --card: #faf7f0;
    --text: #24211e;
    --muted: #6f6a62;
    --green: #1f382b;
    --border: #ded8cd;
    --gold: #d99b28;

    --serif: "Playfair Display", serif;
    --sans: "Plus Jakarta Sans", sans-serif;
}


/* =========================================
   GENERAL
========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font-family: inherit;
}


/* =========================================
   HEADER
========================================= */

.profile-header,
.main-header {
    width: 92%;
    max-width: 1100px;
    height: 72px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}


/* LOGO */

.logo {
    position: absolute;
    left: 0;

    font-family: var(--serif);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 4px;

    color: var(--text);
    text-decoration: none;
}


/* NAVIGATION */

.profile-header nav,
.main-header nav {
    display: flex;
    align-items: center;
    gap: 42px;
}

.profile-header nav a,
.main-header nav a {
    color: var(--text);
    text-decoration: none;

    font-size: 12px;
    font-weight: 400;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.profile-header nav a:hover,
.main-header nav a:hover {
    opacity: 0.65;
    transform: translateY(-1px);
}


/* HEADER ICONS */

.header-icons {
    position: absolute;
    right: 0;

    display: flex;
    align-items: center;
    gap: 14px;
}

.icon-btn {
    border: 0;
    background: transparent;

    padding: 0;

    font-size: 23px;
    line-height: 1;

    color: var(--text);

    cursor: pointer;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.icon-btn:hover {
    opacity: 0.65;
    transform: translateY(-1px);
}

.profile-icon {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text);
    text-decoration: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.profile-icon:hover {
    opacity: 0.65;
    transform: translateY(-1px);
}

.profile-icon svg {
    width: 100%;
    height: 100%;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}


/* =========================================
   MAIN PROFILE CARD
========================================= */

.profile-page {
    width: 92%;
    max-width: 850px;

    margin: 0 auto 60px;

    background: var(--card);

    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 3px 20px rgba(0, 0, 0, 0.035);
}


/* =========================================
   COVER
========================================= */

.profile-cover {
    width: 100%;
    height: 230px;

    position: relative;

    overflow: hidden;
}

.cover-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    transition: transform 0.8s ease;
}

.profile-cover:hover .cover-image {
    transform: scale(1.015);
}


/* =========================================
   PROFILE INFORMATION
========================================= */

.profile-info {
    position: relative;

    text-align: center;

    padding: 72px 28px 24px;
}


/* =========================================
   AVATAR
========================================= */

.avatar-wrapper {
    width: 132px;
    height: 132px;

    position: absolute;

    top: -66px;
    left: 50%;

    transform: translateX(-50%);

    border-radius: 50%;
}

.profile-avatar {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    border-radius: 50%;

    border: 5px solid var(--card);
}


/* =========================================
   USER NAME
========================================= */

.profile-info h1 {
    margin: 0 0 7px;

    font-family: var(--serif);

    font-size: 29px;
    line-height: 1.1;

    font-weight: 600;
}


/* =========================================
   BIO
========================================= */

.profile-bio {
    margin: 0 0 9px;

    font-size: 11px;

    color: var(--muted);
}


/* =========================================
   LOCATION
========================================= */

.profile-location {
    margin: 0 0 24px;

    font-size: 11px;

    color: #56514b;
}


/* =========================================
   STATS
========================================= */

.profile-stats {
    width: 500px;
    max-width: 100%;

    margin: 0 auto 22px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);

    align-items: center;
}

.stat {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 2px;

    position: relative;
}

.stat:not(:last-child)::after {
    content: "";

    position: absolute;

    top: 5px;
    right: 0;

    width: 1px;
    height: 35px;

    background: #e5dfd4;
}

.stat strong {
    font-family: var(--serif);

    font-size: 20px;
    line-height: 1;

    font-weight: 600;
}

.stat span {
    margin-top: 4px;

    font-size: 9px;

    color: var(--muted);
}


/* =========================================
   PROFILE ACTIONS
========================================= */

.profile-actions {
    width: 620px;
    max-width: 100%;

    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr 55px;

    gap: 10px;
}

.message-btn {
    height: 45px;

    border: 0;
    border-radius: 8px;

    background: var(--green);
    color: white;

    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    text-decoration: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.message-btn:hover {
    opacity: 0.94;

    transform: translateY(-1px);

    box-shadow:
        0 5px 14px rgba(31, 56, 43, 0.16);
}

.more-btn {
    height: 45px;

    border: 1px solid #d8d2c8;
    border-radius: 8px;

    background: transparent;

    color: var(--text);

    font-size: 20px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.more-btn:hover {
    background: #f2ede4;
    transform: translateY(-1px);
}


/* =========================================
   TABS
========================================= */

.profile-tabs {
    width: 100%;
    height: 55px;

    padding: 0 28px;

    display: flex;
    align-items: center;

    gap: 48px;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tab {
    height: 100%;

    position: relative;

    padding: 0 5px;

    border: 0;
    background: transparent;

    color: #5f5a54;

    font-family: var(--sans);
    font-size: 11px;

    cursor: pointer;

    transition: color 0.25s ease;
}

.tab.active {
    color: var(--text);
    font-weight: 600;
}

.tab.active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 2px;

    background: var(--green);
}


/* =========================================
   TAB PANELS
========================================= */

/*
   Only the selected tab section is displayed.

   other-profile.js will move the "active"
   class between these panels.
*/

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}


/* =========================================
   PROFILE SECTIONS
========================================= */

.profile-section {
    padding: 20px 28px 30px;
}

.section-heading {
    margin-bottom: 13px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-heading h2 {
    margin: 0;

    font-family: var(--serif);

    font-size: 18px;
    font-weight: 600;
}

.see-all {
    padding: 0;

    border: 0;
    background: transparent;

    color: #49453f;

    font-family: var(--sans);
    font-size: 10px;

    cursor: pointer;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.see-all:hover {
    opacity: 0.65;
    transform: translateX(2px);
}


/* =========================================
   PLACES VISITED
========================================= */

.places-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 11px;
}

.place-card {
    min-width: 0;

    margin: 0;
}

.place-card a {
    display: block;

    color: inherit;

    text-decoration: none;
}

.place-card img {
    width: 100%;
    height: 105px;

    display: block;

    object-fit: cover;

    border-radius: 7px;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.place-card a:hover img {
    transform: translateY(-2px);

    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.10);
}

.place-card h3 {
    margin: 6px 0 0;

    font-family: var(--serif);

    font-size: 12px;
    font-weight: 600;
}


/* =========================================
   EXPERIENCES
========================================= */

.experiences-section {
    padding-top: 20px;
    padding-bottom: 30px;
}

.experiences-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
}

.experience-card {
    min-width: 0;

    overflow: hidden;

    background: #fff;

    border: 1px solid #e5dfd5;
    border-radius: 8px;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.experience-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 7px 18px rgba(0, 0, 0, 0.07);
}

.experience-card > img {
    width: 100%;
    height: 180px;

    display: block;

    object-fit: cover;
}

.experience-content {
    padding: 10px 11px 9px;
}

.experience-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.experience-title h3 {
    margin: 0;

    font-family: var(--serif);

    font-size: 14px;
    font-weight: 600;
}

.rating {
    flex-shrink: 0;

    color: var(--gold);

    font-size: 11px;
}

.experience-content p {
    min-height: 34px;

    margin: 5px 0 10px;

    color: #57524c;

    font-size: 9px;
    line-height: 1.5;
}


/* =========================================
   EXPERIENCE ACTIONS
========================================= */

.experience-actions {
    padding-top: 8px;

    border-top: 1px solid #eee9e1;

    display: flex;
    align-items: center;

    gap: 15px;

    color: #514c46;

    font-size: 10px;
}

.like-btn,
.comment-btn,
.bookmark-btn {
    padding: 0;

    border: 0;

    background: transparent;

    color: #514c46;

    font-family: var(--sans);
    font-size: 10px;

    cursor: pointer;

    display: flex;
    align-items: center;

    gap: 4px;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.like-btn:hover,
.comment-btn:hover,
.bookmark-btn:hover {
    opacity: 0.65;
    transform: translateY(-1px);
}

.like-btn.active,
.bookmark-btn.active {
    color: var(--green);
    font-weight: 600;
}

.bookmark-btn {
    margin-left: auto;
}
/* =========================================
   JOUK - OTHER USER PROFILE
   PART 2
========================================= */


/* =========================================
   PHOTOS
========================================= */

.photos-section {
    padding-top: 20px;
    padding-bottom: 30px;
}

.photos-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 11px;
}

.photo-card {
    min-width: 0;

    position: relative;

    overflow: hidden;

    border-radius: 8px;

    background: #eee8de;

    aspect-ratio: 1 / 1;
}

.photo-card img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.4s ease,
        filter 0.4s ease;
}

.photo-card:hover img {
    transform: scale(1.04);
    filter: brightness(0.94);
}


/* =========================================
   TAB ANIMATION
========================================= */

.tab-panel.active {
    animation: profileTabFade 0.28s ease;
}

@keyframes profileTabFade {

    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {

    .profile-page {
        width: 94%;
    }

    .profile-header,
    .main-header {
        width: 94%;
    }

    .profile-actions {
        width: 90%;
    }

}


/* =========================================
   SMALL TABLET
========================================= */

@media (max-width: 760px) {

    .profile-header nav,
    .main-header nav {
        gap: 25px;
    }

    .profile-tabs {
        gap: 30px;
    }

    .photos-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 650px) {

    .profile-header,
    .main-header {
        width: 92%;
        height: 60px;
    }


    /* HEADER */

    .logo {
        font-size: 19px;
        letter-spacing: 3px;
    }

    .profile-header nav,
    .main-header nav {
        display: none;
    }

    .header-icons {
        gap: 11px;
    }

    .icon-btn {
        font-size: 20px;
    }

    .profile-icon {
        width: 26px;
        height: 26px;
    }


    /* PROFILE */

    .profile-page {
        width: 100%;

        margin: 0;

        border-radius: 0;
    }


    /* COVER */

    .profile-cover {
        height: 180px;
    }


    /* AVATAR */

    .avatar-wrapper {
        width: 110px;
        height: 110px;

        top: -55px;
    }


    /* PROFILE INFO */

    .profile-info {
        padding:
            62px
            15px
            20px;
    }

    .profile-info h1 {
        font-size: 25px;
    }

    .profile-bio,
    .profile-location {
        font-size: 10px;
    }


    /* STATS */

    .profile-stats {
        width: 100%;
    }

    .stat strong {
        font-size: 17px;
    }

    .stat span {
        font-size: 8px;
    }


    /* ACTION BUTTONS */

    .profile-actions {
        width: 100%;

        grid-template-columns:
            1fr 48px;
    }

    .message-btn,
    .more-btn {
        height: 42px;
    }


    /* TABS */

    .profile-tabs {
        padding: 0 15px;

        gap: 28px;

        overflow-x: auto;

        scrollbar-width: none;
    }

    .profile-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab {
        flex-shrink: 0;
    }


    /* SECTIONS */

    .profile-section {
        padding-left: 15px;
        padding-right: 15px;
    }


    /* PLACES */

    .places-grid {
        grid-template-columns:
            repeat(4, minmax(85px, 1fr));

        overflow-x: auto;

        padding-bottom: 5px;

        scrollbar-width: none;
    }

    .places-grid::-webkit-scrollbar {
        display: none;
    }

    .place-card img {
        height: 90px;
    }


    /* EXPERIENCES */

    .experiences-grid {
        grid-template-columns: 1fr;
    }

    .experience-card > img {
        height: 190px;
    }


    /* PHOTOS */

    .photos-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 9px;
    }

}


/* =========================================
   VERY SMALL MOBILE
========================================= */

@media (max-width: 420px) {

    .profile-info {
        padding-left: 12px;
        padding-right: 12px;
    }

    .profile-stats {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .stat strong {
        font-size: 16px;
    }

    .stat span {
        font-size: 7px;
    }

    .profile-tabs {
        padding-left: 12px;
        padding-right: 12px;

        gap: 22px;
    }

    .profile-section {
        padding-left: 12px;
        padding-right: 12px;
    }

    .photos-grid {
        gap: 7px;
    }

}
