/* ========================================
   SEARCH RESULTS PAGE
   v1.6.58: Mobile-friendly search layout
   ======================================== */

/* SEARCH RESULTS LAYOUT */
.search-results-page {
    padding: 2rem 1rem;
}

.search-results-layout {
    max-width: 1200px;
    margin: 0 auto;
}

.search-results-main {
    width: 100%;
}

/* SEARCH HEADER */
.search-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.search-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #212121;
    line-height: 1.3;
}

.search-query {
    color: #c41e3a;
    font-style: italic;
}

.search-count {
    font-size: 0.95rem;
    color: #757575;
    margin: 0;
}

/* SEARCH RESULTS LIST */
.search-results-list {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* NO RESULTS */
.search-no-results {
    text-align: center;
    padding: 3rem 1rem;
}

.no-results-content {
    max-width: 600px;
    margin: 2rem auto 0;
    text-align: left;
}

.no-results-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #424242;
}

.search-suggestions {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.search-suggestions h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #212121;
}

.search-suggestions ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.search-suggestions li {
    margin-bottom: 0.5rem;
    color: #616161;
}

/* SEARCH RETRY FORM */
.search-form-retry {
    margin-top: 2rem;
}

.search-form-retry h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #212121;
}

.search-retry-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
}

.search-retry-form input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
}

.search-retry-form button {
    padding: 0.75rem 2rem;
    background: #c41e3a;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-retry-form button:hover {
    background: #a01729;
}

/* ========================================
   EMBED ALIGNMENT FIX
   v1.6.58: Proper centering for images, YouTube, Twitter/X
   ======================================== */

/* ARTICLE CONTENT EMBEDS */
.article-content iframe,
.article-content embed,
.article-content object,
.article-content video {
    max-width: 100%;
    height: auto;
}

/* CENTERED EMBEDS */
.article-content .aligncenter,
.article-content figure.aligncenter,
.article-content .wp-block-embed.aligncenter,
.article-content .wp-block-image.aligncenter {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
}

/* CENTER IMAGE INSIDE FIGURE */
.article-content figure.aligncenter img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* YOUTUBE EMBEDS - CENTERED */
.article-content iframe[src*="youtube.com"].aligncenter,
.article-content iframe[src*="youtu.be"].aligncenter,
.article-content .wp-block-embed__wrapper iframe[src*="youtube"] {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* TWITTER/X EMBEDS - CENTERED */
.article-content .twitter-tweet.aligncenter,
.article-content iframe[src*="twitter.com"].aligncenter,
.article-content iframe[src*="x.com"].aligncenter,
.article-content blockquote.twitter-tweet {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

/* GUTENBERG EMBED BLOCKS - CENTER */
.article-content .wp-block-embed.is-type-video,
.article-content .wp-block-embed.wp-block-embed-youtube,
.article-content .wp-block-embed.wp-block-embed-twitter {
    text-align: center;
}

.article-content .wp-block-embed__wrapper {
    display: flex;
    justify-content: center;
}

/* LEFT ALIGNMENT */
.article-content .alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

/* RIGHT ALIGNMENT */
.article-content .alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* RESPONSIVE EMBEDS */
.article-content .wp-block-embed.is-type-video iframe,
.article-content .wp-block-embed.wp-block-embed-youtube iframe {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* ========================================
   MOBILE STYLES
   ======================================== */

@media (max-width: 768px) {
    /* SEARCH RESULTS MOBILE */
    .search-results-page {
        padding: 1rem 0.75rem;
    }
    
    .search-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .search-title {
        font-size: 1.4rem;
    }
    
    .search-count {
        font-size: 0.875rem;
    }
    
    .search-results-list {
        gap: 1rem;
    }
    
    .search-no-results {
        padding: 2rem 1rem;
    }
    
    .search-retry-form {
        flex-direction: column;
    }
    
    .search-retry-form button {
        width: 100%;
    }
    
    /* EMBEDS MOBILE - NO FLOAT */
    .article-content .alignleft,
    .article-content .alignright {
        float: none;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    /* CENTER ALL EMBEDS ON MOBILE */
    .article-content iframe,
    .article-content .twitter-tweet,
    .article-content .wp-block-embed {
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
}
