/*
 Theme Name:   Twenty Twenty-Five Child
 Description:  Twenty Twenty-Five Child Theme
 Author:       Chad Latta
 Template:     twentytwentyfive
 Version:      1.7.0 - Manual Grid & Cleaner Alignment
*/

/* =========================================
   1. The Layout Logic (Sidebar vs Mobile)
========================================= */

/* --- MOBILE DEFAULT (Screens < 768px) --- */
.mobile-header {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.sidebar-layout {
    display: block;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* FIX: More robust selector to hide the sidebar on mobile */
.sidebar-layout > *:first-child {
    display: none !important; 
}

/* --- DESKTOP (Screens >= 768px) --- */
@media (min-width: 768px) {
    .mobile-header {
        display: none !important;
    }

    .sidebar-layout {
        display: grid;
        grid-template-columns: 320px 1fr; 
        gap: 3rem; 
        align-items: start;
        padding: 0 2rem;
    }

    .sidebar-layout > *:first-child {
        display: block !important; /* Ensure it comes back on desktop */
        border-right: 1px solid #e5e5e5;
        padding-right: 3rem !important; 
        margin-right: 0;
    }
}

/* =========================================
   2. Embedded Form Styling (Hostinger)
========================================= */

/* The Submit Button */
.hostinger-reach-block-subscription-form .hostinger-reach-block-submit {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-radius: 0px !important;
    border: none !important;
    padding: 12px 24px !important;
    font-weight: bold !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: background 0.2s ease;
    background-image: none !important; 
}

.hostinger-reach-block-subscription-form .hostinger-reach-block-submit:hover {
    background-color: #333333 !important; 
    transform: translateY(-1px);          
}

/* The Email Input Field */
.hostinger-reach-block-subscription-form input[type="email"] {
    border: 1px solid #000000 !important;
    border-radius: 0px !important;
    padding: 12px !important;
    background-color: #ffffff !important;
}

.hostinger-reach-block-subscription-form .required {
    color: #000000;
}

/* =========================================
   3. WordPress Search Block Styling
========================================= */

/* Search Input Field */
.wp-block-search .wp-block-search__input {
    border: 1px solid #000000 !important;
    border-radius: 0px !important;
    padding: 12px !important;
    background-color: #ffffff !important;
    color: #000000;
}

/* Search Button */
.wp-block-search .wp-block-search__button {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-radius: 0px !important;
    border: none !important;
    padding: 12px 24px !important;
    font-weight: bold !important;
    font-size: 16px !important;
    margin-left: 5px !important;
    cursor: pointer !important;
    transition: background 0.2s ease;
}

.wp-block-search .wp-block-search__button:hover {
    background-color: #333333 !important; 
    transform: translateY(-1px);
}

/* =========================================
   4. Prompt Cards (Manual Grid Support)
========================================= */

/* --- A. REMOVED FORCED GRID --- 
   You are controlling the grid via the Editor now. 
*/

/* --- B. CREATE THE "CARD" LOOK --- */
.prompt-card {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    
    /* Ensure content stacks vertically */
    display: flex !important;
    flex-direction: column !important;
    height: 100%; /* Fill the grid cell */
    box-sizing: border-box;
}

.prompt-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    border-color: #9b51e0; 
}

/* --- C. HEADER ALIGNMENT (Safer Fix) --- */
/* We set a safe min-height for the header row (Badge + Date).
   This ensures short headers don't shrink, keeping titles aligned. */
.prompt-card > .wp-block-group:first-child {
    min-height: 48px !important; 
    display: flex !important;
    align-items: center !important;
}

/* --- D. PUSH FOOTER TO BOTTOM --- */
.prompt-card > .wp-block-group:last-child {
    margin-top: auto !important;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

/* --- E. STYLE THE "BADGE" (Category) --- */
.prompt-card .taxonomy-category a {
    background-color: #f3f4f6;
    color: #4b5563;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem !important;
    text-transform: uppercase;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    border: 1px solid #e5e7eb;
    display: inline-block;
    white-space: nowrap; 
}

/* --- F. TYPOGRAPHY CLEANUP --- */
.prompt-card h2 {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    
    /* Consistent spacing */
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    text-decoration: none !important;
}

.prompt-card h2 a {
    text-decoration: none !important;
}

.prompt-card .wp-block-post-excerpt {
    font-size: 0.95rem;
    color: #686868;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; 
}

.prompt-card .wp-block-post-date {
    font-size: 0.85rem !important;
    color: #9ca3af !important;
    font-weight: 400;
    white-space: nowrap !important;
}

/* Post card rating stars */
.pr-post-card-stars {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fbbf24;
    letter-spacing: 1px;
    display: inline-block;
}

/* When there are no ratings yet - gray stars */
.pr-post-card-stars.no-rating {
    color: #d1d5db;
    opacity: 0.5;
}

/* Optional: Add a hover effect */
.prompt-card:hover .pr-post-card-stars {
    filter: brightness(1.1);
}