/* ================= GLOBAL ================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{

    font-family:'Segoe UI', Arial, sans-serif;

    background:#f4f6fb;

    color:#111;

    overflow-x:hidden;
}

/* ================= NAVBAR ================= */

.navbar{

    position:sticky;

    top:0;

    z-index:1000;

    background:rgba(255,255,255,0.92);

    backdrop-filter:blur(12px);

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:14px 30px;

    border-bottom:1px solid #eee;

    box-shadow:0 2px 15px rgba(0,0,0,0.05);
}

.left{

    display:flex;

    align-items:center;

    gap:12px;
}

.logo{

    height:45px;

    width:45px;

    border-radius:50%;

    cursor:pointer;
}

.brand{

    font-size:24px;

    font-weight:800;

    color:#111;
}

/* ================= MENU ================= */

.menu{

    display:flex;

    gap:22px;

    flex-wrap:wrap;
}

.menu a{

    text-decoration:none;

    color:#333;

    font-weight:600;

    transition:0.25s;

    cursor:pointer;
}

.menu a:hover{

    color:#ff4d4d;
}

/* ================= RIGHT ================= */

.right{

    display:flex;

    gap:10px;

    align-items:center;
}

#search{

    padding:11px 14px;

    border-radius:12px;

    border:1px solid #ddd;

    width:220px;

    transition:0.2s;
}

#search:focus{

    outline:none;

    border-color:#ff4d4d;

    box-shadow:0 0 8px rgba(255,77,77,0.2);
}

/* ================= BUTTONS ================= */

.btn{

    background:#ff4d4d;

    color:white;

    border:none;

    padding:11px 16px;

    border-radius:12px;

    cursor:pointer;

    font-weight:700;

    transition:0.25s;
}

.btn:hover{

    background:#ff2222;

    transform:translateY(-1px);
}

/* ================= HERO ================= */

.hero{

    height:70vh;

    background:
    linear-gradient(
        rgba(0,0,0,0.55),
        rgba(0,0,0,0.45)
    ),
    url("1.png");

    background-size:cover;

    background-position:center;

    display:flex;

    align-items:center;

    justify-content:center;

    position:relative;
}

.hero-overlay{

    position:relative;

    color:white;

    text-align:center;

    animation:fadeIn 1s ease;
}

.hero-overlay h1{

    font-size:60px;

    font-weight:900;

    margin-bottom:12px;

    letter-spacing:1px;
}

.hero-overlay p{

    font-size:24px;

    opacity:0.95;
}

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

@keyframes fadeIn{

    from{

        opacity:0;

        transform:translateY(20px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ================= RECENT POSTS ================= */

.recent-section{

    padding:35px 20px 10px;
}

.recent-posts{

    display:grid;

    grid-template-columns:
    repeat(auto-fit,minmax(280px,1fr));

    gap:25px;

    max-width:1300px;

    margin:auto;
}

.recent-card{

    background:white;

    border-radius:20px;

    overflow:hidden;

    box-shadow:0 6px 20px rgba(0,0,0,0.08);

    transition:0.3s;
}

.recent-card:hover{

    transform:translateY(-5px);
}

.recent-card img{

    width:100%;

    height:220px;

    object-fit:cover;
}

.recent-content{

    padding:18px;
}

.recent-content h3{

    margin-bottom:10px;

    font-size:20px;
}

.recent-content p{

    color:#666;

    line-height:1.6;
}

/* ================= CATEGORY STRIP ================= */

.categories-section{

    display:flex;

    gap:18px;

    padding:20px 25px;

    overflow-x:auto;

    scrollbar-width:none;
}

.categories-section::-webkit-scrollbar{

    display:none;
}

.category-card{

    position:relative;

    min-width:220px;

    height:140px;

    border-radius:18px;

    overflow:hidden;

    cursor:pointer;

    flex-shrink:0;

    transition:0.3s;
}

.category-card:hover{

    transform:scale(1.03);
}

.category-card img{

    width:100%;

    height:100%;

    object-fit:cover;
}

.category-overlay{

    position:absolute;

    inset:0;

    background:
    linear-gradient(
        rgba(0,0,0,0.1),
        rgba(0,0,0,0.65)
    );

    display:flex;

    align-items:flex-end;

    padding:15px;
}

.category-overlay h4{

    color:white;

    font-size:20px;

    font-weight:800;
}

/* ================= MAIN FEED ================= */

.container{

    width:100%;

    max-width:950px;

    margin:auto;

    padding:20px 15px 50px;
}

.main-grid{

    display:flex;

    flex-direction:column;

    gap:28px;
}

/* ================= POST CARD ================= */

.post-card{

    background:white;

    border-radius:24px;

    overflow:hidden;

    box-shadow:0 10px 30px rgba(0,0,0,0.08);

    transition:0.3s;
}

.post-card:hover{

    transform:translateY(-4px);
}

/* IMAGE */

.post-image{

    width:100%;

    height:380px;

    object-fit:cover;
}

/* CONTENT */

.post-content{

    padding:25px;
}

.post-category{

    display:inline-block;

    background:#ffe8e8;

    color:#ff4d4d;

    padding:7px 14px;

    border-radius:40px;

    font-size:13px;

    font-weight:800;

    margin-bottom:18px;
}

.post-title{

    font-size:34px;

    line-height:1.3;

    margin-bottom:15px;

    cursor:pointer;
}

.post-preview{

    font-size:17px;

    line-height:1.9;

    color:#555;
}

/* ================= EXPANDABLE ================= */

.post-full{

    display:none;

    margin-top:22px;

    line-height:2;

    color:#333;

    font-size:17px;

    animation:fadeIn 0.35s ease;
}

.post-card.expanded .post-full{

    display:block;
}

.read-more{

    margin-top:20px;

    display:inline-block;

    color:#ff4d4d;

    font-weight:800;

    cursor:pointer;
}

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

.post-actions{

    margin-top:28px;

    display:flex;

    gap:15px;

    border-top:1px solid #eee;

    padding-top:22px;
}

.action-btn{

    flex:1;

    border:none;

    background:#f4f6fb;

    padding:14px;

    border-radius:14px;

    font-weight:700;

    cursor:pointer;

    transition:0.25s;
}

.action-btn:hover{

    background:#ff4d4d;

    color:white;
}

.like-active{

    background:#ff4d4d;

    color:white;
}

/* ================= POPUP ================= */

.popup{

    display:none;

    position:fixed;

    inset:0;

    background:rgba(0,0,0,0.6);

    justify-content:center;

    align-items:center;

    z-index:9999;
}

.popup-content{

    background:white;

    padding:35px;

    border-radius:24px;

    width:90%;

    max-width:420px;

    animation:fadeIn 0.4s ease;
}

.popup-content h3{

    margin-bottom:18px;
}

.popup-content input{

    width:100%;

    padding:13px;

    border-radius:12px;

    border:1px solid #ddd;
}

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

@media(max-width:900px){

    .navbar{

        flex-direction:column;

        gap:15px;

        padding:15px;
    }

    .menu{

        justify-content:center;
    }

    .right{

        width:100%;

        justify-content:center;
    }

    #search{

        width:100%;
    }

    .hero-overlay h1{

        font-size:38px;
    }

    .hero-overlay p{

        font-size:18px;
    }

    .post-image{

        height:240px;
    }

    .post-title{

        font-size:25px;
    }

    .post-preview,
    .post-full{

        font-size:16px;
    }

    .post-actions{

        flex-direction:column;
    }

}