/*
Theme Name: AppCenter
Theme URI: https://kepedia.co.id
Author: AppCenter Team
Author URI: https://kepedia.co.id
Description: AppCenter - Android Apps Download & Reviews Theme. A modern theme for showcasing and downloading Android applications with user ratings and reviews.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: appcenter
Tags: app-store, android, download, reviews, modern, responsive
*/

/* =====================
   RESET & BASE
   ===================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
}

img { max-width: 100%; height: auto; }
a { text-decoration: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================
   HEADER / NAV
   ===================== */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e1e5e9;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background 0.3s, backdrop-filter 0.3s;
}

.site-header.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2196f3;
}

.logo-icon {
    width: 35px;
    height: 35px;
    background: #2196f3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: #666;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: #2196f3; }

/* =====================
   HERO
   ===================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    outline: none;
    color: #333;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

.search-btn:hover { background: #1976d2; }

/* =====================
   STATS
   ===================== */
.stats {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e1e5e9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item { padding: 1rem; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2196f3;
    display: block;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* =====================
   SEARCH RESULTS
   ===================== */
.search-results {
    display: none;
    padding: 2rem 0;
    background: #f8f9fa;
}

.search-results.show { display: block; }

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-query { color: #2196f3; font-weight: 600; }
.result-count { color: #666; margin-top: 0.5rem; }

/* =====================
   FEATURED APPS
   ===================== */
.featured {
    padding: 3rem 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #333;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.8rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    background: white;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.filter-tab.active,
.filter-tab:hover {
    border-color: #2196f3;
    background: #2196f3;
    color: white;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* =====================
   APP CARD
   ===================== */
.app-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.app-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.app-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #333;
}

.app-category {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.app-size { color: #999; font-size: 0.8rem; }

.app-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars { color: #ffc107; }
.rating-text { color: #666; font-size: 0.9rem; }

.app-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.app-actions { display: flex; gap: 0.5rem; }

.btn-download {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.btn-download:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    color: white;
    transform: translateY(-1px);
}

.btn-info {
    background: #e9ecef;
    color: #666;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-info:hover { background: #dee2e6; color: #666; }

/* =====================
   LOAD MORE
   ===================== */
.load-more { text-align: center; margin: 2rem 0; }

.btn-load-more {
    background: #2196f3;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-load-more:hover {
    background: #1976d2;
    transform: translateY(-1px);
}

/* =====================
   CATEGORIES
   ===================== */
.categories {
    padding: 3rem 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.category-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem 1rem;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.category-item:hover {
    border-color: #2196f3;
    background: linear-gradient(135deg, white, #f8f9fa);
    transform: translateY(-2px);
}

.category-icon {
    font-size: 2.5rem;
    color: #2196f3;
    margin-bottom: 1rem;
}

.category-name { font-weight: 600; color: #333; }
.category-count { color: #666; font-size: 0.8rem; margin-top: 0.3rem; }

/* =====================
   NEWSLETTER
   ===================== */
.newsletter {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.newsletter h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter p {
    margin-bottom: 2rem;
    opacity: 0.9;
    font-size: 1.1rem;
}

.newsletter-form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.email-input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

.newsletter-btn {
    background: #1565c0;
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

.newsletter-btn:hover { background: #0d47a1; }

.success-message {
    background: #4caf50;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
    display: none;
}

.success-message.show { display: block; }

/* =====================
   FOOTER
   ===================== */
.site-footer {
    background: #333;
    color: #ccc;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section a {
    color: #ccc;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-section a:hover { color: white; }

.footer-section p { line-height: 1.8; }

.footer-social { margin-top: 1rem; }

.footer-social a {
    display: inline-block;
    margin-right: 1rem;
    font-size: 1.2rem;
    color: #ccc;
    transition: color 0.3s;
}

.footer-social a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* =====================
   SECTION HIDE
   ===================== */
.section.hidden { display: none; }

/* =====================
   WORDPRESS SPECIFIC
   ===================== */
.wp-block-image { margin: 1rem 0; }
.aligncenter { display: block; margin: 0 auto; }
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    white-space: nowrap;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .nav-links { display: none; }
    .newsletter-form { flex-direction: column; }
    .app-actions { flex-direction: column; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    .apps-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 1.8rem; }
}
