/*
Theme Name: APK Portal Theme
Theme URI: https://androidnonstop.online
Description: Современная WordPress тема для портала с APK приложениями. Оптимизирована под SEO, адаптивная верстка, Schema.org разметка.
Version: 1.0.0
Author: AndroidNonStop
Author URI: https://androidnonstop.online
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apk-portal
Tags: android, apk, applications, portfolio, blog, responsive
*/

/* ==========================================================================
   БАЗОВЫЕ СТИЛИ
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --secondary-color: #2C3E50;
    --accent-color: #27AE60;
    --text-color: #333333;
    --light-gray: #F8F9FA;
    --border-color: #E1E4E8;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   HEADER (ШАПКА)
   ========================================================================== */

.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-logo img {
    height: 50px;
    width: auto;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-navigation a {
    font-weight: 500;
    color: var(--text-color);
    padding: 8px 0;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

/* ==========================================================================
   ГЛАВНАЯ СТРАНИЦА - КАТЕГОРИИ И ПЛИТКИ
   ========================================================================== */

.category-section {
    margin: 40px 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
}

.category-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
}

.view-all-link {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* ==========================================================================
   КАРТОЧКА ПРИЛОЖЕНИЯ (ПЛИТКА)
   ========================================================================== */

.app-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.app-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.app-card-content {
    padding: 15px;
}

.app-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars {
    color: #FFA500;
    font-size: 14px;
}

.app-badges {
    display: flex;
    gap: 5px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-free {
    background: var(--accent-color);
    color: var(--white);
}

.badge-mod {
    background: #E74C3C;
    color: var(--white);
}

.badge-updated {
    background: var(--primary-color);
    color: var(--white);
}

/* ==========================================================================
   СТРАНИЦА ПРИЛОЖЕНИЯ (SINGLE POST)
   ========================================================================== */

.single-app-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin: 30px 0;
}

.app-main-content {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

/* Hero секция приложения */
.app-hero {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.app-icon {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.app-hero-info h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.app-rating-large {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.rating-stars {
    color: #FFA500;
    font-size: 24px;
}

.rating-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.download-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    text-align: center;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.download-button:hover {
    background: #229954;
    transform: scale(1.05);
    color: var(--white);
}

.app-params {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.app-params li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.param-icon {
    font-size: 18px;
}

.param-label {
    font-weight: 600;
    color: var(--secondary-color);
}

/* Хлебные крошки */
.breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumbs a {
    color: var(--primary-color);
}

.breadcrumbs span {
    margin: 0 8px;
}

/* Описание приложения */
.app-description {
    line-height: 1.8;
    margin: 30px 0;
}

.app-description h2 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: var(--secondary-color);
}

.app-description p {
    margin-bottom: 15px;
}

/* Похожие приложения */
.related-apps {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.related-apps h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

/* Комментарии */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   САЙДБАР
   ========================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* ==========================================================================
   ФУТЕР
   ========================================================================== */

.site-footer {
    background: var(--secondary-color);
    color: var(--white);
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget a {
    color: rgba(255,255,255,0.8);
    display: block;
    padding: 5px 0;
}

.footer-widget a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

/* ==========================================================================
   404 СТРАНИЦА
   ========================================================================== */

.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 h1 {
    font-size: 120px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.error-404 h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */

@media (max-width: 768px) {
    .main-navigation ul {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation.active ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow);
    }
    
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .single-app-container {
        grid-template-columns: 1fr;
    }
    
    .app-hero {
        grid-template-columns: 100px 1fr;
        gap: 20px;
    }
    
    .app-icon {
        width: 100px;
        height: 100px;
    }
    
    .app-hero-info h1 {
        font-size: 24px;
    }
    
    .app-params {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .category-title {
        font-size: 20px;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
}
