/* style.css - Main stylesheet for BlogVibe (Simplified for Learning) */

* {
    box-sizing: border-box;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: 0px;
    padding-top: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.7;
    color: #4A5568;
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
    padding-top: 0px;
    padding-right: 20px;
    padding-bottom: 0px;
    padding-left: 20px;
}

a {
    text-decoration: none;
    color: #5D3FD3;
    transition-property: color;
    transition-duration: 0.2s;
    transition-timing-function: ease-in-out;
}

a:hover {
    color: #4a2fa3;
}

ul {
    list-style-type: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;
}

h1, h2, h3, h4 {
    margin-bottom: 12px; 
    color: #2D3748;
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 45px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
p {
    margin-bottom: 19px;
    color: #4A5568;
    font-size: 16px;
}

.navbar {
    background-color: #ffffff;
    padding-top: 15px;
    padding-right: 0px;
    padding-bottom: 15px;
    padding-left: 0px;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.06);
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 29px;
    font-weight: bold;
    color: #5D3FD3;
}
.logo span {
    color: #2D3748;
}
.navbar nav ul {
    display: flex;
    align-items: center;
}
.navbar nav ul li {
    margin-left: 30px;
}
.navbar nav ul li a {
    color: #4A5568;
    font-weight: 500;
    padding-top: 10px;
    padding-right: 0px;
    padding-bottom: 10px;
    padding-left: 0px;
    text-decoration: none;
    display: block;
    border-bottom-width: 3px;
    border-bottom-style: solid;
    border-bottom-color: transparent;
    transition-property: color, border-bottom-color;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}
.navbar nav ul li a:hover {
    color: #5D3FD3;
    border-bottom-color: #5D3FD3;
}
.navbar nav ul li a.active {
    color: #5D3FD3;
    font-weight: 700;
    border-bottom-color: #5D3FD3;
}
.search-icon a {
    font-size: 19px;
    color: #4A5568;
}

.hero {
    background-color: #f0eaff;
    padding-top: 70px;
    padding-right: 0px;
    padding-bottom: 70px;
    padding-left: 0px;
    text-align: left;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: #e2e8f0;
}
.hero-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 50px;
}
.hero-text h1 {
    font-size: 48px;
    color: #2D3748;
    line-height: 1.2;
    margin-bottom: 8px;
}
.hero-text h1 .highlight {
    color: #5D3FD3;
}
.hero-text p {
    font-size: 18px;
    color: #4A5568;
    margin-bottom: 35px;
    max-width: 550px;
    line-height: 1.7;
}
.btn {
    padding-top: 12px;
    padding-right: 28px;
    padding-bottom: 12px;
    padding-left: 28px;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    font-weight: 600;
    transition-property: background-color, color, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    display: inline-block;
    margin-right: 12px;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-top-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
    cursor: pointer;
    text-align: center;
}
.btn:active {
    transform: scale(0.98);
}
.btn-primary {
    background-color: #5D3FD3;
    color: #ffffff;
    box-shadow: 0px 4px 15px rgba(93, 63, 211, 0.25);
}
.btn-primary:hover {
    background-color: #4a2fa3;
    box-shadow: 0px 6px 20px rgba(93, 63, 211, 0.3);
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: #ffffff;
    color: #5D3FD3;
    border-width: 2px; /* This is a shorthand, but very common */
    border-style: solid;
    border-color: #e2e8f0;
}
.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}
.hero-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1);
}
.hero-main-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}
.stat-box {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95);
    color: #2D3748;
    padding: 15px 22px; /* Shorthand for padding, common enough */
    border-radius: 10px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.1);
    text-align: left;
    min-width: 190px;
}
.stat-box strong {
    display: block;
    font-size: 28px;
    color: #5D3FD3;
    margin-bottom: 3px;
    font-weight: 700;
}
.stat-box span {
    font-size: 15px;
    color: #4A5568;
}
.stat-readers {
    top: 25px;
    right: 25px;
}
.stat-articles {
    bottom: 25px;
    left: 25px;
}

.featured-stories {
    padding-top: 70px;
    padding-bottom: 70px;
}
.featured-stories h2 {
    text-align: center;
    font-size: 36px;
    color: #2D3748;
    margin-bottom: 8px;
}
.featured-subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 50px;
    font-size: 18px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.articles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Default to 3 columns for wider screens */
    gap: 35px;
}
.article-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 8px 25px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition-property: transform, box-shadow;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 12px 30px rgba(0,0,0,0.1);
}
.article-card img.featured-article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.article-card .article-content {
    padding: 25px; /* Shorthand used for simplicity here */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.article-card .category-tag {
    display: inline-block;
    background-color: #eef2ff;
    color: #5D3FD3;
    padding: 6px 12px; /* Shorthand */
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    align-self: flex-start;
}
.article-card .article-content h3 {
    font-size: 22px;
    color: #2D3748;
    margin-bottom: 10px;
    line-height: 1.4;
}
.article-card .article-content p.description {
    color: #4A5568;
    font-size: 15px;
    flex-grow: 1;
    margin-bottom: 18px;
    line-height: 1.6;
}
.article-card .article-meta {
    font-size: 14px;
    color: #718096;
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: #e2e8f0;
    padding-top: 12px;
    margin-top: auto;
    text-align: right;
}
.view-all-posts {
    text-align: center;
    margin-top: 50px;
}

.footer {
    background-color: #1A202C;
    color: #A0AEC0;
    padding-top: 60px;
    padding-right: 0px;
    padding-bottom: 20px;
    padding-left: 0px;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    /* Default to 3 columns for footer, adjust with media queries */
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-about .logo {
    color: #ffffff;
    font-size: 29px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}
.footer-about .logo span {
    color: #718096;
}
.footer-about p {
    font-size: 14px;
    margin-top: 15px;
    margin-bottom: 15px;
    line-height: 1.7;
}
.social-icons {
    margin-top: 15px;
}
.social-icons a {
    color: #A0AEC0;
    margin-right: 18px;
    font-size: 24px;
    transition-property: color, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}
.social-icons a:last-child {
    margin-right: 0px;
}
.social-icons a:hover {
    color: #ffffff;
    transform: translateY(-3px);
}
.footer h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #CBD5E0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-links ul li,
.footer-categories ul li {
    margin-bottom: 12px;
}
.footer-links ul li a,
.footer-categories ul li a {
    color: #A0AEC0;
    font-size: 15px;
    transition-property: color, padding-left;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}
.footer-links ul li a:hover,
.footer-categories ul li a:hover {
    color: #ffffff;
    padding-left: 5px;
}
.footer-bottom {
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: #2D3748;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.footer-bottom p {
    margin-bottom: 0px;
}
.footer-bottom div a {
    margin-left: 25px;
    color: #A0AEC0;
}
.footer-bottom div a:hover {
    color: #ffffff;
}

@media (max-width: 992px) {
    .hero-content-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text h1, .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-image-container {
        margin-top: 40px;
        max-width: 500px;
    }
    .stat-readers, .stat-articles {
        font-size: 14px;
    }
    .articles-grid { /* 2 columns for tablets */
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid { /* 2 columns for footer on tablets */
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
    }
    .navbar nav {
        margin-top: 15px;
    }
    .navbar nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    .navbar nav ul li {
        margin-top: 5px;
        margin-right: 12px;
        margin-bottom: 5px;
        margin-left: 12px;
    }

    h1 { font-size: 35px; }
    .hero-text h1 { font-size: 40px; }
    .hero-text p { font-size: 17px; }
    .btn {
        padding-top: 10px;
        padding-right: 22px;
        padding-bottom: 10px;
        padding-left: 22px;
        font-size: 14px;
    }
    .stat-box {
        padding-top: 12px;
        padding-right: 18px;
        padding-bottom: 12px;
        padding-left: 18px;
        min-width: 160px;
    }
    .stat-box strong { font-size: 24px; }
    .stat-box span { font-size: 14px; }

    .featured-stories h2 { font-size: 29px; }
    .featured-subtitle { font-size: 16px; margin-bottom: 30px; }
    .articles-grid { /* 1 column for articles on mobile */
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .article-card .article-content h3 { font-size: 19px; }
    .article-card .article-content p.description { font-size: 14px; }

    .footer-grid { /* 1 column for footer on mobile */
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-about p {
        margin-left: auto;
        margin-right: auto;
    }
    .social-icons {
        justify-content: center;
        display: flex;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-bottom div {
        margin-top: 15px;
    }
    .footer-bottom div a {
        margin-top: 0px;
        margin-right: 12px;
        margin-bottom: 0px;
        margin-left: 12px;
    }
}