/* General smooth transition */
* {
    transition: all 0.2s ease-in-out;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.trending-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.trending-link:hover .trending-item {
    background-color: #f4f1e8;
    border-radius: 6px;
    cursor: pointer;
}

.back-button {
    display: inline-block;
    margin: 10px 15px;
    font-family: "Work Sans", sans-serif;
    color: #1a5f74;
    text-decoration: none;
    font-size: 1em;
    font-weight: bold;
}

.back-button:hover {
    text-decoration: underline;
    transform: translateX(-2px);
}


body {
    height: 100vh;
    background-color: #f4f1e8;
    background-size: cover;
}

/* Logo things */
.logo-container {
    position: absolute;
    top: 10px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 80px;
    height: auto;
}

.logo-text {
    font-family: "Work Sans", sans-serif;
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
}

.castle {
    color: #1a5f74;
}

.gram {
    color: #a0522d;
}

/* Side menu */
.sidebar {
    position: absolute;
    top: 80px;
    left: 15px;
    width: 200px;
    font-family: "Work Sans", sans-serif;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    padding: 10px 0;
}

.menu-item:hover {
    background-color: #e6e3db;
    border-radius: 8px;
    padding-left: 8px;
    transform: scale(1.02);
}

/* Suggested profiles */
.sidebar-title {
    margin-top: 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: #555;
}

.suggested-profiles {
    margin-top: 10px;
}

.suggested-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    background-color: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.suggested-profile:hover {
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.suggested-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.suggested-name {
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 3px;
}

.suggested-username {
    font-size: 0.8em;
    color: gray;
    margin-top: -3px;
}

button {
    background-color: #5d3a2d;
    border: none;
    color: rgb(255, 255, 255);
    padding: 6px 12px;
    width: 125px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-family: "Work Sans", sans-serif;
    font-size: 12px;
    border-radius: 8px;
    margin-left: 10px;
}

button:hover {
    background-color: #3e271d;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.profile {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 500px;
    margin: 50px auto;
}

.profile-info {
    display: flex;
    flex-direction: column;
    font-family: "Work Sans", sans-serif;
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
}

.profile-pic:hover {
    transform: scale(1.05);
    border-color: #1a5f74;
}

.display-name {
    margin-top: 25px;
    margin-bottom: 5px;
    font-family: "Work Sans", sans-serif;
    font-size: 1em;
    font-weight: bold;
    color: #333;
}

.username {
    font-family: "Work Sans", sans-serif;
    font-size: 1em;
    margin: 0.5px 0;
    color: rgb(116, 113, 113);
}

.bio {
    font-size: 0.9em;
    color: #555;
    margin-top: 13px;
}

/* Post section */
.post-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.post {
    width: 50%;
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    font-family: "Work Sans", sans-serif;
}

.post:hover {
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Work Sans", sans-serif;
}

.post-profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.post-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-family: "Work Sans", sans-serif;
}

.post-display-name {
    font-size: 0.95em;
    margin-bottom: 1px;
}

.post-username {
    font-size: 0.85em;
    color: gray;
    margin-top: 0;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    margin-top: 5px;
}

.post-actions button {
    background: none;
    border: none;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #5d3a2d;
    font-family: "Work Sans", sans-serif;
}

.post-actions button:hover {
    color: #a0522d;
}

.like-btn:hover {
    color: red;
}

.comment-btn:hover {
    color: blue;
}

.share-btn:hover {
    color: green;
}

.post-image {
    width: 80%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Trending section */
.trending-section {
    position: absolute;
    right: 20px;
    top: 100px;
    width: 250px;
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    font-family: "Helvetica Neue", sans-serif;
}

.trending-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1a5f74;
}

.trending-item {
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item:hover {
    background-color: #f4f1e8;
    border-radius: 6px;
    cursor: pointer;
}

.trending-topic {
    font-size: 1em;
    font-weight: bold;
    color: #5d3a2d;
}

.trending-topic:hover {
    color: #a0522d;
}

.trending-meta {
    font-size: 0.85em;
    color: gray;
}


/* Mobile Responsive Styling */
@media (max-width: 768px) {

    /* Sidebar adjustments (People You May Know) */
    .sidebar {
        position: static;
        /* Remove absolute positioning */
        width: 90%;
        margin: 15px auto;
        text-align: center;
    }

    .sidebar-title {
        text-align: center;
        margin-top: 20px;
    }

    .suggested-profiles {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        /* Ensures items stick to the left */
        text-align: left;
    }

    .suggested-profile {
        width: 90%;
        justify-content: space-between;
    }

    /* Trending section adjustments */
    .trending-section {
        position: static;
        /* Remove absolute positioning */
        width: 90%;
        margin: 20px auto;
    }

    /* Post adjustments */
    .post-container {
        flex-direction: column;
        align-items: center;
    }

    .post {
        width: 90%;
    }

    /* Logo adjustments */
    .logo-container {
        position: static;
        flex-direction: column;
        align-items: center;
        margin-top: 10px;
        margin-bottom: 20px;
    }

    .logo {
        width: 60px;
        /* slightly smaller */
    }

    .logo-text {
        font-size: 1.2em;
    }

    /* Profile section adjustments */
    .profile {
        flex-direction: column;
        align-items: center;
        margin: 20px auto;
    }

    .profile-pic {
        width: 80px;
        height: 80px;
    }

    .profile-info {
        align-items: center;
        text-align: center;
    }

}

@media only screen and (max-width: 1200px) {

    .sidebar {
        position: static;
        /* Remove absolute positioning */
        width: 90%;
        margin: 15px auto;
        text-align: center;
    }

    .sidebar-title {
        text-align: center;
        margin-top: 20px;
    }

    .suggested-profiles {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        /* Ensures items stick to the left */
        text-align: left;
    }

    .suggested-profile {
        width: 90%;
        justify-content: space-between;
    }

    /* Trending section adjustments */
    .trending-section {
        position: static;
        /* Remove absolute positioning */
        width: 82%;
        margin: 20px auto;
    }

    .post {
        width: 80vw;
    }

    .logo-phone {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 15vw;
        height: auto;
    }

    .phone-text {
        display: block;
        padding-left: 15vw;
        padding-right: 15vw;
        font-family: "Work Sans", sans-serif;
        font-size: 3vw;
        min-width: 2vw;
        font-weight: bold;
        color: #333;
        text-decoration: none;
    }

    .logo-container {
        position: static;
        flex-direction: column;
        align-items: center;
        margin-top: 10px;
        margin-bottom: 20px;
    }

    .logo {
        width: 60px;
        /* slightly smaller */
    }

    .logo-text {
        font-size: 1.2em;
    }

    /* Profile section adjustments */
    .profile {
        flex-direction: column;
        align-items: center;
        margin: 20px auto;
    }

    .profile-pic {
        width: 80px;
        height: 80px;
    }

    .profile-info {
        align-items: center;
        text-align: center;
    }
}

.iframe-modal {
    position: fixed;
    bottom: 10%;
    right: 20%;
    width: 60%;
    height: 80%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    overflow: hidden;  /* Prevents iframe overflow */
}

.iframe-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
    background: white;
}

.following {
    background-color: #3e271d;
    border: none;
    color: rgb(255, 255, 255);
    padding: 6px 12px;
    width: 125px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-family: "Work Sans", sans-serif;
    font-size: 12px;
    border-radius: 8px;
    margin-left: 10px;
}