/*
Theme Name: Blog Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A modern blog theme with AdSense and SEO support
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blog-theme
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0a0a0a;
    color: #ddd;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #00ffff;
    transition: color 0.3s ease;
}

a:hover {
    color: #00aaaa;
}

/* Container & Layout */
.blog-page {
    padding-top: 70px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Header Styles */
.site-header {
    background-color: #111;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-branding h1 {
    font-size: 1.8rem;
    color: #00ffff;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-navigation a {
    color: #fff;
    font-weight: 500;
}

.main-navigation a:hover {
    color: #00ffff;
}

/* Titles */
.page-title, .section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    border-left: 5px solid #00ffff;
    padding-left: 10px;
    color: #fff;
}

/* Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    grid-auto-flow: dense;
}

/* Cards */
.blog-card {
    background: #111;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* Thumbnail */
.blog-card .thumb {
    position: relative;
    overflow: hidden;
}
.blog-card .thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-card:hover .thumb img {
    transform: scale(1.08);
}

/* Category Badge */
.blog-card .category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #00ffff;
    color: #111;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.blog-card:hover .category {
    transform: scale(1.1);
    opacity: 0.9;
}

/* Card Content */
.blog-card .card-content {
    padding: 18px;
}
.blog-card h2 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: #fff;
    line-height: 1.4;
}
.blog-card p {
    font-size: 0.95rem;
    color: #bbb;
    margin: 0 0 12px;
    line-height: 1.5;
}

/* Meta */
.blog-meta {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 14px;
    margin: 0 5px;
    border-radius: 8px;
    background: #222;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
}
.pagination a:hover {
    background: #00ffff;
    color: #111;
}

/* Featured Posts */
.featured-grid .featured-card {
    border: 2px solid #00ffff;
}

/* Animations */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #00ffff;
    color: #111;
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 0 10px #00ffff;
    animation: pulse 2s infinite;
    z-index: 999;
    display: none;
}
#backToTop:hover {
    transform: scale(1.1);
}

/* Pulse animation */
@keyframes pulse {
    0% { box-shadow: 0 0 5px #00ffff; }
    50% { box-shadow: 0 0 15px #00ffff; }
    100% { box-shadow: 0 0 5px #00ffff; }
}

/* Fade-in on scroll */
.blog-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Class added when element enters viewport */
.blog-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger effect using CSS variables */
.all-posts-grid .blog-card {
    transition-delay: var(--delay);
}

/* Featured posts fade-in */
.featured-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.featured-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* AdSense containers */
.ad-container {
    margin: 30px 0;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 8px;
    text-align: center;
}

.ad-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Footer */
.site-footer {
    background-color: #111;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-widget h3 {
    color: #00ffff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #ddd;
}

.footer-widget a:hover {
    color: #00ffff;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #888;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 15px;
    }
    
    .page-title, .section-title {
        font-size: 1.8rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
}