@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
    box-sizing: border-box;
}

:root {
    --container-color: rgb(11,9,10);
    --second-color: rgb(110,185,253);
    --text-color: rgb(0, 0, 0);
    --background-color: rgb(254, 245, 239);
}

::selection {
    color: var(--background-color);
    background: var(--second-color);
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

img {
    width: 100%;
}

section {
    padding: 3rem 0 2rem !important;
}

.container {
    max-width: 1068px !important;
    margin: auto !important;
    width: 100% !important;

}

header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 200 !important;
}

header.shadow {
    background: var(--background-color);
    box-shadow: 0 1px 4px hsl(0 4% 14% / 10%);
    transition: 400ms;
}

.eye-logo-wrapper {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 10px;
}

header.shadow .logo {
    color: var(--text-color);
}

.nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 0 !important;
}

.logo {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--background-color);
}

.logo span {
    color: var(--second-color);
}

.login {
    padding: 8px 14px !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    background: var(--second-color);
    color: var(--background-color);
}

.login:hover {
    background: hsl(0, 100%, 49%);
    transition: 300ms;
}

.success {
    background-color: #081c14;
    color: #63b798;
}

.warning {
    background-color: #332701;
    color: #ffda67;
}

.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 300px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slide-in 0.3s ease-out;
    z-index: 1050;
}

/* Close Button */
.alert button {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
}

.alert button:hover {
    color: #b3b3b3;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

.home {
    width: 100% !important;
    min-height: 440px !important;
    background: var(--container-color);
    display: grid !important;
    justify-content: center !important;
    align-items: center !important;
}

.home-text {
    color: var(--background-color);
    text-align: center !important;
}

.home-title {
    font-size: 3rem !important;
}

.home-title span {
    color: var(--second-color);
}

.home-subtitle {
    font-size: 1rem !important;
    font-weight: 400 !important;
}

.post-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 1.5rem;
    margin-top: 2rem !important;
}

.filter-item {
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.active-filter {
    background: var(--second-color);
    color: var(--background-color);
    padding: 4px 10px;
    border-radius: 4px;
}

.post {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, auto));
    justify-content: center;
    gap: 1.5rem;
}

.post-box {
    position: relative;
    background: var(--background-color);
    box-shadow: 0 4px 14px hsl(355deg 25% 15% / 10%);
    padding: 15px;
    border-radius: 0.5rem;
}

.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 0.5rem;
}

.category {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--second-color);
}

.post-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    display: --webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title:hover {
    color: var(--second-color);
    transition: 300ms all linear;
}

.post-date {
    display: flex;
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 400;
    margin-top: 4px;
}

.post-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.post-buttons .btn {
    text-transform: uppercase;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: 300ms all ease;
}

.update-btn {
    background: var(--second-color);
    color: var(--background-color);
}

.update-btn:hover {
    background: hsl(150, 100%, 30%);
    color: var(--background-color);
}

.delete-btn {
    background: hsl(0, 100%, 50%);
    color: var(--background-color);
}

.delete-btn:hover {
    background: hsl(0, 100%, 40%);
    color: var(--background-color);
}


.floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--second-color);
    color: var(--background-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 1000;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}
.floating-button:hover {
    background-color: hsl(
        220, 
        50%, 
        calc(50% - 10%));
    transform: scale(1.1);
}

.floating-button i {
    pointer-events: none;
}



/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 300px;
    max-width: 90%;
}

.modal-content p {
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.modal-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
}

.confirm-btn {
    background-color: hsl(0, 70%, 60%);
    color: #fff;
}

.confirm-btn:hover {
    background-color: hsl(0, 80%, 50%);
}

.cancel-btn {
    background-color: hsl(210, 60%, 60%);
    color: #fff;
}

.cancel-btn:hover {
    background-color: hsl(210, 70%, 50%);
}


.post-description {
    font-size: 0.9rem;
    line-height: 1.5rem;
    margin: 5px 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-image {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--second-color);
}

.profile-name {
    font-size: 0.82rem;
    font-weight: 500;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
}

.footer p {
    font-size: 0.938rem;
}

.social {
    display: flex;
    align-items: center;
    column-gap: 1rem;
}

.social .bx {
    font-size: 1.4rem;
    color: var(--text-color);
}

.social .bx:hover {
    color: var(--second-color);
    transition: 300ms all linear;
}

.post-header {
    width: 100%;
    height: 500px;
    background: var(--container-color);
}

.post-container {
    max-width: 800px;
    margin: auto;
    width: 100%;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4rem !important;
}

.back-home {
    color: var(--second-color);
    font-size: 0.9rem;
}

.header-title {
    width: 90%;
    font-size: 2.6rem;
    color: var(--background-color);
    text-align: center;
    margin-bottom: 1rem;
}

.header-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: center;
}

.post-content {
    margin-top: 10rem !important;
}

.sub-heading {
    font-size: 1rem;
}

.post-text {
    font-size: 1rem;
    line-height: 1.7rem;
    margin: 1rem 0;
    text-align: justify;
}

.share {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 1rem;
}

.share-title {
    font-size: 1.1rem;
}

@media (max-width: 1060px) {

    .container {
        margin: 0 auto;
        width: 95%;
    }

    .home-text {
        width: 100%;
    }

}

@media (max-width: 768px) {

    .nav {
        padding: 10px 0;
    }

    section {
        padding: 2rem 0;
    }

    .header-content {
        margin-top: 3rem !important;
    }

    .home {
        min-height: 380px;
    }

    .home-title {
        font-size: 3rem;
    }

    .header-title {
        font-size: 2rem;
    }

    .header-image {
        height: 370px;
    }

    .post-header {
        height: 435px;
    }

    .post-content {
        margin-top: 9rem !important;
    }

}

@media (max-width: 570px) {

    .post-header {
        height: 390px;
    }

    .header-title {
        width: 100%;
    }

    .header-image {
        height: 340px;
    }

    .footer {
        flex-direction: column;
        row-gap: 1rem;
        padding: 20px 0;
        text-align: center;
    }

}

@media (max-width: 396px) {

    .home-title {
        font-size: 2rem;
    }

    .home-subtitle {
        font-size: 0.9rem;
    }

    .home {
        min-height: 300px;
    }

    .post-box {
        padding: 10px;
    }

    .header-title {
        font-size: 1.4rem;
    }

    .post-content {
        margin-top: 5rem !important;
    }

    .post-text {
        font-size: 0.875rem;
        line-height: 1.5rem;
        margin: 10px 0;
    }

}