/*
Theme Name: GeneratePress Child (japanesefestival.net)
Theme URI: https://japanesefestival.net/
Description: Child theme for GeneratePress on japanesefestival.net. Adds a custom 404 page and per-site overrides.
Author: Ivy do
Author URI: https://japanesefestival.net/
Template: generatepress
Version: 1.0.1
Text Domain: jpf-child
*/

/* =============================================================
   FEATURED IMAGE (HERO) — center-crop instead of stretch
   critical-css already locks `.wp-post-image` to aspect-ratio 1200/630.
   Without object-fit, portrait sources (e.g. 1200x1593) get
   horizontally squashed into the landscape frame.
   ============================================================= */
img.wp-post-image {
    object-fit: cover !important;
    object-position: center !important;
}

/* =============================================================
   404 PAGE STYLES (Hybrid layout: wizard hero + concierge body)
   ============================================================= */

/* ----- Hero ----- */
.error-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background-color: #1a1a1a;
    background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), var(--error-hero-bg, url('/wp/wp-content/uploads/2026/04/404-hero.webp'));
    background-size: cover;
    background-position: center;
    padding: 60px 20px;
    box-sizing: border-box;
}

.error-hero__inner {
    max-width: 720px;
    width: 100%;
}

.error-hero__title {
    font-size: 2.6rem;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
    color: #fff;
}

.error-hero__lead {
    font-size: 1.1rem;
    margin: 0 0 32px;
    opacity: 0.95;
    color: #fff;
}

.error-hero__buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 540px;
    margin: 0 auto;
}

.error-hero__btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.95);
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.15s ease, background 0.15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.error-hero__btn:hover,
.error-hero__btn:focus {
    background: #fff;
    transform: translateY(-2px);
    color: #c8102e; /* accent — adjust to match site */
}

.error-hero__btn-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ----- Search section ----- */
.error-search {
    max-width: 720px;
    margin: 60px auto 0;
    padding: 0 20px;
    text-align: center;
}

.error-search__title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 18px;
    color: #333;
}

.error-search .search-form {
    display: flex;
    gap: 8px;
    max-width: 560px;
    margin: 0 auto;
}

.error-search .search-form label {
    flex: 1;
}

.error-search .search-field {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

.error-search .search-submit {
    padding: 14px 24px;
    background: #c8102e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.error-search .search-submit:hover {
    background: #a30c24;
}

/* ----- Popular guides grid ----- */
.error-popular {
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 0 20px;
}

.error-popular__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 24px;
    text-align: center;
    color: #333;
}

.error-popular__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.error-popular__card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.error-popular__card:hover,
.error-popular__card:focus {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.14);
    color: inherit;
}

.error-popular__thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}

.error-popular__cardtitle {
    padding: 14px 16px 18px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #222;
}

/* ----- Footer CTA ----- */
.error-footer-cta {
    text-align: center;
    margin: 60px auto 80px;
    padding: 0 20px;
}

.error-footer-cta__btn {
    display: inline-block;
    padding: 14px 32px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.15s ease;
}

.error-footer-cta__btn:hover,
.error-footer-cta__btn:focus {
    background: #333;
    color: #fff;
}

/* ----- Responsive (mobile) ----- */
@media (max-width: 600px) {
    .error-hero {
        min-height: 460px;
        padding: 48px 16px;
    }
    .error-hero__title {
        font-size: 2rem;
    }
    .error-hero__lead {
        font-size: 1rem;
        margin-bottom: 24px;
    }
    .error-hero__buttons {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
    .error-popular__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .error-search .search-form {
        flex-direction: column;
    }
    .error-search .search-submit {
        width: 100%;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .error-popular__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
