/*
Theme Name:   Hestia Child
Description:  Child theme for Hestia. Customizes featured posts layout.
Author:       Drudgington Post
Template:     hestia
Version:      1.0.1
Text Domain:  hestia-child
*/

.hestia-blog-featured-posts .card {
    min-height: 0;
    height: auto;
}

.hestia-blog-featured-posts .card .card-body {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.hestia-blog-featured-posts .card .card-title {
    margin-top: 0;
    margin-bottom: 0.35rem;
    font-size: 1.25rem;
    line-height: 1.2;
}

.hestia-blog-featured-posts .card .hestia-child-author {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 16px;
    line-height: 1.3;
}

.hestia-blog-featured-posts .card .hestia-child-author-link {
    text-decoration: underline;
    font-weight: 500;
    padding: 2px 0;
}

.hestia-blog-featured-posts .card .hestia-child-author-link:hover {
    text-decoration: none;
    opacity: 0.85;
}

.hestia-blog-featured-posts .card .card-description {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.35;
}

.hestia-blog-featured-posts {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Drudge header search bar */
.drudge-header-search {
    padding: 10px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}
.drudge-header-search form {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    max-width: 1140px;
    margin: 0 auto;
}
.drudge-header-search input[type="search"] {
    flex: 1 1 auto;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    min-width: 0;
}
.drudge-header-search select {
    flex: 0 0 auto;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    font-size: 14px;
}
.drudge-header-search button {
    flex: 0 0 auto;
    padding: 8px 16px;
    border: 1px solid #2c3e50;
    border-radius: 3px;
    background: #2c3e50;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.drudge-header-search button:hover {
    background: #1a252f;
    border-color: #1a252f;
}
@media (max-width: 600px) {
    .drudge-header-search form { flex-wrap: wrap; }
    .drudge-header-search input[type="search"] { flex: 1 1 100%; }
}

.drudge-header-search input[type="search"]:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.2);
    background-image: none;
}

/* Shrink empty decorative header bar on interior pages */
#primary.page-header.header-small {
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 !important;
}
#primary.page-header.header-small .header-filter-gradient {
    height: 40px !important;
}
/* Neutralize the negative top margin that would pull content into the shrunken bar */
#primary.page-header.header-small + .main.main-raised,
#primary.page-header.header-small ~ .main.main-raised {
    margin-top:30px !important;
}

/* Interior post title — ZeroHedge-style compact headline */
h1.hestia-title.title-in-content.entry-title {
    font-family: Impact, "Arial Narrow Bold", sans-serif !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 36px !important;
    color: #222222 !important;
    letter-spacing: 0.5px !important;
    text-transform: none !important;
    margin: 10px 0 25px 0 !important;
}

/* Mobile adjustments — interior post title and search-bar clearance */
@media (max-width: 768px) {
    h1.hestia-title.title-in-content.entry-title {
        font-family: Impact, "Arial Narrow Bold", sans-serif !important;
        font-size: 26px !important;
        font-weight: 700 !important;
        line-height: 30px !important;
        color: #222222 !important;
        letter-spacing: 0.5px !important;
        margin: 20px 0 25px 0 !important;
    }
    #primary.page-header.header-small + .main.main-raised,
    #primary.page-header.header-small ~ .main.main-raised {
        margin-top: 50px !important;
    }
}

/* Hide Hestia's footer attribution */
.copyright.pull-right {
    display: none !important;
}


/* ---------- Mobile: prevent wide tables from breaking layout ---------- */
@media (max-width: 768px) {
    .entry-content table,
    article table,
    .post-content table {
        max-width: 100% !important;
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
    }
}


/* ---------- Mobile: cap header search bar width ---------- */
@media (max-width: 768px) {
    .drudge-header-search {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .drudge-header-search form,
    .drudge-header-search input,
    .drudge-header-search select {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}
