/*
Theme Name: Pragmatic Slots
Author: You
Version: 3.0 (Hero: главная + исправления мобильных изображений)
*/

/* =Reset & Base
--------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    background-color: #fff;
    margin: 0;
    padding: 0 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Отступ под админ-бар */
body.admin-bar {
    padding-top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar {
        padding-top: 46px;
    }
}
a {
    color: #1a73e8;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =Modern Navigation (современная навигация)
--------------------------------------------- */
.evo-main-nav {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #f1f5f9;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.evo-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.evo-nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.3rem;
    color: #1e293b;
    transition: color 0.3s ease;
}

.evo-nav-logo:hover {
    color: #3b82f6;
    text-decoration: none;
}

.evo-logo-icon {
    font-size: 1.5rem;
    color: #3b82f6;
}

.evo-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.evo-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    text-decoration: none;
}

.evo-nav-btn i {
    font-size: 1rem;
}

/* Адаптивность навигации */
@media (max-width: 768px) {
    .evo-nav-container {
        padding: 0 1rem;
    }
    
    .evo-nav-logo {
        font-size: 1.1rem;
    }
    
    .evo-nav-btn span {
        display: none;
    }
    
    .evo-nav-btn {
        padding: 0.6rem;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .evo-nav-btn i {
        font-size: 1.2rem;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .evo-main-nav {
        padding: 0.5rem 0;
    }
    
    .evo-nav-container {
        padding: 0 0.75rem;
    }
}

/* =Layout
--------------------------------------------- */
.site-header,
.main-content,
.single-slot,
.site-footer {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* =Home Page Hero (только для главной)
--------------------------------------------- */
.home-hero {
    text-align: center;
    padding: 40px 20px;
    margin: 30px auto 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    max-width: 1000px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.home-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0 0 20px;
    color: #1e293b;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.home-hero p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #475569;
    max-width: 800px;
    margin: 0 auto 30px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #3b82f6;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .home-hero {
        padding: 30px 15px;
        margin: 20px auto 30px;
    }
    
    .home-hero h1 {
        font-size: 2.2rem;
    }
    
    .home-hero p {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 25px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

/* =Promo Banner
--------------------------------------------- */
.promo-banner {
    background: #fff8e1;
    padding: 16px;
    border-radius: 8px;
    margin: 20px auto 40px;
    border-left: 4px solid #ffb300;
    max-width: 600px;
    font-size: 1.1em;
    text-align: center;
}
.promo-banner p {
    margin: 6px 0;
}
.promo-code {
    font-weight: 700;
    font-size: 1.4em;
    background: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
    margin: 0 8px;
}
.copy-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 12px;
    font-size: 1em;
    font-weight: 600;
    transition: background 0.2s;
}
.copy-btn:hover {
    background: #0d5bbd;
}
.promo-code-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin: 12px 0;
}
@media (max-width: 768px) {
    .promo-code-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    .copy-btn {
        margin-left: 0;
        width: 100%;
        max-width: 200px;
    }
}

/* =Category Block (для главной)
--------------------------------------------- */
.category-section {
    margin-bottom: 50px;
}
.category-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    color: #111;
    text-align: center;
}

/* =Slot Grid — ЦЕНТРИРОВАНИЕ НА ГЛАВНОЙ
--------------------------------------------- */
.slots-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
}
.slot-item {
    width: 100%;
    max-width: 700px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.slot-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}
.slot-thumb {
    flex: 0 0 140px; /* Увеличен размер для десктопа */
    display: flex;
    align-items: center;
    justify-content: center;
}
.slot-thumb img {
    width: 100%;
    height: 140px; /* Увеличен размер */
    object-fit: contain; /* Изменено с cover на contain для правильного отображения логотипов */
    border-radius: 6px;
    background: #fff;
    padding: 5px;
}
.placeholder-thumb {
    width: 100%;
    height: 140px; /* Соответствует новому размеру */
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.85em;
}
.slot-content {
    flex: 1;
}
.slot-content h3 {
    margin: 0 0 10px;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}
.slot-content h3 a {
    color: #111;
    text-decoration: none;
}
.slot-content h3 a:hover {
    color: #1a73e8;
}
.slot-excerpt {
    font-size: 0.95em;
    color: #555;
    line-height: 1.6;
}

/* =Single Slot — Hero: h1 + excerpt текстом
--------------------------------------------- */
.slot-hero {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 24px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.slot-hero-text {
    flex: 1;
}
.slot-hero-text h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #111;
    line-height: 1.2;
}
.slot-hero-text .hero-excerpt {
    font-size: 1.3em;
    line-height: 1.6;
    margin: 0;
    color: #444;
}
.slot-hero-image {
    flex: 1;
    min-width: 300px;
}
.slot-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* =Single Slot — основной контент
--------------------------------------------- */
.slot-info h2 {
    text-align: center;
    margin: 0 0 28px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #111;
    line-height: 1.25;
}
.slot-description {
    max-width: 1000px;
    margin: 30px auto;
    font-size: 1.05em;
    line-height: 1.75;
    color: #222;
}
.slot-description h2,
.slot-description h3,
.slot-description h4 {
    font-weight: 700;
    color: #111;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}
.slot-description h2 { font-size: 1.6rem; }
.slot-description h3 { font-size: 1.3rem; }
.slot-description h4 { font-size: 1.15rem; }

/* =Таблицы
--------------------------------------------- */
.info-table,
.slot-description table {
    width: 100%;
    max-width: 640px;
    margin: 30px auto;
    font-size: 1.05em;
    line-height: 1.5;
    border-collapse: collapse;
}
.info-table td,
.slot-description table td {
    padding: 10px;
    border: 1px solid #eee;
}
.info-table td:first-child,
.slot-description table td:first-child {
    font-weight: 600;
    width: 45%;
    color: #111;
    background-color: #fafafa;
}
.info-table td:last-child,
.slot-description table td:last-child {
    text-align: right;
    color: #333;
}
@media (max-width: 768px) {
    .info-table td:last-child,
    .slot-description table td:last-child {
        text-align: left;
    }
    .info-table td:first-child::after,
    .slot-description table td:first-child::after {
        content: ":";
    }
    .info-table td:first-child,
    .slot-description table td:first-child {
        display: inline-block;
        margin-right: 6px;
        background: none;
        width: auto;
    }
}

/* =Related Slots
--------------------------------------------- */
.related-slots {
    margin-top: 50px;
    margin-bottom: 30px;
}
.related-slots h3 {
    text-align: center;
    font-size: 1.7rem;
    margin-bottom: 25px;
    font-weight: 700;
    color: #111;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}
.related-item a {
    display: block;
    text-align: center;
    text-decoration: none;
}
.related-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    background: #f0f0f0;
    border-radius: 6px;
}
.related-item h4 {
    margin: 10px 0 6px;
    font-size: 1.05rem;
    color: #1a73e8;
    font-weight: 600;
}
.related-item p {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

/* =Кнопка "На главную"
--------------------------------------------- */
.back-to-home {
    text-align: center;
    margin: 30px 0 50px;
}
.btn-home {
    display: inline-block;
    padding: 10px 24px;
    background: #f8f9fa;
    color: #1a73e8;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    font-size: 16px;
}
.btn-home:hover {
    background: #eef5ff;
    border-color: #1a73e8;
    color: #0d5bbd;
    text-decoration: none;
}

/* =Сообщения об ошибках
--------------------------------------------- */
.no-slots,
.no-categories {
    text-align: center;
    color: #777;
    margin: 30px 0;
    font-style: italic;
}

/* =Footer
--------------------------------------------- */
.site-footer {
    text-align: center;
    margin-top: 40px;
    padding: 30px 0;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 0.95em;
    background: #f8f9fa;
}

/* =Mobile - исправления для изображений
--------------------------------------------- */
@media (max-width: 768px) {
    body {
        padding: 15px 10px;
        font-size: 16px;
    }

    /* Главная: карточки - исправлено центрирование изображений */
    .slot-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .slot-thumb {
        order: -1;
        flex: 0 0 auto;
        width: 100%;
        max-width: 200px; /* Фиксированная максимальная ширина */
        margin: 0 auto 15px;
    }
    .slot-thumb img {
        height: auto;
        max-height: 120px; /* Ограничение высоты на мобильных */
        margin: 0 auto;
    }
    .placeholder-thumb {
        height: 120px;
        margin: 0 auto;
    }
    .slot-content h3 {
        font-size: 1.35rem;
        text-align: center;
    }
    .slot-excerpt {
        text-align: center;
    }

    /* Hero: стек */
    .slot-hero {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    .slot-hero-text h1 {
        font-size: 2.0rem;
    }
    .slot-hero-text .hero-excerpt {
        font-size: 1.15em;
    }
    .slot-hero-image img {
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }

    /* Заголовки секций */
    .slot-info h2,
    .related-slots h3 {
        font-size: 1.5rem;
    }
    
    /* Исправление для Related Slots */
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}