/*
Theme Name: My Custom Blog
Theme URI: 
Description: A custom child theme based on Twenty Twenty-Four
Author: Your Name
Author URI: 
Template: twentytwentyfour
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: my-custom-blog
*/

/* Import parent theme styles */
@import url("../twentytwentyfour/style.css");

/* Custom styles */
:root {
    --color-primary: #ec4899; /* Vibrant blue for accents/buttons */
    --color-secondary: #ec3c94; /* Darker blue for hover */
    --color-background: #f8f9fa; /* Light grey background */
    --color-text: #343a40; /* Dark grey for main text */
    --color-text-light: #6c757d; /* Lighter grey for descriptions */
    --color-white: #ffffff;
    --color-border: #dee2e6;

    --font-family-primary: 'Inter', -apple-system, BlinkMacMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-family-headings: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* Global styles */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    display: flex; /* Make body a flex container */
    flex-direction: column; /* Stack children vertically */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
}

#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content {
    flex-grow: 1; /* Allow content to grow and push footer down */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    color: var(--color-text);
    line-height: 1.2;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-secondary);
}

.container {
    max-width: 1200px; /* Adjusted for tighter content */
    margin: 0 auto;
    padding: 0 2rem;
}

/* Single Post Content Width */
.single-post-container {
    max-width: 1400px; /* Wider content for single posts */
    margin: 2rem auto; /* Adjusted margins */
    padding: 0 2rem;
}

.single-post-title {
    font-family: var(--font-family-headings);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.single-post-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.single-post-meta a {
    color: var(--color-text-light);
}

.single-post-meta a:hover {
    color: var(--color-primary);
}

/* Header Styles */
.site-header {
    position: sticky;
    top: 0;
    background-color: var(--color-white);
    padding: 1rem 0;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px; /* Adjusted for tighter content */
    margin: 0 auto;
    padding: 0 2rem;
}

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-title {
    margin: 0;
    font-family: var(--font-family-headings);
    font-size: 0.95rem; /* Made bigger */
    font-weight: normal;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.site-title a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: var(--color-secondary);
}

.site-description {
    display: none; /* Hide site description as per screenshot */
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-family-primary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.nav-menu .current-menu-item > a {
    color: var(--color-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.menu-toggle-bar {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Search Container (above articles) */
.search-container {
    max-width: 1080px; /* Reduced by 10% from 1200px */
    margin: 3rem auto 2rem auto;
    padding: 2rem;
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    width: 100%;
}

.search-field {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 6px 0 0 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-field:focus {
    border-color: var(--color-primary);
}

.search-submit {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background-color: var(--color-secondary);
}

/* Category Tabs */
.categories-container {
    max-width: 1200px; /* Adjusted for tighter content */
    margin: 2rem auto 2rem auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center; /* Center tabs */
}

.categories-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-tab a {
    display: block;
    padding: 0.6rem 1.2rem; /* Adjusted padding */
    background-color: var(--color-white); /* White background */
    color: var(--color-text-light); /* Lighter text color */
    border: 1px solid var(--color-border);
    border-radius: 25px; /* Pill shape */
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-tab a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.category-tab.active a {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* Blog Post Grid */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem; /* Increased gap */
    padding: 2rem;
    max-width: 1200px; /* Adjusted for tighter content */
    margin: 0 auto;
}

.blog-post {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.blog-post-thumbnail {
    width: 100%;
    height: 200px; /* Fixed height for images */
    overflow: hidden;
}

.blog-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post:hover .blog-post-thumbnail img {
    transform: scale(1.05);
}

.blog-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-post-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-title a:hover {
    color: var(--color-primary);
}

.blog-post-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.blog-post-meta a {
    color: var(--color-text-light);
    transition: color 0.3s ease;
}

.blog-post-meta a:hover {
    color: var(--color-primary);
}

.blog-post-excerpt p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Author Info at Bottom of Card */
.blog-post-author-info {
    display: flex;
    align-items: center;
    margin-top: auto; /* Push to the bottom */
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    gap: 0.75rem;
    margin-bottom: 2rem; /* Add margin-bottom for spacing on single posts */
}

.author-avatar img {
    border-radius: 50%;
    width: 60px; /* Adjusted to match avatar size in single.php */
    height: 60px; /* Adjusted to match avatar size in single.php */
    object-fit: cover;
}

.author-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

/* Ensure the entire article card is clickable */
.blog-post-link-wrapper {
    text-decoration: none; /* Remove underline from the wrapper link */
    color: inherit; /* Inherit text color */
    display: block; /* Make the link wrapper a block element */
    height: 100%; /* Ensure it covers the entire card height */
}

/* Remove individual link styles from nested elements as the parent is now the link */
.blog-post-title a,
.blog-post-thumbnail a {
    text-decoration: none;
    color: inherit;
}

/* Read More Button - removed from template, but keeping styles if it's re-added or for other uses */
.read-more-button {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
}

.read-more-button:hover {
    background-color: var(--color-secondary);
    transform: translateY(-2px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    gap: 0.5rem;
}

.pagination a,
.pagination .current {
    display: block;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.pagination .current {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* Footer Styles */
.site-footer {
    background-color: var(--color-text);
    color: var(--color-white);
    padding: 0.25rem 0;
    text-align: center;
    font-size: 0.7rem;
    margin-top: auto; /* Push footer to the bottom */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0; /* Removed all margins */
    display: flex;
    justify-content: center;
    gap: 0.3rem; /* Minimal gap between links */
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.7rem; /* Smallest font size for nav links */
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--color-primary);
}

.copyright {
    font-size: 0.65rem; /* Even smaller font for copyright */
    color: var(--color-text-light);
    opacity: 0.4; /* More transparent for less visual weight */
    margin-top: 0.1rem; /* Smallest margin */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container,
    .header-content,
    .blog-posts,
    .categories-container,
    .search-container,
    .footer-content,
    .single-post-container {
        padding: 0 1.5rem;
    }

    .site-title {
        font-size: 0.9rem; /* Adjusted for smaller screens */
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .blog-posts {
        gap: 2rem;
    }

    .blog-post-title {
        font-size: 1.35rem;
    }

    .blog-post-thumbnail {
        height: 180px;
    }

    .footer-content {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .container,
    .header-content,
    .blog-posts,
    .categories-container,
    .search-container,
    .footer-content,
    .single-post-container {
        padding: 0 1rem;
    }

    .site-title {
        font-size: 0.7rem; /* Adjusted for smaller screens */
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .blog-posts {
        grid-template-columns: 1fr; /* Single column on mobile */
        padding: 1rem;
    }

    .blog-post-title {
        font-size: 1.25rem;
    }

    .blog-post-thumbnail {
        height: 220px; /* Taller on single column */
    }

    .search-container {
        margin-top: 2rem;
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        flex-direction: column;
    }

    .search-field {
        border-radius: 6px 6px 0 0;
    }

    .search-submit {
        border-radius: 0 0 6px 6px;
        width: 100%;
    }

    .categories-tabs {
        justify-content: flex-start; /* Align tabs left on mobile */
        overflow-x: auto; /* Allow horizontal scrolling if needed */
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem; /* Space for scrollbar */
    }

    .category-tab a {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .footer-content {
        padding: 0 1rem;
    }

    .footer-nav {
        gap: 0.2rem; /* Even smaller gap on mobile */
    }

    .copyright {
        font-size: 0.6rem; /* Smallest font on mobile */
    }

    .single-post-title {
        font-size: 1.8rem;
    }
}

/* Responsive design */
@media (max-width: 1200px) {
    .blog-posts {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .blog-posts {
        grid-template-columns: 1fr;
        max-width: 500px;
        padding: 0 1rem;
    }
    
    .blog-post {
        padding: 1.25rem;
    }
    
    .blog-post-title {
        font-size: 1.2rem;
    }
    
    .main-navigation ul {
        gap: 1rem;
    }
    
    .site-header {
        padding: 1rem 0;
    }

    .search-container {
        padding: 0 1rem;
    }

    .search-field {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
        padding-right: 3rem;
    }

    .search-submit {
        padding: 0.625rem 1rem;
    }

    .categories-container {
        padding: 0 1rem;
    }

    .categories-tabs {
        gap: 0.5rem;
    }

    .category-tab {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
        min-width: 80px;
    }
} 