/* =========================
   BASIC RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

a {
    text-decoration: none;
}


/* =========================
   BANNER
========================= */

.banner {

    width: 100%;

    height: 300px;

    background-image: url("../images/banner.jpg");

    background-size: cover;

    background-position: center;

    position: relative;
}


/* =========================
   FLOATING ROUND LOGO
========================= */

.floating-logo {

    position: absolute;

    left: 40px;

    bottom: 75px;

    width: 120px;

    height: 120px;

    background: white;

    border-radius: 50%;

    padding: 6px;

    z-index: 10;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

.floating-logo img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    border-radius: 50%;
}


/* =========================
   SOCIAL ICONS
========================= */

.social-icons {

    position: absolute;

    top: 20px;

    right: 30px;

    display: flex;

    gap: 10px;
}

.social-icons a {

    width: 36px;

    height: 36px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: rgba(0, 0, 0, 0.65);

    color: white;

    font-size: 16px;

    transition: 0.3s;
}

.social-icons a:nth-child(1):hover {

    background: #007bff;

    transform: translateY(-3px);
}

.social-icons a:nth-child(2):hover {

    background: #ff0234;

    transform: translateY(-3px);
}

.social-icons a:nth-child(3):hover {
    background: radial-gradient(
        circle at 30% 107%,
        #fdf497 0%,
        #fdf497 5%,
        #fd5949 45%,
        #d6249f 60%,
        #285AEB 90%
    );

    transform: translateY(-3px);
}

.social-icons a:nth-child(4):hover {

    background: #000000;

    transform: translateY(-3px);
}

/* =========================
   NAVBAR
========================= */

.navbar {

    width: 100%;

    height: 75px;

    background: white;

    border-bottom: 1px solid #ddd;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    position: relative;

    z-index: 5;
}

.navbar-container {

    width: 92%;

    max-width: 1250px;

    height: 100%;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


/* =========================
   SITE NAME
========================= */

.site-name {

    width: 220px;

    flex-shrink: 0;
}

.site-name a {

    font-size: 25px;

    font-weight: bold;

    color: #222;
}


/* =========================
   NAVIGATION
========================= */

.main-nav {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 28px;

    flex: 1;
}

.main-nav a {

    color: #333;

    font-size: 15px;

    font-weight: 500;

    transition: 0.3s;
}

.main-nav a:hover {

    color: #007bff;
}


/* =========================
   SEARCH BOX
========================= */

.search-box {

    width: 220px;

    flex-shrink: 0;
}

.search-box form {

    display: flex;

    width: 100%;
}

.search-box input {

    width: 100%;

    height: 38px;

    border: 1px solid #ddd;

    border-right: none;

    padding: 0 12px;

    outline: none;

    border-radius: 5px 0 0 5px;
}

.search-box button {

    width: 45px;

    border: none;

    background: #007bff;

    color: white;

    cursor: pointer;

    border-radius: 0 5px 5px 0;
}


/* =========================
   CONTENT
========================= */

main {

    min-height: 500px;
}

/* =========================
   PAGE WRAPPER
========================= */

.page-wrapper {

    width: 92%;

    max-width: 1250px;

    margin: 20px 20px;

    display: grid;

    grid-template-columns: minmax(0, 1fr) 320px;

    gap: 30px;

    align-items: start;
}


/* =========================
   MAIN CONTENT
========================= */

.main-content {

    min-width: 0;
}


.welcome {

    background: white;

    padding: 30px;

    margin-bottom: 30px;

    border-radius: 8px;

    border: 1px solid #eee;
}


.welcome h1 {

    margin-bottom: 15px;

    font-size: 30px;
}


.welcome p {

    line-height: 1.7;

    color: #666;
}


/* =========================
   POSTS GRID
========================= */

.posts-grid {

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;

}


/* =========================
   POST CARD
========================= */

.post-card {

    background: white;

    padding: 20px;

    border-radius: 8px;

    border: 1px solid #eee;

    transition: 0.3s;

    min-width: 0;
}


.post-card:hover {

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);

    transform: translateY(-2px);

}


/* =========================
   POST THUMBNAIL
   4:3 RATIO
========================= */

.post-thumbnail {

    width: 100%;

    aspect-ratio: 4 / 3;

    overflow: hidden;

    border-radius: 6px;

    margin-bottom: 15px;

}


.post-thumbnail img {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

}


/* =========================
   POST TITLE
========================= */

.post-card h2 {

    margin: 0 0 10px;

    font-size: 20px;

    line-height: 1.4;

}


.post-card h2 a {

    color: #222;

    text-decoration: none;

}


.post-card h2 a:hover {

    color: #007bff;

}


/* =========================
   POST META
========================= */

.post-meta {

    font-size: 13px;

    color: #888;

    margin-bottom: 12px;

    display: flex;

    flex-wrap: wrap;

    gap: 8px 12px;

}


/* =========================
   POST EXCERPT
========================= */

.post-card p {

    line-height: 1.7;

    color: #555;

    margin: 0;

}


/* =========================
   READ MORE
========================= */

.read-more {

    display: inline-block;

    margin-top: 15px;

    color: #007bff;

    font-weight: 500;

    text-decoration: none;

}


.read-more:hover {

    text-decoration: underline;

}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .posts-grid {

        grid-template-columns: 1fr;

        gap: 15px;

    }


    .post-card {

        padding: 15px;

    }


    .post-card h2 {

        font-size: 19px;

    }

}


/* =========================
   SIDEBAR
========================= */

.sidebar {

    width: 100%;
}


/* =========================
   SIDEBAR WIDGET
========================= */

.sidebar-widget {

    background: white;

    padding: 22px;

    margin-bottom: 25px;

    border-radius: 8px;

    border: 1px solid #eee;
}


.sidebar-widget h3 {

    font-size: 19px;

    margin-bottom: 18px;

    padding-bottom: 12px;

    border-bottom: 2px solid #007bff;
}


/* =========================
   CONTACT
========================= */

.contact-info p {

    margin-bottom: 12px;

    font-size: 14px;
}


.contact-info a {

    color: #444;
}


.contact-info a:hover {

    color: #007bff;
}


/* =========================
   CATEGORIES
========================= */

.category-list {

    list-style: none;
}


.category-list li {

    border-bottom: 1px solid #eee;

    padding: 10px 0;
}


.category-list li:last-child {

    border-bottom: none;
}


.category-list a {

    color: #444;

    font-size: 15px;
}


.category-list a:hover {

    color: #007bff;

    padding-left: 5px;
}


/* =========================
   RECENT POSTS
========================= */

.recent-posts {

    list-style: none;
}


.recent-posts li {

    padding: 11px 0;

    border-bottom: 1px solid #eee;
}


.recent-posts li:last-child {

    border-bottom: none;
}


.recent-posts a {

    color: #444;

    font-size: 14px;

    line-height: 1.5;
}


.recent-posts a:hover {

    color: #007bff;
}


/* =========================
   INSTRUCTOR PROFILE
========================= */

.instructor {

    text-align: center;
}


.instructor-image {

    width: 110px;

    height: 110px;

    object-fit: cover;

    border-radius: 50%;

    margin-bottom: 15px;

    border: 4px solid #f1f1f1;
}


.instructor h4 {

    font-size: 19px;

    margin-bottom: 5px;
}


.designation {

    color: #007bff;

    font-size: 14px;

    margin-bottom: 12px;
}


.instructor > p:not(.designation) {

    font-size: 14px;

    line-height: 1.6;

    color: #666;

    margin-bottom: 15px;
}


.profile-btn {

    display: inline-block;

    background: #007bff;

    color: white;

    padding: 9px 18px;

    border-radius: 5px;

    font-size: 14px;
}


.profile-btn:hover {

    background: #0056b3;
}


/* =========================
   RESPONSIVE SIDEBAR
========================= */

@media (max-width: 900px) {

    .page-wrapper {

        grid-template-columns: 1fr;

    }

    .sidebar {

        width: 100%;

    }

}

/* =========================
   FOOTER
========================= */

.site-footer {

    background: #1f2937;

    color: #ffffff;

    margin-top: 50px;
}


/* =========================
   FOOTER CONTAINER
========================= */

.footer-container {

    width: 92%;

    max-width: 1250px;

    margin: auto;

    padding: 55px 0;

    display: grid;

    grid-template-columns: 2fr 1fr 1fr;

    gap: 50px;
}


/* =========================
   FOOTER BRAND
========================= */

.footer-brand {

    display: flex;

    align-items: flex-start;

    gap: 15px;
}


.footer-brand img {

    width: 65px;

    height: 65px;

    object-fit: cover;

    border-radius: 50%;

    border: 3px solid #ffffff;
}


.footer-brand h2 {

    font-size: 24px;

    margin-bottom: 10px;
}


.footer-brand p {

    max-width: 400px;

    color: #cbd5e1;

    line-height: 1.7;

    font-size: 14px;
}


/* =========================
   FOOTER SOCIAL
========================= */

.footer-social {

    display: flex;

    gap: 10px;

    margin-top: 25px;

    margin-left: 80px;
}


.footer-social a {

    width: 36px;

    height: 36px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #374151;

    color: white;

    transition: 0.3s;
}


.footer-social a:hover {

    background: #007bff;

    transform: translateY(-3px);
}


/* =========================
   FOOTER HEADINGS
========================= */

.footer-contact h3,
.footer-links h3 {

    font-size: 18px;

    margin-bottom: 20px;
}


/* =========================
   CONTACT DETAILS
========================= */

.footer-contact p {

    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin-bottom: 13px;

    color: #cbd5e1;

    font-size: 14px;

    line-height: 1.5;
}


.footer-contact i {

    width: 18px;

    margin-top: 3px;

    color: #60a5fa;
}


.footer-contact a {

    color: #cbd5e1;
}


.footer-contact a:hover {

    color: #60a5fa;
}


/* =========================
   QUICK LINKS
========================= */

.footer-links {

    display: flex;

    flex-direction: column;

    align-items: flex-start;
}


.footer-links a {

    color: #cbd5e1;

    font-size: 14px;

    margin-bottom: 12px;

    transition: 0.3s;
}


.footer-links a:hover {

    color: #60a5fa;

    padding-left: 5px;
}


/* =========================
   COPYRIGHT
========================= */

.copyright {

    border-top: 1px solid #374151;

    padding: 18px 0;
}


.copyright-container {

    width: 92%;

    max-width: 1250px;

    margin: auto;

    display: flex;

    justify-content: space-between;

    align-items: center;
}


.copyright p {

    color: #9ca3af;

    font-size: 13px;
}


/* =========================
   MOBILE FOOTER
========================= */

@media (max-width: 900px) {

    .footer-container {

        grid-template-columns: 1fr;

        gap: 35px;

        padding: 40px 0;
    }


    .footer-social {

        margin-left: 0;
    }


    .copyright-container {

        flex-direction: column;

        gap: 8px;

        text-align: center;
    }

}


/* =========================
   MOBILE RESPONSIVE
========================= */

@media (max-width: 900px) {

    .banner {

        height: 200px;
        background-position: right center;
    }

    .floating-logo {

        width: 95px;

        height: 95px;

        left: 10px;

        bottom: 50px;
    }

    .navbar {

        height: auto;

        padding: 15px 0;
    }

    .navbar-container {

        flex-direction: column;

        gap: 15px;
    }

    .site-name {

        width: auto;
    }

    .main-nav {

        flex-wrap: wrap;

        gap: 15px;
    }

    .search-box {

        width: 100%;

        max-width: 350px;
    }

}

/* ==================================
   LATEST POSTS HEADER
================================== */

.section-header {
    margin-bottom: 25px;
}

.section-header h1 {
    font-size: 30px;
    margin-bottom: 8px;
}

.section-header p {
    color: #777;
    line-height: 1.6;
}


/* ==================================
   POST CARD
================================== */

.post-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    margin-bottom: 5px;
    overflow: hidden;
}

.post-thumbnail {
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.post-thumbnail img:hover {
    transform: scale(1.03);
}

.post-card-content {
    padding: 5px;
}

.post-card-content h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.post-card-content h2 a {
    color: #222;
}

.post-card-content h2 a:hover {
    color: #007bff;
}


/* ==================================
   POST META
================================== */

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #888;
}

.post-meta i {
    margin-right: 4px;
    color: #007bff;
}


/* ==================================
   EXCERPT
================================== */

.post-excerpt {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}


/* ==================================
   READ MORE
================================== */

.read-more {
    display: inline-block;
    background: #007bff;
    color: #ffffff;
    padding: 9px 17px;
    border-radius: 5px;
    font-size: 14px;
    transition: 0.3s;
}

.read-more:hover {
    background: #0056b3;
}


/* ==================================
   NO POST
================================== */

.no-post {
    background: white;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #eee;
}

.no-post h3 {
    margin-bottom: 10px;
}


/* ==================================
   PAGINATION
================================== */

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 35px;
    margin-bottom: 30px;
}

.pagination a {
    min-width: 40px;
    height: 40px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: 0.2s;
}

.pagination a:hover {
    background: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.pagination .active {
    background: #007bff;
    border-color: #007bff;
    color: #ffffff;
}


/* ==================================
   CATEGORY COUNT
================================== */

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-count {
    background: #f1f3f5;
    min-width: 25px;
    height: 25px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
}


/* ==================================
   RESPONSIVE
================================== */

@media (max-width: 700px) {

    .post-thumbnail {
        height: 220px;
    }

    .post-card-content {
        padding: 18px;
    }

    .post-card-content h2 {
        font-size: 20px;
    }

    .post-meta {
        gap: 10px;
    }

}
