/*
Theme Name: GameApps Pro
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: قالب حرفه‌ای AMP برای معرفی اپلیکیشن‌های بازی موبایل - فارسی و سئو محور
Version: 3.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gameapps
Tags: rtl-language-support, one-column, custom-colors, custom-menu, featured-images, theme-options, translation-ready
*/

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
    text-align: right;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.8;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-logo h1 {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.site-logo h1 a {
    color: #fff;
    text-decoration: none;
}

.site-logo span {
    color: #ffd700;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-direction: row;
    align-items: center;
}

.main-nav ul li {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.main-nav a {
    color: #fff;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
    display: block;
    white-space: nowrap;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.2);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 20px;
    text-align: center;
    color: #fff;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* ==========================================================================
   Hero Section Search Box - Unique Classes
   ========================================================================== */

.hero-search-container {
    max-width: 650px;
    margin: 0 auto;
}

.hero-search-form {
    display: flex;
    gap: 12px;
}

.hero-search-input-wrap {
    flex: 1;
}

.hero-search-input {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #2c3e50;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    direction: rtl;
}

.hero-search-input::placeholder {
    color: #7f8c8d;
}

.hero-search-input:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 1);
}

.hero-search-input:focus {
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.hero-search-btn {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

.hero-search-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-search-btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-search-container {
        padding: 0 20px;
    }
    
    .hero-search-input {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .hero-search-btn {
        padding: 14px 30px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .hero-search-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-search-btn {
        width: 100%;
    }
}

/* Hide ALL old search box classes */
.search-box,
.search-box-modern,
.search-container-elegant,
.search-form-elegant,
.search-wrapper-new,
.search-form-new {
    display: none !important;
}

/* ==========================================================================
   Stats Section
   ========================================================================== */

.stats-section {
    background: #fff;
    padding: 40px 20px;
    margin: -30px auto 40px;
    max-width: 1200px;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

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

.stat-item h3 {
    font-size: 38px;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-item p {
    color: #7f8c8d;
    font-size: 16px;
}

/* ==========================================================================
   Category Tabs
   ========================================================================== */

.category-tabs {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.tabs-header {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.tab-button {
    padding: 12px 24px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
}

.tab-button:hover,
.tab-button.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* ==========================================================================
   Apps Grid - 50 Apps
   ========================================================================== */

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

.app-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    margin: 0 auto 15px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.app-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #2c3e50;
    text-align: center;
}

.app-category {
    display: inline-block;
    background: #e8f0fe;
    color: #667eea;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    margin: 0 auto 10px;
}

.app-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
}

.stars {
    color: #ffc107;
    font-size: 18px;
}

.rating-number {
    font-weight: 600;
    color: #2c3e50;
}

.app-description {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
    flex-grow: 1;
}

.app-stats {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid #ecf0f1;
    margin-top: 12px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
}

.stat-label {
    font-size: 12px;
    color: #95a5a6;
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 15px;
}

.download-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* ==========================================================================
   Top 20 Games Section
   ========================================================================== */

.top-games-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.section-header p {
    color: #7f8c8d;
    font-size: 18px;
}

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

.game-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    position: relative;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-rank {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.game-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.game-info {
    padding: 15px;
}

.game-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #2c3e50;
}

.game-genre {
    display: inline-block;
    background: #e8f0fe;
    color: #667eea;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 10px;
}

.game-players {
    color: #7f8c8d;
    font-size: 13px;
    margin: 8px 0;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.game-detail-btn {
    display: block;
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.game-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ==========================================================================
   Introduction Text Section
   ========================================================================== */

.intro-text-section p {
    line-height: 2.2;
    margin-bottom: 20px;
}

.intro-text-section strong {
    color: #667eea;
    font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: #fff;
}

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

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .main-nav {
        width: 100%;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .main-nav a {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .hero-content h2 {
        font-size: 32px;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .top-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .tabs-header {
        gap: 5px;
    }
    
    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 26px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 8px;
    }
    
    .main-nav ul li {
        width: 100%;
    }
    
    .main-nav a {
        width: 100%;
        text-align: center;
    }
}
