/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  GeneratePress Child Theme for Android APK Downloads
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      1.0.0
*/

/* ==========================================================================
   Android APK Download Site - Design System
   ========================================================================== */

:root {
    --apk-primary: #10b981;
    --apk-primary-dark: #059669;
    --apk-primary-light: #ecfdf5;
    --apk-accent: #0284c7;
    --apk-star: #f59e0b;
    --apk-text: #1e293b;
    --apk-text-muted: #64748b;
    --apk-border: #e2e8f0;
    --apk-bg-card: #ffffff;
    --apk-bg-subtle: #f8fafc;
    --apk-radius-sm: 8px;
    --apk-radius-md: 14px;
    --apk-radius-lg: 20px;
    --apk-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --apk-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --apk-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

body {
    background-color: #f1f5f9;
    color: var(--apk-text);
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Sitewide Search Bar
   ========================================================================== */

.apk-search-hero-banner {
    background: #ffffff;
    border-bottom: 1px solid var(--apk-border);
    padding: 20px 0;
    margin-bottom: 24px;
    box-shadow: var(--apk-shadow-sm);
}

.apk-search-hero {
    max-width: 650px;
    margin: 0 auto;
    padding: 0 15px;
}

.apk-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 650px;
    margin: 0 auto;
}

.apk-search-input-wrap {
    position: relative;
    flex-grow: 1;
}

.apk-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
}

.apk-search-input {
    width: 100%;
    padding: 12px 16px 12px 42px !important;
    border: 1.5px solid var(--apk-border) !important;
    border-radius: 999px !important;
    font-size: 15px !important;
    background: #f8fafc !important;
    color: var(--apk-text) !important;
    outline: none;
    transition: all 0.2s ease;
}

.apk-search-input:focus {
    background: #ffffff !important;
    border-color: var(--apk-primary) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.apk-search-btn {
    background: var(--apk-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.apk-search-btn:hover {
    background: var(--apk-primary-dark) !important;
}

/* Nav Menu Search Item */
.apk-nav-search-item {
    display: flex;
    align-items: center;
}

.apk-nav-search-form {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid var(--apk-border);
    border-radius: 999px;
    padding: 2px 6px 2px 12px;
    margin-left: 10px;
}

.apk-nav-search-input {
    border: none !important;
    background: transparent !important;
    padding: 4px 6px !important;
    font-size: 13px !important;
    width: 140px;
    color: var(--apk-text) !important;
    outline: none;
}

.apk-nav-search-btn {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
    cursor: pointer;
}

.apk-nav-search-btn:hover {
    color: var(--apk-primary) !important;
}

/* ==========================================================================
   Home & Archive - Small Compact App Store Cards
   ========================================================================== */

.blog .site-main,
.archive .site-main,
.search-results .site-main {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
    gap: 16px !important;
}

.blog .site-main article,
.archive .site-main article,
.search-results .site-main article {
    background: var(--apk-bg-card);
    border: 1px solid var(--apk-border);
    border-radius: var(--apk-radius-md);
    padding: 14px 12px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--apk-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 0 !important;
    text-align: center;
}

.blog .site-main article:hover,
.archive .site-main article:hover,
.search-results .site-main article:hover {
    transform: translateY(-3px);
    box-shadow: var(--apk-shadow-md);
    border-color: #cbd5e1;
}

.blog .inside-article,
.archive .inside-article,
.search-results .inside-article {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* App Logo in Card */
.apk-card-logo-wrap {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.apk-card-logo {
    width: 64px !important;
    height: 64px !important;
    object-fit: cover !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid var(--apk-border);
    margin: 0 auto;
    display: block;
}

.apk-card-logo-placeholder {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

/* Hide Default Elements on Archive Cards */
.blog .post-image,
.archive .post-image,
.blog .entry-content,
.archive .entry-content,
.blog .entry-summary,
.archive .entry-summary,
.blog .entry-meta,
.archive .entry-meta,
.blog footer.entry-meta,
.archive footer.entry-meta,
.blog .cat-links,
.archive .cat-links,
.blog .comments-link,
.archive .comments-link,
.blog .posted-on,
.archive .posted-on {
    display: none !important;
}

.blog .entry-header,
.archive .entry-header,
.search-results .entry-header {
    margin-bottom: 4px;
}

.blog .entry-title,
.archive .entry-title,
.search-results .entry-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 4px 0 6px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
}

.blog .entry-title a,
.archive .entry-title a {
    color: var(--apk-text);
    text-decoration: none;
}

.blog .entry-title a:hover,
.archive .entry-title a:hover {
    color: var(--apk-primary-dark);
}

.apk-card-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--apk-text-muted);
}

.apk-star-gold {
    color: var(--apk-star);
}

.apk-card-score {
    font-weight: 700;
    color: var(--apk-text);
}

.apk-card-size {
    font-weight: 500;
}

/* Download Button on Card */
.apk-card-action {
    margin-top: auto;
}

.button.apk-card-btn {
    display: block;
    width: 100%;
    background-color: var(--apk-primary) !important;
    color: #ffffff !important;
    padding: 7px 10px !important;
    border-radius: var(--apk-radius-sm) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: center;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
    border: none !important;
}

.button.apk-card-btn:hover {
    background-color: var(--apk-primary-dark) !important;
}

/* ==========================================================================
   Single Post - App Hero Section
   ========================================================================== */

/* Hide default GeneratePress header and comments on single posts */
.single .entry-header,
.single-post .entry-header,
.single .featured-image,
.single-post .featured-image,
.single .comments-area,
.single #comments,
.single .cat-links,
.single footer.entry-meta,
.single .entry-meta {
    display: none !important;
}

.apk-hero-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--apk-bg-card);
    border: 1px solid var(--apk-border);
    border-radius: var(--apk-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--apk-shadow-sm);
}

.apk-hero-left {
    flex-shrink: 0;
}

.apk-app-icon {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--apk-border);
    display: block;
}

.apk-app-icon-placeholder {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.apk-hero-right {
    flex-grow: 1;
}

.apk-hero-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--apk-text);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.apk-hero-dev {
    font-size: 14px;
    font-weight: 600;
    color: var(--apk-accent);
    margin-bottom: 10px;
}

.apk-rating-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.apk-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--apk-star);
    font-size: 14px;
}

.apk-stars .apk-star.empty {
    color: #cbd5e1;
}

.apk-rating-num {
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 6px;
}

.apk-review-count {
    font-size: 13px;
    color: var(--apk-text-muted);
}

.apk-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.apk-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--apk-bg-subtle);
    border: 1px solid var(--apk-border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--apk-text);
}

.apk-tag i {
    color: var(--apk-primary);
}

.apk-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.apk-btn-yono {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.apk-btn-yono:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
    transform: translateY(-1px);
}

.apk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--apk-radius-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.apk-btn-primary {
    background: var(--apk-primary);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.apk-btn-primary:hover {
    background: var(--apk-primary-dark);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

.apk-btn-size {
    font-weight: 400;
    opacity: 0.9;
    font-size: 12px;
}

/* ==========================================================================
   Specifications Card
   ========================================================================== */

.apk-specs-card {
    background: var(--apk-bg-card);
    border: 1px solid var(--apk-border);
    border-radius: var(--apk-radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    box-shadow: var(--apk-shadow-sm);
}

.apk-spec-item {
    display: flex;
    flex-direction: column;
}

.apk-spec-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--apk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.apk-spec-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--apk-text);
}

/* ==========================================================================
   Single Post - Main Content Section
   ========================================================================== */

.apk-main-content {
    background: var(--apk-bg-card);
    border: 1px solid var(--apk-border);
    border-radius: var(--apk-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--apk-shadow-sm);
    line-height: 1.7;
    font-size: 15px;
}

.apk-main-content h2,
.apk-main-content h3 {
    color: var(--apk-text);
    margin-top: 1.2em;
    margin-bottom: 0.5em;
}

/* ==========================================================================
   Single Post - Download Box & Guide
   ========================================================================== */

.apk-download-box {
    background: linear-gradient(180deg, #ffffff 0%, var(--apk-primary-light) 100%);
    border: 2px solid #a7f3d0;
    border-radius: var(--apk-radius-lg);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--apk-shadow-md);
    margin-top: 28px;
}

.apk-download-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: #065f46;
    margin: 0 0 6px 0;
}

.apk-download-header p {
    color: var(--apk-text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}

.apk-download-button-wrapper {
    margin-bottom: 20px;
}

.apk-download-buttons-group {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.apk-yono-dl-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35) !important;
}

.apk-yono-dl-btn:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.45) !important;
    transform: translateY(-2px);
}

.apk-download-large-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    padding: 14px 32px;
    border-radius: var(--apk-radius-md);
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
    transition: all 0.25s ease;
    border: none;
}

.apk-download-large-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.45);
    transform: translateY(-2px);
}

.apk-dl-icon {
    font-size: 24px;
}

.apk-dl-text {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.apk-dl-text strong {
    font-size: 18px;
    line-height: 1.2;
}

.apk-dl-text small {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 2px;
}

.apk-security-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.apk-security-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #047857;
}

.apk-security-item i {
    color: var(--apk-primary);
}

.apk-install-guide {
    background: #ffffff;
    border: 1px solid var(--apk-border);
    border-radius: var(--apk-radius-md);
    padding: 16px 20px;
    text-align: left;
    max-width: 580px;
    margin: 0 auto;
}

.apk-install-guide h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--apk-text);
}

.apk-install-guide h4 i {
    color: var(--apk-star);
    margin-right: 4px;
}

.apk-install-guide ol {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: var(--apk-text-muted);
}

.apk-install-guide li {
    margin-bottom: 6px;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 768px) {
    .blog .site-main,
    .archive .site-main,
    .search-results .site-main {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .apk-hero-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .apk-hero-actions {
        justify-content: center;
    }
    .apk-rating-badge-row {
        justify-content: center;
    }
    .apk-quick-tags {
        justify-content: center;
    }
    .apk-download-large-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
    .apk-nav-search-item {
        display: none;
    }
}

@media (max-width: 380px) {
    .blog .site-main,
    .archive .site-main,
    .search-results .site-main,
    .apk-cards-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Custom Search Results Page
   ========================================================================== */

.apk-search-results-bar {
    background: #ffffff;
    border: 1px solid var(--apk-border);
    border-radius: var(--apk-radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--apk-shadow-sm);
}

.apk-search-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--apk-text);
    margin: 0 0 4px 0;
}

.apk-search-title i {
    color: var(--apk-primary);
    margin-right: 6px;
}

.apk-search-title span {
    color: var(--apk-primary-dark);
}

.apk-search-count {
    font-size: 13px;
    color: var(--apk-text-muted);
    margin: 0;
}

.apk-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.apk-app-card {
    background: var(--apk-bg-card);
    border: 1px solid var(--apk-border);
    border-radius: var(--apk-radius-md);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--apk-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.apk-app-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--apk-shadow-md);
    border-color: #cbd5e1;
}

.apk-card-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 4px 0 6px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
}

.apk-card-title a {
    color: var(--apk-text);
    text-decoration: none;
}

.apk-card-title a:hover {
    color: var(--apk-primary-dark);
}

.apk-pagination {
    margin-top: 30px;
    text-align: center;
}

.apk-pagination .nav-links {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.apk-pagination .page-numbers {
    padding: 6px 12px;
    border: 1px solid var(--apk-border);
    border-radius: var(--apk-radius-sm);
    background: #ffffff;
    color: var(--apk-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.apk-pagination .page-numbers.current {
    background: var(--apk-primary);
    color: #ffffff;
    border-color: var(--apk-primary);
}

.apk-no-results {
    background: #ffffff;
    border: 1px solid var(--apk-border);
    border-radius: var(--apk-radius-lg);
    padding: 48px 24px;
    text-align: center;
    max-width: 550px;
    margin: 40px auto;
    box-shadow: var(--apk-shadow-sm);
}

.apk-no-results-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.apk-no-results h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--apk-text);
}

.apk-no-results p {
    color: var(--apk-text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

