/*
Theme Name: Alibaba66
Theme URI: https://alibaba66.com
Description: Современная развлекательная тема для обзоров приложений и новостей
Author: Your Name
Version: 1.2.0
Text Domain: alibaba66
*/

/* ПЕРЕМЕННЫЕ */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --accent-color: #ff6b35;
    --accent-hover: #ff5520;
    --border-color: #e9ecef;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --hero-bg-start: rgba(102, 126, 234, 0.95);
    --hero-bg-end: rgba(118, 75, 162, 0.95);
    --hero-text: #ffffff;
}

[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-color: #ff8c5a;
    --accent-hover: #ff7640;
    --border-color: #30363d;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.6);
    --hero-bg-start: rgba(22, 27, 34, 0.98);
    --hero-bg-end: rgba(13, 17, 23, 0.98);
    --hero-text: #e6edf3;
}

/* БАЗОВЫЕ СТИЛИ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1.2rem;
}

/* КОНТЕЙНЕРЫ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* HEADER */
.site-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.site-branding {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.site-logo {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin: 0;
}

.site-logo a {
    color: #ff6b35;
}

.site-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.header-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.toggle-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

.mobile-menu-toggle {
    display: none;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}

/* NAVIGATION */
.main-navigation {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 18px 28px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu li.current-menu-item a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(240, 147, 251, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.6);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.6);
    color: white;
}

/* HERO SECTION */
.hero-section {
    background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
    padding: 100px 0;
    text-align: center;
    color: var(--hero-text);
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease, color 0.3s ease;
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.95) 0%, rgba(13, 17, 23, 0.95) 100%),
                url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    border-bottom: 2px solid var(--border-color);
}

[data-theme="light"] .hero-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 52px;
    margin-bottom: 25px;
    font-weight: 700;
    line-height: 1.2;
    animation: fadeInDown 1s ease;
    color: var(--hero-text);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 35px;
    opacity: 0.95;
    line-height: 1.6;
    animation: fadeInUp 1s ease;
    color: var(--hero-text);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CONTENT SECTIONS */
.content-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 42px;
    margin-bottom: 50px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 20px;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* CUSTOM TEXT BLOCK */
.custom-text-block {
    background: var(--bg-card);
    padding: 50px;
    border-radius: 15px;
    margin: 60px 0;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--accent-color);
}

.custom-text-block h2 {
    color: var(--text-primary);
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: 700;
}

.custom-text-block p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 16px;
}

/* CARDS */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-category,
.card-badge {
    margin-bottom: 12px;
}

.card-category span,
.card-badge span {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 14px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.card-title {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
}

.card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--accent-color);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    gap: 15px;
    flex-wrap: wrap;
}

.card-excerpt {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
    flex: 1;
}

/* FAQ ACCORDION */
.faq-container {
    margin-top: 20px;
}

.faq-item {
    background: var(--bg-card);
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.faq-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 25px 30px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    gap: 20px;
}

.faq-question:hover {
    color: var(--accent-color);
}

.faq-question span:first-child {
    flex: 1;
    line-height: 1.4;
}

.faq-icon {
    font-size: 28px;
    font-weight: 300;
    color: var(--accent-color);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0 !important;
    overflow: hidden;
    padding: 0 !important;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 800px !important;
    padding: 0 30px 25px 30px !important;
}

.faq-answer-content {
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
}

.faq-item.active .faq-answer-content {
    opacity: 1;
    transform: translateY(0);
}

.faq-answer-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
    margin: 0;
}

.faq-item {
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(6) { animation-delay: 0.6s; }
.faq-item:nth-child(7) { animation-delay: 0.7s; }

/* FOOTER */
.site-footer {
    background: var(--bg-secondary);
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget ul li a {
    color: var(--text-secondary);
    font-size: 15px;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: var(--accent-color);
}

.footer-widget p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* UTILITIES */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 50px;
}

.mb-4 {
    margin-bottom: 50px;
}

.hidden {
    display: none;
}

.no-posts,
.no-content {
    padding: 80px 40px;
    text-align: center;
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: var(--shadow);
    grid-column: 1/-1;
}

.no-posts h2,
.no-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.no-posts p,
.no-content p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* BACK TO TOP BUTTON */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 999;
    padding: 15px 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }
    
    .site-logo {
        font-size: 28px;
    }
    
    .custom-text-block {
        padding: 30px 20px;
    }
    
    .custom-text-block h2 {
        font-size: 26px;
    }
    
    .section-title {
        font-size: 32px;
        margin-bottom: 35px;
    }
    
    .content-section {
        padding: 50px 0;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-menu a {
        border-bottom: 1px solid var(--border-color);
        padding: 15px 20px;
    }
    
    .header-controls {
        width: 100%;
        justify-content: center;
    }
    
    .toggle-btn {
        flex: 1;
        justify-content: center;
        max-width: 150px;
    }
    
    .faq-question {
        padding: 20px 25px;
        font-size: 17px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 25px 20px 25px !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .custom-text-block h2 {
        font-size: 22px;
    }
    
    .faq-container {
        padding: 0;
    }
    
    .faq-question {
        padding: 18px 20px;
        font-size: 16px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 20px 18px 20px !important;
    }
    
    .faq-icon {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    
    .faq-answer-content p {
        font-size: 14px;
        line-height: 1.7;
    }
}