/*
Theme Name: Best Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: Лотерейная тема для WordPress
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: best-theme
*/

/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Trebuchet MS', 'Arial', sans-serif;
}

body {
    font-family: 'Trebuchet MS', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: rgb(243, 245, 247);
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
}

/* Header стили */

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.header-content h1 {
    font-size: 28px;
    font-weight: bold;
    color: #1a1e25;
    margin: 0;
}

.header-buttons {
    display: flex;
    gap: 15px;
}

.login-btn,
.register-btn {
    padding: 6px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Trebuchet MS', 'Arial', sans-serif;
    text-transform: uppercase;
}

.login-btn {
    background: #276aa5;
    color: #fff;
    border: none;
}

.login-btn:hover {
    opacity: 0.8;
}

.register-btn {
    background: #7eac2f;
    color: white;
    border: none;
}

.register-btn:hover {
    opacity: 0.8;
}

/* Стили секций */
section {
    margin-bottom: 60px;
}

h2 {
    color: #1a1e25;
    text-align: center;
    width: 100%;
    font-size: 42px;
    line-height: 1.25;
    font-weight: 500;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 36px;
    line-height: 42px;
    font-weight: 700;
    color: #1a1e25;
    text-align: left;
}

/* Навигация слайдеров */
.swiper-navigation {
    display: flex;
    gap: 10px;
}

.swiper-button-prev,
.swiper-button-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: static;
    margin: 0;
    margin-top: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid #30507652;
}

.swiper-button-prev:after,
.swiper-button-next:after {
    font-size: 16px;
    color: #30507652;
    font-weight: bold;
    transition: all 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    border-color: #000;
}

.swiper-button-prev:hover:after,
.swiper-button-next:hover:after {
    color: #000;
}

/* Секция Наборы лотерей */
.lottery-sets {
    background: white;
    padding: 24px;
    border-radius: 20px;
}

.lottery-sets-swiper {
    overflow: hidden;
}

.lottery-sets-swiper .swiper-slide {
    width: 315px;
    flex-shrink: 0;
}

.lottery-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    width: 315px;
    height: 358px;
    transition: all 0.3s ease;
}

.card-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
}

.card-overlay {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.card-info {
    position: relative;
    z-index: 2;
}

.card-tickets {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.ticket-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #305076;
}

.ticket-count {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: #000;
}

.info-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #305076;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.info-btn .content {
    display: block;
}

.card-title {
    color: #1a1e25;
    font-size: 18px;
    line-height: 24px;
    font-weight: 700;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: 10px;
}

.card-actions {
    display: flex;
    justify-content: center;
}

.pay-btn {
    background: #305076;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.pay-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Секция Покупайте, заполняйте, побеждайте! */

.buy-fill-win h2 {
    text-align: center;
    margin-bottom: 40px;
}

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.lottery-item {
    position: relative;
}

.item-image {}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-content {
    padding: 24px 16px;
    display: grid;
    grid-template-columns: 1fr 160px;
    position: absolute;
    width: 100%;
    top: 0;
    height: 100%;
}

.superprize-info {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: flex-end;
    padding: 0 15px;
}

.superprize-label {
    font-size: 22px;
    line-height: 26px;
    font-weight: 700;
    text-shadow: 2px 2px 0px #305076;
    color: rgb(255, 224, 64);
}

.superprize-amount {
    margin: 0;
}

.superprize-value {
    font-size: 42px;
    line-height: 49px;
    font-weight: 700;
    text-shadow: 3px 3px 0px #305076;
    color: rgb(255, 224, 64);
}

.item-footer {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.draw-info {
    flex: 1;
}

.draw-number {
    color: #000;
    margin: 0 0 8px 0;
    font-size: 18px;
    line-height: 24px;
    font-feature-settings: "lnum";
    font-variant-numeric: lining-nums;
}

.draw-date {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.buy-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.price {
    font-size: 24px;
    line-height: 24px;
    color: #1a1e25;
}

.price span {
    font-size: 24px;
    line-height: 24px;
    color: #1a1e25;
}

.lottery-item h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.superprize {
    font-size: 16px;
    color: #28a745;
    font-weight: bold;
    margin-bottom: 8px;
}

.draw {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.topbar {
    background-color: #205583;
    box-shadow: 0 0 .625rem Hsla(var(--primary--40-bg), .5);
    display: flex;
    justify-content: center;
    padding: 10px;
}

.buy-btn {
    text-transform: uppercase;
    background: transparent;
    font-size: 24px;
    text-decoration: underline;
    border: none;
    line-height: 35px;
    font-weight: 800;
    color: rgb(26, 30, 37);
    font-family: 'Trebuchet MS', 'Arial', sans-serif;
}

.buy-btn:hover {
    text-decoration: none;
}

.buy-text {
    display: block;
}

/* Секция Истории наших победителей */
.winners-stories {
    background: white;
    padding: 24px;
    border-radius: 20px;
}

.winners-swiper {
    overflow: hidden;
    margin-bottom: 20px;
}

.winner-card {
    height: 100%;
    background: rgb(243, 245, 247);
    border-radius: 16px;
    padding: 16px;
}

.winner-image img {
    border-radius: 8px;
    margin-bottom: 15px;
    aspect-ratio: 1.8;
    width: 100%;
}

.winner-card h3 {
    color: rgb(26, 30, 37);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 600;
    font-feature-settings: "lnum";
    font-variant-numeric: lining-nums;
    margin-bottom: 5px;
}

.location {
    color: rgba(94, 106, 120, 0.8);
    font-size: 16px;
    line-height: 1.25;
    margin-bottom: 5px;
    font-weight: normal;
    font-feature-settings: "lnum";
    font-variant-numeric: lining-nums;
}

.amount {
    font-size: 24px;
    line-height: 1.25;
    color: #1a1e25;
    margin-bottom: 5px;
    font-weight: 600;
}

.story {
    font-size: 20px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.2;
    margin-top: 20px;
    margin-bottom: 45px;
    padding-left: 30%;
}

.winner-btn {
    background: none;
    color: #1a1e25;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.winner-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

@media (max-width: 991px) {
    .lottery-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .section-header {
        gap: 20px;
    }

    .swiper-navigation {
        align-self: flex-end;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .header-content h1 {
        font-size: 24px;
    }

    .buy-fill-win h2 {
        margin-bottom: 16px;
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0;
    }

    .story {
        padding-left: 0;
    }

    section {
        margin-bottom: 40px;
    }

    .section-header {
        margin-bottom: 10px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .section-header h2 {
        font-size: 24px;
        line-height: 32px;
    }

    .buy-fill-win {
        padding: 0;
    }

    .lottery-sets
     {
        padding: 0;
        background: none;
        border-radius: 0;
    }

    .lottery-grid,
    .winners-stories {
        margin-left: 15px;
        margin-right: 15px;
    }
    .lottery-sets-swiper {
        padding: 0 15px;
    }

    header {
        padding: 15px 0;
    }

    .header-content {
        padding: 0 15px;
        margin-bottom: 10px;
    }

    .login-btn,
    .register-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    h2 {
        font-size: 24px;
    }

    .winner-image img {
        height: auto;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 35px;
        height: 35px;
    }

    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 14px;
    }
}

@media (max-width: 480px) {

    .lottery-card h3,
    .lottery-item h3,
    .winner-card h3 {
        font-size: 16px;
    }

    .superprize {
        font-size: 14px;
    }

    .amount {
        font-size: 16px;
    }

    .draw-number {
        font-size: 14px;
        line-height: 18px;
    }

    .price {
        font-size: 14px;
        line-height: 18px;
    }

    .buy-btn {
        font-size: 14px;
        line-height: 18px;
    }

    .price span {
        font-size: 14px;
        line-height: 18px;
    }

    .superprize-value {
        font-size: 14px;
        line-height: 18px;
    }

    .buy-section {
        gap: 0;
    }

    .item-content {
        grid-template-columns: 1fr auto;
    }
}

/* Popup стили */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.popup-overlay.active {
    display: flex;
}

.popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: scaleIn 0.3s ease;
}

.popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.popup-close:hover {
    transform: rotate(90deg);
}

.popup-link {
    display: block;
    cursor: pointer;
}

.popup-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive для popup */
@media (max-width: 767px) {
    .popup-content {
        max-width: 95%;
    }
    
    .popup-close {
        top: -35px;
        font-size: 35px;
        width: 35px;
        height: 35px;
    }
}