*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

html,
body{
    height: 100%;
}

body{
    overflow-x: hidden;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER */
.header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgb(16, 17, 19);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    margin: 0;
    padding: 10px 20px;
    z-index: 1000;
}

.title{
    font-size: 36px;
    font-weight: bold;
    color: white;
}

.title a{
    color: white;
    text-decoration: none;
}

.top-actions{
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-btn{
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
}

/* CATEGORY NAV */
.category-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background-color: rgb(16, 17, 19);
    padding: 12px 10px;
    position: fixed;
    top: 58px;
    left: 0;
    width: 100%;
    z-index: 999;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.category-nav::-webkit-scrollbar{
    display: none;
}

.category-nav a {
    text-decoration: none;
    padding: 8px 14px;
    background-color: #444;
    color: white;
    border-radius: 20px;
    font-weight: bold;
    transition: 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
}

.category-nav a:hover {
    background-color:#2196f3;
}

.category-nav a.active{
    background:#2196f3;
    color:white;
}

/* MOBILE MENU */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 65px;
    right: 10px;
    background: #111111;
    width: 200px;
    border-radius: 8px;
    z-index: 2000;
}

.mobile-menu a {
    color: white;
    padding: 12px;
    text-decoration: none;
    border-bottom: 1px solid #222;
}

/* SEARCH BAR */
.category-search{
    margin-top: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-input {
    width: 90%;
    max-width: 500px;
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    outline: none;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* AUTH BUTTONS */
.auth-buttons{
    display:flex;
    align-items:center;
    gap:10px;
}

.login-btn,
.signup-btn{
    text-decoration:none;
    padding:9px 18px;
    border-radius:30px;
    font-size:14px;
    font-weight:600;
    transition:.3s ease;
}

.login-btn{
    color:white;
    border:2px solid white;
    background:transparent;
}

.login-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 4px 12px rgba(255,255,255,.18);
}

.signup-btn{
    background:#2196f3;
    color:white;
}

.signup-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 4px 12px rgba(33,150,243,.35);
}

/* PROFILE */
.profile-btn{
    display:flex;
    align-items:center;
    gap:8px;
    color:white;
    text-decoration:none;
    padding:9px 18px;
    border-radius:30px;
    border:2px solid white;
    transition:.3s;
}

.profile-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 4px 12px rgba(255,255,255,.2);
}

.profile-btn i{
    font-size:15px;
}

/* PROFILE DROPDOWN */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    background: transparent;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 30px;
    border: 2px solid white;
    transition: .3s;
    cursor: pointer;
    font-size: 14px;
}

.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,255,255,.2);
}

.profile-btn i {
    font-size: 15px;
}

.profile-arrow {
    font-size: 11px !important;
    transition: transform .25s ease;
}

.profile-dropdown.active .profile-arrow {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 245px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.20);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
        opacity .2s ease,
        transform .2s ease,
        visibility .2s ease;
    z-index: 3000;
}

.profile-dropdown.active .profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f7f7f7;
}

.profile-menu-header > i {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2196f3;
    color: white;
    border-radius: 50%;
    font-size: 16px;
}

.profile-menu-header div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-menu-header strong {
    color: #222;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-header small {
    color: #777;
    font-size: 12px;
    margin-top: 3px;
}

.profile-menu-divider {
    height: 1px;
    background: #eeeeee;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 15px;
    color: #222;
    text-decoration: none;
    font-size: 14px;
    transition: background .2s ease;
}

.profile-menu-item i {
    width: 20px;
    text-align: center;
    color: #555;
    font-size: 15px;
}

.profile-menu-item:hover {
    background: #f1f7ff;
}

.profile-menu-item:hover i {
    color: #2196f3;
}

.profile-menu-item.logout-item {
    color: #d32f2f;
}

.profile-menu-item.logout-item i {
    color: #d32f2f;
}

.profile-menu-item.logout-item:hover {
    background: #fff1f1;
}

/* POSTS DESKTOP ONLY */
.post-container{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:22px;
    padding:20px;
}

/* CARD */
.post-card{
    display:flex;
    flex-direction:column;
    background:#fff;
    border-radius:12px;
    box-shadow:0 3px 8px rgba(0,0,0,0.08);
    overflow:hidden;
    padding:0;
}

/* IMAGE TOP */
.post-card img{
    width:100%;
    height:210px;
    object-fit:cover;
    border-radius:0;
}

/* CONTENT */
.post-content{
    padding:16px;
    display:flex;
    flex-direction:column;
    gap:10px;
    flex:1;
}

/* TITLE */
.post-title{
    font-size:19px;
    font-weight:bold;
    color:black;
    line-height:1.4;
}

/* TEXT */
.post-text{
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size:15px;
    color:#444;
    line-height:1.6;
}

/* BUTTONS */
.like-btn {
    background: #2196f3;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.like-btn:hover {
    background: #1976d2;
}

.delete-btn,
.see-more-btn {
    margin-right: 8px;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.delete-btn{
    background: red;
    color: white;
}

.see-more-btn{
    background: #eee;
}

.see-more-btn:hover {
    background: #2196f3;
    color: white;
}

/* FOOTER */
.footer{
    background:#0f0f0f;
    color:#ffffff;
    padding:55px 20px 20px;
    margin-top:auto;
    border-top:1px solid #222;
}

.footer-top{
    max-width:1200px;
    margin:0 auto 35px;
    text-align:center;
}

.footer-logo{
    font-size:28px;
    font-weight:700;
    margin-bottom:10px;
    letter-spacing:1px;
}

.footer-text{
    max-width:700px;
    margin:0 auto;
    color:#bdbdbd;
    font-size:15px;
    line-height:1.7;
}

.footer-links{
    max-width:1200px;
    margin:0 auto;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:35px;
    padding:20px 0 30px;
}

.footer-column h3{
    font-size:16px;
    margin-bottom:14px;
    color:#ffffff;
}

.footer-column a{
    display:block;
    color:#bdbdbd;
    text-decoration:none;
    margin-bottom:10px;
    font-size:14px;
    transition:0.25s ease;
}

.footer-column a:hover{
    color:#ffffff;
    transform:translateX(4px);
}

.footer-column p{
    color:#bdbdbd;
    font-size:14px;
    line-height:1.7;
    margin-bottom:8px;
}

.small-text{
    font-size:13px;
    line-height:1.8;
}

/* SOCIAL AREA */
.social-box{
    margin-top:12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.social-box p{
    margin-bottom:8px;
    color:#ffffff;
    font-weight:600;
}

.social-box{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
}

.social-box p{
    width:100%;
}

.social-box a{
    width:42px;
    height:42px;
    border-radius:50%;
    background:#1a1a1a;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#ffffff;
    text-decoration:none;
    transition:0.25s ease;
    margin-bottom:0;
}

.social-box a i{
    font-size:18px;
}

.social-box a:hover{
    background:#2b2b2b;
    transform:translateY(-4px);
}

/* BOTTOM */
.footer-bottom{
    border-top:1px solid #222;
    padding-top:18px;
    text-align:center;
}

.footer-bottom p{
    font-size:13px;
    color:#9c9c9c;
}

/* TABLET */
@media (max-width: 992px){
    .footer-links{
        grid-template-columns:repeat(2,1fr);
        gap:28px;
    }
}

/* MOBILE */
@media (max-width: 768px){
    .footer{
        padding:45px 16px 18px;
    }

    .footer-top{
        margin-bottom:25px;
    }

    .footer-logo{
        font-size:24px;
    }

    .footer-text{
        font-size:14px;
    }

    .footer-links{
        grid-template-columns:1fr;
        gap:24px;
        text-align:left;
    }

    .footer-column h3{
        margin-bottom:10px;
    }

    .social-box a{
        width:40px;
        height:40px;
    }

    .footer-bottom{
        margin-top:10px;
    }
}

/* MOBILE MENU */
.mobile-menu{
    position: fixed;
    top: 60px;
    right: 10px;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 15px;
    display: none;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
    min-width: 180px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.mobile-menu a{
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 8px;
    border-radius: 6px;
    transition: 0.3s;
}

.mobile-menu a:hover{
    background: #2196f3;
}

/* MOBILE FIX */
@media screen and (max-width: 900px){

    .header{
        height:56px;
        padding:10px 14px;
        box-sizing:border-box;
    }

    .title{
        font-size:22px;
    }

    .menu-btn{
        font-size:22px;
    }

    .category-nav{
        top:56px;
        padding:10px 8px;
        gap:8px;
        justify-content:flex-start;
        overflow-x:auto;
    }

    .category-nav::-webkit-scrollbar{
        display:none;
    }

    .category-nav a{
        font-size:12px;
        padding:7px 12px;
        white-space:nowrap;
        flex-shrink:0;
    }

    .category-search{
        margin-top:110px;
        padding:10px;
    }

    .search-input{
        width:100%;
        max-width:100%;
        padding:12px 16px;
        font-size:14px;
    }

    .post-container{
        display:flex;
        flex-direction:column;
        gap:16px;
        padding:12px;
    }

    .post-card{
        padding:0;
        border-radius:12px;
        overflow:hidden;
    }

    .post-card img{
        width:100%;
        height:220px;
        object-fit:cover;
    }

    .post-content{
        padding:12px;
    }

    .post-title{
        font-size:17px;
        line-height:1.4;
    }

    .post-text{
        font-size:14px;
        -webkit-line-clamp:2;
    }
}


/* =========================================================
   MOTTECK POST FEATURES
   Added without changing the existing Cars design
========================================================= */


/* SPONSORED BADGE */

.badge.sponsored{
    display:inline-block;
    align-self:flex-start;
    margin:10px 12px 0;
    padding:5px 10px;
    border-radius:20px;
    background:#2e7d32;
    color:#ffffff;
    font-size:12px;
    font-weight:600;
}


/* AUTHOR HEADER */

.post-author-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 14px;
    background:#ffffff;
}


.post-author-left{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}


.post-author-avatar-link{
    display:block;
    width:44px;
    height:44px;
    min-width:44px;
    border-radius:50%;
    overflow:hidden;
    text-decoration:none;
}


.post-author-avatar{
    width:44px !important;
    height:44px !important;
    min-width:44px;
    object-fit:cover !important;
    border-radius:50% !important;
    display:block;
}


.post-author-info{
    min-width:0;
    display:flex;
    flex-direction:column;
    line-height:1.2;
}


.post-author-name{
    color:#111111;
    font-size:14px;
    font-weight:700;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}


.post-author-category{
    color:#777777;
    font-size:12px;
    margin-top:3px;
}


.post-author-time{
    color:#999999;
    font-size:11px;
    margin-top:3px;
}


.post-author-right{
    flex-shrink:0;
}


/* FOLLOW BUTTON */

.follow-btn{
    border:1px solid #2196f3;
    background:#2196f3;
    color:#ffffff;
    padding:6px 12px;
    border-radius:20px;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    transition:.2s ease;
}


.follow-btn:hover{
    background:#1976d2;
    border-color:#1976d2;
}


.follow-btn.following{
    background:#ffffff;
    color:#2196f3;
    border-color:#2196f3;
}


.follow-btn:disabled{
    opacity:.6;
    cursor:not-allowed;
}


/* KEEP POST IMAGE LOOKING LIKE THE ORIGINAL */

.post-card .post-image{
    width:100% !important;
    height:210px !important;
    object-fit:cover !important;
    border-radius:0 !important;
    display:block;
}


/* POST ACTIONS */

.post-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    padding-top:4px;
}


.post-action-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    background:transparent;
    border:none;
    color:#555555;
    font-size:13px;
    cursor:pointer;
    padding:6px 8px;
    border-radius:6px;
    text-decoration:none;
    transition:.2s ease;
}


.post-action-btn:hover{
    background:#f1f1f1;
    color:#2196f3;
}


.like-action.liked{
    color:#2196f3;
}


.like-action.liked i{
    font-weight:900;
}


.views{
    cursor:default;
}


.views:hover{
    background:transparent;
    color:#555555;
}


/* COMMENTS */

.comments-section-home{
    margin-top:4px;
    padding-top:10px;
    border-top:1px solid #eeeeee;
}


.home-comment-form{
    display:flex;
    flex-direction:column;
    gap:8px;
}


.home-comment-input{
    width:100%;
    min-height:70px;
    resize:vertical;
    padding:10px 12px;
    border:1px solid #dddddd;
    border-radius:8px;
    outline:none;
    font-family:sans-serif;
    font-size:14px;
    line-height:1.5;
}


.home-comment-input:focus{
    border-color:#2196f3;
    box-shadow:0 0 0 2px rgba(33,150,243,.08);
}


.home-comment-submit{
    align-self:flex-start;
    border:none;
    background:#2196f3;
    color:#ffffff;
    padding:7px 13px;
    border-radius:6px;
    cursor:pointer;
    font-size:13px;
}


.home-comment-submit:hover{
    background:#1976d2;
}


.home-comments-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:12px;
}


.home-comment-item{
    display:flex;
    align-items:flex-start;
    gap:9px;
    padding:8px 0;
}


.home-comment-avatar{
    width:32px !important;
    height:32px !important;
    min-width:32px;
    object-fit:cover !important;
    border-radius:50% !important;
    display:block;
}


.home-comment-content{
    min-width:0;
    flex:1;
}


.home-comment-content strong{
    display:block;
    color:#222222;
    font-size:13px;
    margin-bottom:2px;
}


.home-comment-content p{
    margin:0;
    color:#555555;
    font-size:13px;
    line-height:1.5;
    word-break:break-word;
}


.home-comment-content small{
    display:block;
    margin-top:3px;
    color:#999999;
    font-size:11px;
}


.home-no-comments{
    color:#888888;
    font-size:13px;
    padding:10px 0;
}


/* READ MORE */

.post-content .see-more-btn{
    display:inline-block;
    align-self:flex-start;
    text-decoration:none;
    margin-top:2px;
}


/* DESKTOP AUTHOR IMAGE OVERRIDE */

@media screen and (min-width:901px){

    .post-card .post-author-avatar{
        width:44px !important;
        height:44px !important;
    }

}


/* MOBILE FEATURE OVERRIDES
   These come AFTER .post-card img so the avatars
   are not accidentally enlarged to 220px.
*/

@media screen and (max-width:900px){

    .post-author-header{
        padding:10px 12px;
    }

    .post-author-avatar-link{
        width:40px;
        height:40px;
        min-width:40px;
    }

    .post-author-avatar{
        width:40px !important;
        height:40px !important;
        min-width:40px;
    }

    .post-author-name{
        font-size:13px;
    }

    .post-author-category{
        font-size:11px;
    }

    .post-author-time{
        font-size:10px;
    }

    .follow-btn{
        padding:6px 11px;
        font-size:11px;
    }

    .post-card .post-image{
        width:100% !important;
        height:220px !important;
        object-fit:cover !important;
    }

    .post-actions{
        gap:4px;
    }

    .post-action-btn{
        padding:6px 6px;
        font-size:12px;
    }

    .home-comment-input{
        font-size:13px;
    }

    .home-comment-submit{
        font-size:12px;
    }

}
/* =========================================================
   ACTUAL USER PROFILE PICTURE
========================================================= */

.post-author-avatar-link{
    width:44px;
    height:44px;
    min-width:44px;
    display:block;
    border-radius:50%;
    overflow:hidden;
    text-decoration:none;
}

.post-author-avatar{
    width:44px !important;
    height:44px !important;
    min-width:44px;
    min-height:44px;
    display:block;
    object-fit:cover !important;
    border-radius:50% !important;
}

/* Only appears when the user has NO profile picture */

.post-author-avatar-placeholder{
    width:44px;
    height:44px;
    min-width:44px;
    border-radius:50%;
    background:#e9e9e9;
    color:#777;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
}

@media screen and (max-width:900px){

    .post-author-avatar-link{
        width:40px;
        height:40px;
        min-width:40px;
    }

    .post-author-avatar{
        width:40px !important;
        height:40px !important;
        min-width:40px;
        min-height:40px;
    }

    .post-author-avatar-placeholder{
        width:40px;
        height:40px;
        min-width:40px;
        font-size:16px;
    }

}

