/* Professional Homepage Styling for The Littlest Thistle */

/* Typography improvements */
.wp-block-heading {
    letter-spacing: -0.02em;
}

h2.wp-block-heading {
    font-size: 2.25rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
}

h3.wp-block-heading {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

/* Section spacing */
.wp-block-group.alignwide,
.wp-block-group.alignfull {
    margin-top: 0;
    margin-bottom: 0;
}

/* Hero section */
.wp-block-cover.alignfull {
    min-height: 500px !important;
}

.wp-block-cover h1 {
    font-size: clamp(2rem, 5vw, 3rem) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

/* Category cards */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

/* Post grid improvements */
.wp-block-post-template {
    gap: 2rem !important;
}

.wp-block-post-featured-image img {
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.wp-block-post-featured-image:hover img {
    transform: scale(1.05);
}

.wp-block-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wp-block-post-title a:hover {
    color: #2563eb;
}

/* Popular posts grid styling */
.wp-block-post-template li {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.wp-block-post-template li:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

/* View count badges */
.wp-block-post-template .has-text-color {
    margin: 0.75rem 0;
}

/* Button styling */
.wp-block-button__link {
    padding: 0.75rem 1.75rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.is-style-outline .wp-block-button__link {
    border-width: 2px !important;
}

/* FAQ accordion styling */
.faq-item {
    transition: all 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.faq-item summary {
    cursor: pointer;
    user-select: none;
}

.faq-item summary:hover {
    color: #2563eb;
}

.faq-item[open] {
    border-color: #2563eb !important;
}

/* About section */
.wp-block-media-text {
    align-items: center;
}

.wp-block-media-text__media img {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Newsletter section */
.wp-block-group.has-contrast-background-color {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
}

/* Learning paths cards */
.wp-block-cover {
    transition: all 0.3s ease;
}

.wp-block-cover:hover {
    transform: translateY(-5px);
}

/* Responsive improvements */
@media (max-width: 781px) {
    /* Larger headings on mobile */
    h1.wp-block-heading {
        font-size: 2rem !important;
    }
    
    h2.wp-block-heading {
        font-size: 1.75rem !important;
    }
    
    h3.wp-block-heading {
        font-size: 1.25rem !important;
    }
    
    /* Single column grids */
    .wp-block-post-template {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .wp-block-columns {
        flex-direction: column;
        gap: 1.5rem !important;
    }
    
    /* Larger text on mobile */
    .wp-block-paragraph {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }
    
    /* Better card sizing */
    .wp-block-post-template li {
        padding: 1.25rem;
    }
    
    /* Reduce section padding on mobile */
    .wp-block-group.alignfull {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Better button sizing */
    .wp-block-button__link {
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    /* Category cards mobile */
    .category-card {
        min-height: 300px !important;
        margin-bottom: 1.5rem;
    }
    
    /* Post titles larger on mobile */
    .wp-block-post-title {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
    }
    
    /* Excerpts readable on mobile */
    .wp-block-post-excerpt {
        font-size: 0.95rem !important;
    }
    
    /* FAQ items better spacing */
    .faq-item {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .faq-item summary {
        font-size: 1rem !important;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Section backgrounds alternating */
.wp-block-group:nth-child(even) {
    background-color: #f9fafb;
}

/* Add subtle animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-block-group {
    animation: fadeInUp 0.6s ease-out;
}

/* Improve readability */
.wp-block-paragraph {
    line-height: 1.7;
}

/* Latest posts styling */
.wp-block-latest-posts {
    gap: 2rem !important;
}

.wp-block-latest-posts li {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.wp-block-latest-posts li:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.wp-block-latest-posts__featured-image img {
    border-radius: 12px 12px 0 0;
}

/* Spacing consistency */
.wp-block-spacer {
    margin: 0 !important;
}

/* Additional mobile optimizations */
@media (max-width: 600px) {
    /* Even larger touch targets on small phones */
    .wp-block-button__link {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Post cards full width with better padding */
    .wp-block-post-template li {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    /* Images full width */
    .wp-block-post-featured-image img {
        width: 100%;
        height: auto;
    }
    
    /* Hero section mobile */
    .wp-block-cover.alignfull {
        min-height: 400px !important;
        padding: 2rem 1rem !important;
    }
    
    /* Better spacing for mobile */
    .wp-block-group {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* View count badges more prominent */
    .wp-block-post-template .has-text-color {
        font-size: 0.9rem !important;
    }
    
    /* Category cards stack nicely */
    .wp-block-cover {
        margin-bottom: 1.5rem;
    }
    
    /* Latest posts better spacing */
    .wp-block-latest-posts {
        padding: 0 !important;
    }
    
    .wp-block-latest-posts li {
        margin-bottom: 1.5rem !important;
    }
    
    /* Media text stack on mobile */
    .wp-block-media-text {
        display: block !important;
    }
    
    .wp-block-media-text__media {
        margin-bottom: 1.5rem;
    }
    
    /* Better readability */
    body {
        font-size: 16px !important;
    }
}
