/* ==========================
   GOOGLE FONT
========================== */

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

/* ==========================
   RESET
========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    background:#f8fafc;
    color:#1e293b;
    line-height:1.7;
}

/* ==========================
   LINKS
========================== */

a{
    text-decoration:none;
}

img{
    width:100%;
    display:block;
}

section{
    padding:80px 10%;
}

/* ==========================
   HEADER
========================== */

header{

    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:80px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:0 8%;

    background:linear-gradient(90deg,#0f172a,#1d4ed8);

    box-shadow:0 5px 20px rgba(0,0,0,.15);

    z-index:999;

}

/* ==========================
   LOGO
========================== */

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

.logo i{
    font-size:28px;
    color:#38bdf8;
}

.logo h2{
    font-size:30px;
    font-weight:700;
}

/* Blog */
.logo .blog{
    color:#ffffff;
}

/* ify */
.logo .ify{
    color:#38bdf8;
}

/* ==========================
   NAVIGATION
========================== */

nav{

    display:flex;
    gap:35px;

}

nav a{

    color:white;
    font-size:16px;
    font-weight:500;

    position:relative;

    transition:.3s;

}

nav a:hover{

    color:#38bdf8;

}

nav a::after{

    content:"";

    position:absolute;

    left:0;
    bottom:-6px;

    width:0;
    height:2px;

    background:#38bdf8;

    transition:.3s;

}

nav a:hover::after{

    width:100%;

}

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

.header-right{

    display:flex;
    align-items:center;
    gap:10px;

}

/* ==========================
   SEARCH BOX
========================== */

.search-box{

    position:relative;

}

.search-box input{

    width:210px;

    padding:10px 40px 10px 18px;

    border:none;
    outline:none;

    border-radius:25px;

}

.search-box i{

    position:absolute;

    right:15px;
    top:50%;

    transform:translateY(-50%);

    color:#555;

}

/* ==========================
   DARK MODE BUTTON
========================== */

#darkMode{

    width:45px;
    height:45px;

    border:none;

    border-radius:50%;

    cursor:pointer;

    font-size:16px;

    background:black;

    transition:.3s;

}

#darkMode:hover{

    background:#38bdf8;

    color:white;

    transform:rotate(180deg);

}

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

.hero{

    height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;

    text-align:center;

    background:

    linear-gradient(rgba(15,23,42,.75),rgba(15,23,42,.75)),

    url("https://images.unsplash.com/photo-1499750310107-5fef28a66643?w=1600");

    background-size:cover;
    background-position:center;

    color:white;

}

.hero-content{

    max-width:750px;

}

.hero h1{

    font-size:60px;

    line-height:1.2;

    margin-bottom:20px;

}

.hero p{

    font-size:19px;

    color:#e2e8f0;

    margin-bottom:35px;

}

/* ==========================
   BUTTON
========================== */

.btn{

    display:inline-block;

    background:#2563eb;

    color:white;

    padding:15px 35px;

    border-radius:50px;

    font-weight:600;

    transition:.3s;

}

.btn:hover{

    background:#1d4ed8;

    transform:translateY(-5px);

    box-shadow:0 10px 25px rgba(37,99,235,.35);

}

/* ==========================
   SECTION TITLE
========================== */

section h2{

    text-align:center;

    font-size:38px;

    margin-bottom:15px;

    color:#0f172a;

}

section>p{

    text-align:center;

    color:#64748b;

    margin-bottom:50px;

}

/* ==========================
   RESPONSIVE
========================== */

@media(max-width:992px){

header{

    flex-direction:column;

    height:auto;

    padding:20px;

}

nav{

    margin:20px 0;

    flex-wrap:wrap;

    justify-content:center;

}

.search-box input{

    width:180px;

}

.hero h1{

    font-size:42px;

}

.hero p{

    font-size:17px;

}

}

@media(max-width:600px){

.hero{

    padding:20px;

}

.hero h1{

    font-size:34px;

}

.hero p{

    font-size:16px;

}

.search-box{

    display:none;

}

}
/*==================================
        CATEGORIES
==================================*/

.categories{
    background:#f8fafc;
}

.cat-box{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:25px;
    margin-top:40px;
}

.cat-box div{
    background:rgb(175, 165, 165);
    padding:35px 20px;
    text-align:center;
    border-radius:15px;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
    transition:.4s;
    cursor:pointer;
}

.cat-box div:hover{
    background:#2563eb;
    transform:translateY(-10px);
    color:#fff;
}

.cat-box div i{
    font-size:45px;
    margin-bottom:20px;
    color:#2563eb;
    transition:.4s;
}

.cat-box div:hover i{
    color:#fff;
}

.cat-box div h3{
    font-size:20px;
    font-weight:600;
}

/*==================================
        FEATURED BLOG
==================================*/

.featured{
    background:#ffffff;
}

.featured-container{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:50px;
    align-items:center;
    margin-top:40px;
}

.featured-image img{
    border-radius:20px;
    box-shadow:0 20px 35px rgba(0,0,0,.15);
}

.featured-content .tag{
    display:inline-block;
    background:#2563eb;
    color:#fff;
    padding:8px 20px;
    border-radius:30px;
    margin-bottom:20px;
    font-size:14px;
}

.featured-content h2{
    text-align:left;
    font-size:38px;
    margin-bottom:20px;
    color:#0f172a;
}

.featured-content p{
    color:#555;
    margin-bottom:30px;
    font-size:17px;
    line-height:1.8;
}

/*==================================
        BLOG SECTION
==================================*/

.blogs{
    background:#f1f5f9;
}

.blog-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:35px;
    margin-top:50px;
}

/*==================================
        BLOG CARD
==================================*/

.card{
    background:#fff;
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    transition:.4s;
}

.card:hover{
    transform:translateY(-12px);
    box-shadow:0 20px 40px rgba(37,99,235,.2);
}

.card img{
    height:230px;
    object-fit:cover;
    transition:.5s;
}

.card:hover img{
    transform:scale(1.08);
}

.card .content{
    padding:25px;
}

/*==================================
        BLOG TAG
==================================*/

.card .tag{
    display:inline-block;
    background:#dbeafe;
    color:#2563eb;
    padding:6px 18px;
    border-radius:20px;
    font-size:13px;
    font-weight:600;
    margin-bottom:15px;
}

/*==================================
        BLOG TITLE
==================================*/

.card h3{
    font-size:24px;
    margin-bottom:15px;
    color:#0f172a;
    transition:.3s;
}

.card:hover h3{
    color:#2563eb;
}

/*==================================
        BLOG TEXT
==================================*/

.card p{
    color:#64748b;
    line-height:1.8;
    margin-bottom:20px;
}

/*==================================
        READ MORE BUTTON
==================================*/

.card a{
    display:inline-block;
    color:#2563eb;
    font-weight:600;
    transition:.3s;
}

.card a:hover{
    transform:translateX(8px);
}

/*==================================
        RESPONSIVE
==================================*/

@media(max-width:992px){

.featured-container{
    grid-template-columns:1fr;
}

.featured-content{
    text-align:center;
}

.featured-content h2{
    text-align:center;
}

}

@media(max-width:768px){

.blog-container{
    grid-template-columns:1fr;
}

.cat-box{
    grid-template-columns:repeat(2,1fr);
}

}

@media(max-width:500px){

.cat-box{
    grid-template-columns:1fr;
}

.featured-content h2{
    font-size:30px;
}

.card h3{
    font-size:22px;
}

}
/*==================================
        NEWSLETTER
==================================*/

.newsletter{
    background:linear-gradient(135deg,#2563eb,#1e40af);
    color:#fff;
    text-align:center;
}

.newsletter h2{
    color:#fff;
    font-size:38px;
    margin-bottom:15px;
}

.newsletter p{
    color:#e2e8f0;
    margin-bottom:35px;
}

.newsletter form{
    display:flex;
    justify-content:center;
    gap:15px;
    flex-wrap:wrap;
}

.newsletter input{
    width:350px;
    padding:15px 20px;
    border:none;
    outline:none;
    border-radius:50px;
    font-size:16px;
}

.newsletter button{
    padding:15px 35px;
    border:none;
    border-radius:50px;
    background:#0f172a;
    color:#fff;
    cursor:pointer;
    font-size:16px;
    font-weight:600;
    transition:.3s;
}

.newsletter button:hover{
    background:#fff;
    color:#2563eb;
}

/*==================================
        ABOUT
==================================*/

.about{
    background:#fff;
}

.about-text{
    max-width:850px;
    margin:auto;
    text-align:center;
}

.about-text h2{
    margin-bottom:25px;
}

.about-text p{
    color:#64748b;
    margin-bottom:20px;
    line-height:1.9;
    font-size:17px;
}

/*==================================
        CONTACT
==================================*/

.contact{
    background:#f8fafc;
}

.contact form{
    max-width:700px;
    margin:auto;
    display:flex;
    flex-direction:column;
    gap:20px;
}

.contact input,
.contact textarea{
    padding:16px;
    border:1px solid #d1d5db;
    border-radius:10px;
    outline:none;
    font-size:16px;
    transition:.3s;
}

.contact input:focus,
.contact textarea:focus{
    border-color:#2563eb;
    box-shadow:0 0 10px rgba(37,99,235,.2);
}

.contact button{
    padding:16px;
    border:none;
    border-radius:10px;
    background:#2563eb;
    color:#fff;
    font-size:17px;
    cursor:pointer;
    transition:.3s;
}

.contact button:hover{
    background:#1d4ed8;
}

/*==================================
        FOOTER
==================================*/

footer{
    background:#0f172a;
    color:#fff;
    padding:60px 10% 25px;
}

.footer-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:40px;
}

.footer-logo h2{
    margin-bottom:15px;
}

.footer-logo p{
    color:#cbd5e1;
}

.footer-links h3,
.footer-social h3{
    margin-bottom:20px;
}

.footer-links a{
    display:block;
    color:#cbd5e1;
    margin-bottom:10px;
    transition:.3s;
}

.footer-links a:hover{
    color:#38bdf8;
    padding-left:8px;
}

.footer-social a{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    width:45px;
    height:45px;
    margin-right:10px;
    border-radius:50%;
    background:#1e293b;
    color:#fff;
    font-size:18px;
    transition:.3s;
}

.footer-social a:hover{
    background:#2563eb;
    transform:translateY(-5px);
}

footer hr{
    border:none;
    border-top:1px solid #334155;
    margin:40px 0 20px;
}

footer .copyright{
    text-align:center;
    color:#94a3b8;
}

/*==================================
      SCROLL TO TOP
==================================*/

#topBtn{
    position:fixed;
    right:25px;
    bottom:25px;
    width:50px;
    height:50px;
    border:none;
    border-radius:50%;
    background:#2563eb;
    color:#fff;
    font-size:20px;
    cursor:pointer;
    display:none;
    transition:.3s;
    z-index:999;
}

#topBtn:hover{
    background:#1d4ed8;
    transform:translateY(-5px);
}

/*==================================
        DARK MODE
==================================*/

body.dark{
    background:#0f172a;
    color:#f8fafc;
}

body.dark header{
    background:#020617;
}

body.dark .categories,
body.dark .blogs,
body.dark .contact{
    background:#111827;
}

body.dark .featured,
body.dark .about{
    background:#1e293b;
}

body.dark section h2,
body.dark h3{
    color:#fff;
}

body.dark p{
    color:#cbd5e1;
}

body.dark .card{
    background:#1f2937;
}

body.dark .cat-box div{
    background:#1f2937;
    color:#fff;
}

body.dark .cat-box div i{
    color:#38bdf8;
}

body.dark .cat-box div:hover{
    background:#2563eb;
}

body.dark .search-box input,
body.dark .contact input,
body.dark .contact textarea,
body.dark .newsletter input{
    background:#374151;
    color:#fff;
    border:1px solid #475569;
}

body.dark footer{
    background:#020617;
}

/*==================================
        RESPONSIVE
==================================*/

@media(max-width:768px){

.newsletter input{
    width:100%;
}

.newsletter button{
    width:100%;
}

.footer-container{
    text-align:center;
}

.footer-social{
    margin-top:20px;
}

.footer-social a{
    margin:5px;
}

}

@media(max-width:480px){

section{
    padding:60px 20px;
}

.newsletter h2{
    font-size:30px;
}

.about-text p{
    font-size:16px;
}

.contact input,
.contact textarea,
.contact button{
    font-size:15px;
}

}
/*==========================
      PREPARED BY
==========================*/

.developer{

    background:#f8fafc;

    padding:70px 10%;

}

.developer-card{

    max-width:500px;

    margin:auto;

    background:#fff;

    text-align:center;

    padding:40px;

    border-radius:20px;

    box-shadow:0 15px 35px rgba(0,0,0,.1);

    transition:.4s;

}

.developer-card:hover{

    transform:translateY(-10px);

}

.developer-card img{

    width:150px;

    height:150px;

    border-radius:50%;

    object-fit:cover;

    border:5px solid #2563eb;

    margin:auto;

    margin-bottom:20px;

}

.developer-card h2{

    color:#0f172a;

    margin-bottom:10px;

}

.developer-card h4{

    color:#2563eb;

    margin-bottom:20px;

}

.developer-card p{

    color:#64748b;

    line-height:1.8;

}

.developer-social{

    margin-top:25px;

}

.developer-social a{

    display:inline-flex;

    justify-content:center;

    align-items:center;

    width:45px;

    height:45px;

    background:#2563eb;

    color:#fff;

    border-radius:50%;

    margin:8px;

    font-size:18px;

    transition:.3s;

}

.developer-social a:hover{

    background:#0f172a;

    transform:translateY(-5px);

}

/* Dark Mode */

body.dark .developer{

    background:#111827;

}

body.dark .developer-card{

    background:#1f2937;

}

body.dark .developer-card h3{

    color:#fff;

}

body.dark .developer-card p{

    color:#cbd5e1;

}

.login-btn{
    padding:10px 20px;
    background:rgb(105, 176, 227);
    color:#2563eb;
    border-radius:25px;
    font-weight:bold;
    text-decoration:none;
    transition:.3s;
}

.login-btn:hover{
    background:#38bdf8;
    color:#fff;
}
.logout-btn{
    padding:10px 20px;
    background:#ef4444;
    color:#fff;
    border-radius:25px;
    font-weight:bold;
    text-decoration:none;
    transition:.3s;
    margin-left:10px;
    display:none; /* hidden until login */
}

.logout-btn:hover{
    background:#b91c1c;
}
.user-name{
    color:#fff;
    margin-left:10px;
    font-weight:bold;
}
.user-info{
    display:flex;
    align-items:center;
    gap:15px;
}

#welcomeUser{
    color:#fff;
    font-size:16px;
    font-weight:600;
}

.logout-btn{
    background:#ef4444;
    color:white;
    padding:10px 18px;
    border-radius:20px;
    text-decoration:none;
}

.logout-btn:hover{
    background:#dc2626;
}
body.dark{
    background:#121212;
    color:#fff;
}

body.dark header{
    background:#1b1b1b;
}

body.dark .card{
    background:#222;
    color:#fff;
}

body.dark footer{
    background:#111;
}

body.dark nav a{
    color:white;
}
.readMoreBtn{
    display:inline-block;
    margin-top:15px;
    color:#2563eb;
    text-decoration:none;
    font-weight:600;
    transition:.3s;
}

.readMoreBtn:hover{
    color:#0f172a;
    transform:translateX(8px);
}
.blog-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:30px;
}

.card{
    background:#fff;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 10px 25px rgba(0,0,0,.12);
    transition:.35s;
}

.card:hover{
    transform:translateY(-10px);
    box-shadow:0 20px 40px rgba(0,0,0,.18);
}

.card img{
    width:100%;
    height:220px;
    object-fit:cover;
    transition:.5s;
}

.card:hover img{
    transform:scale(1.08);
}
.category-slider{
    display:flex;
    align-items:center;
    gap:15px;
    margin-top:40px;
}

.cat-box{
    display:flex;
    gap:20px;
    overflow-x:auto;
    scroll-behavior:smooth;
    flex:1;
    scrollbar-width:none;
}

.cat-box::-webkit-scrollbar{
    display:none;
}

.category-card{

    min-width:180px;
    height:180px;

    background:#1f2937;

    border-radius:18px;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    cursor:pointer;

    transition:.35s;
}

.category-card:hover{

    background:#2563eb;

    transform:translateY(-8px);
}

.category-card i{

    font-size:45px;

    color:#38bdf8;

    margin-bottom:15px;
}

.category-card h3{

    color:#fff;

    font-size:24px;

    text-align:center;
}

.slider-btn{

    width:55px;

    height:55px;

    border:none;

    border-radius:50%;

    background:#2563eb;

    color:#fff;

    cursor:pointer;

    font-size:22px;

    transition:.3s;
}

.slider-btn:hover{

    background:#1d4ed8;

    transform:scale(1.1);
}
/* =========================
   PAGINATION
========================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 50px 0;
    flex-wrap: wrap;
}

/* Next and Previous Buttons (Always black text) */
.pagination button {
    padding: 10px 18px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background:rgb(193, 188, 188);
    color: #000000; /* Black text */
    cursor: pointer;
    font-size: 15px;
    transition: .3s;
}

.pagination button:hover:not(:disabled) {
    background: #2563eb;
}

.pagination button:disabled {
    background: #f3f4f6;
    color: #9ca3af; /* Gray out text when disabled */
    cursor: not-allowed;
    border-color: #e5e7eb;
}

#pageNumbers {
    display: flex;
    gap: 10px;
}

/* Inactive Page Numbers (Black text, light gray background) */
.page-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background:gray;
    color: #000000; /* Black text */
    font-weight: bold;
    cursor: pointer;
    transition: .3s;
}

.page-btn:hover {
    background: #e5e7eb;
}

/* Active Page Number Only (Colored background, white text) */
.page-btn.active {
    background: #2563eb; /* Your theme color */
    color: #ffffff;      /* White text for contrast */
    transform: scale(1.08);
}