/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;

    background: #f8fafc;

    color: #111827;

    line-height: 1.6;
}

a {
    text-decoration: none;
}

button {
    font-family: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* =========================
   NAVBAR
========================= */

/* =========================
   NAVBAR
========================= */

.navbar {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    min-height: 70px;

    display: flex;
    align-items: center;

    /* Logo left, toggle right */
    justify-content: space-between;

    position: relative;
}

/* Logo */

.logo {
    text-decoration: none;
    font-size: 26px;
    font-weight: 700;
    color: #111;
}

.logo span {
    color: #6366f1;
}

/* Desktop menu */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab {
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 15px;
    cursor: pointer;
    border-radius: 8px;
}

.nav-tab.active {
    color: #fff;
    background: #6366f1;
}

/* Toggle */

.menu-toggle {
    display: none;

    width: 42px;
    height: 42px;

    border: none;
    background: transparent;

    cursor: pointer;

    padding: 6px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: #111;
    margin: 5px auto;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
    .nav-container {
        min-height: 65px;
        padding: 0 15px;
        display: flex !important;
        /* Logo left + toggle right */
        justify-content: space-between;
    }

    .logo {
        font-size: 24px;
    }

    /* Toggle right side */

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    /* Mobile menu */

    .nav-menu {
        display: none;

        position: absolute;

        top: 65px;
        left: 0;
        right: 0;

        width: 100%;

        flex-direction: column;
        align-items: stretch;

        background: #fff;

        padding: 15px;

        border-top: 1px solid #eee;

        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-tab {
        width: 100%;
        text-align: left;
        padding: 13px 15px;
    }
}

/* =========================
   BLOG SECTION
========================= */

.blog-section {
    padding: 80px 0;
}

.section-header {
    display: flex;

    align-items: end;

    justify-content: space-between;

    margin-bottom: 35px;
}

.section-header h2 {
    margin-top: 7px;

    font-size: 34px;
}

#blogCount {
    color: #64748b;

    font-size: 14px;
}

.blog-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 28px;
}

.blog-card {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    cursor: pointer;

    transition: 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.blog-image {
    position: relative;

    height: 220px;

    overflow: hidden;
}

.blog-image img {
    width: 100%;

    height: 100%;

    object-fit: cover;

    transition: 0.4s;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-image span {
    position: absolute;

    top: 15px;

    left: 15px;

    padding: 5px 11px;

    background: #ffffff;

    color: #4f46e5;

    border-radius: 20px;

    font-size: 11px;

    font-weight: 800;
}

.blog-content {
    padding: 22px;
}

.blog-date {
    margin-bottom: 10px;

    color: #94a3b8;

    font-size: 12px;
}

.blog-content h3 {
    margin-bottom: 10px;

    font-size: 21px;

    line-height: 1.35;
}

.blog-content p {
    margin-bottom: 18px;

    color: #64748b;

    font-size: 14px;
}

.read-more {
    color: #4f46e5;

    font-size: 14px;

    font-weight: 700;
}

.no-blog {
    display: none;

    padding: 60px 0;

    text-align: center;

    color: #64748b;
}

/* =========================
   DETAILS PAGE
========================= */

.details-page {
    padding: 60px 0 100px;

    background: #ffffff;
}

.back-button {
    display: inline-block;

    margin-bottom: 35px;

    color: #4f46e5;

    font-weight: 700;
}

.details-card {
    max-width: 900px;

    margin: auto;
}

.details-category {
    color: #4f46e5;

    font-size: 13px;

    font-weight: 800;

    letter-spacing: 1.5px;

    text-transform: uppercase;

    text-align: center;
}

.details-card h1 {
    margin: 12px 0 15px;

    font-size: 32px;

    line-height: 1.15;

    text-align: center;
}

.details-meta {
    margin-bottom: 40px;

    color: #64748b;

    text-align: center;

    font-size: 14px;
}

.details-image {
    display: block;

    width: 100%;

    height: 500px;

    border-radius: 15px;

    object-fit: cover;

    margin-bottom: 45px;
}

.details-content {
    /* max-width: 800px; */

    margin: auto;

    color: #374151;

    font-size: 18px;
}

.details-content p {
    margin-bottom: 25px;
}

.details-content h2 {
    margin: 35px 0 15px;

    color: #111827;

    font-size: 30px;
}

/* =========================
   RELATED
========================= */

.related-section {
    max-width: 1200px;

    margin: 80px auto 0;
}

.related-section h2 {
    margin-bottom: 25px;

    font-size: 30px;
}

.related-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 25px;
}

.related-card {
    overflow: hidden;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    background: #ffffff;

    cursor: pointer;

    transition: 0.3s;
}

.related-card:hover {
    transform: translateY(-4px);

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.related-card img {
    width: 100%;

    height: 180px;

    object-fit: cover;
}

.related-card div {
    padding: 18px;
}

.related-card span {
    color: #4f46e5;

    font-size: 11px;

    font-weight: 800;

    text-transform: uppercase;
}

.related-card h3 {
    margin: 7px 0;

    font-size: 18px;

    line-height: 1.35;
}

.related-card p {
    color: #94a3b8;

    font-size: 12px;
}

/* =========================
   FOOTER
========================= */

.footer {
    position: fixed;
    bottom: 0;
    left: 0;

    width: 100%;

    background: white;
    color: white;

    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.footer-bottom {
    padding: 15px 0;
}

.footer-bottom p {
    margin: 0;

    color: black;

    font-size: 16px;

    text-align: center;
}

/* Mobile */

@media (max-width: 700px) {
    .footer-content {
        padding: 35px 0;

        flex-direction: column;

        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;

        justify-content: center;

        gap: 15px;
    }
}

/* =========================
   TABLET
========================= */

@media (max-width: 1000px) {
    .nav-menu {
        overflow-x: auto;

        margin-left: 20px;
    }

    .nav-tab {
        white-space: nowrap;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {
    .nav-container {
        min-height: auto;
        display: flex !important;
        padding: 12px 0;

        /* flex-direction: column; */

        align-items: stretch;
    }

    .nav-menu {
        margin: 12px 0 0;

        justify-content: flex-start;

        overflow-x: auto;

        padding-bottom: 3px;
    }

    .hero {
        padding: 65px 0;
    }

    .hero h1 {
        font-size: 42px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        align-items: start;

        flex-direction: column;

        gap: 10px;
    }

    .details-card h1 {
        font-size: 38px;
    }

    .details-image {
        height: 300px;
    }

    .details-content {
        font-size: 16px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;

        gap: 30px;
    }
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: right;
    gap: 6px;
    margin: 25px auto;
    width: 100%;
    flex-wrap: wrap;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    background: #fff;
    color: #374151;

    text-decoration: none;
    font-size: 14px;
}

.page-link.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 400px) {
    .pagination {
        display: flex !important;
        width: 100%;
        padding: 0 15px;
        margin-bottom: -390px;
        overflow: visible;
        
    }

    .page-link {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .page-link.prev,
    .page-link.next {
        display: flex !important;
    }
}
