/* Custom styles for Toca Boca Bootstrap version */

/* Local Roboto Slab fonts */
@font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/roboto_slab_regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/roboto_slab_medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/roboto_slab_bold.woff2') format('woff2');
}


/* Body and base styles */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    word-break: normal;
    overflow-wrap: normal;
    padding-top: 100px; /* Отступ для фиксированной шапки */
}

/* Prevent aggressive text breaking */
* {
    word-break: normal !important;
    overflow-wrap: normal !important;
}

/* Ensure text flows normally */
p, h1, h2, h3, h4, h5, h6, span, div {
    word-break: normal;
    overflow-wrap: normal;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px 0;
    z-index: 1000;

    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Для Safari */

    /* Дизайн */
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
}

.logo-image {
    height: 90px;
    width: auto;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #000000 !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #000000 !important;
}

/* Стили для мобильного меню */
.navbar-toggler {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.8);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
}

.navbar-collapse .navbar-nav {
    text-align: center;
}

.navbar-collapse .navbar-nav .nav-link {
    text-align: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-collapse .navbar-nav .nav-link:last-child {
    border-bottom: none;
}

/* Hero Section */
.hero-section {
    min-height: 457px;
    padding-top: 100px !important;
    padding-bottom: 60px !important;
}

.hero-title {
    font-family: 'Roboto Slab', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 603px;
    margin: 0 auto;
}

.hero-section .btn-primary {
    background-color: #000;
    border-color: #000;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
    transition: all 0.5s ease;
    padding: 10px 79px;
    margin-top: 32px;
}

.hero-section .btn-primary:hover {
    background-color: #333;
    border-color: #333;
    transform: translateY(-2px);
}

/* How to Play Section */
.how-to-play-section {
    background-color: white;
    min-height: 662px;
    padding-top: 80px !important;
    padding-bottom: 10px !important;
}

.section-title {
    font-family: 'Roboto Slab',;
    font-size: 2.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
}

.mod-title {
    margin-bottom: 15px;
}

.game-image {
    width: 306px;
    height: 459px;
    border-radius: 30px !important;
    box-shadow: 5px 5px 20px 0 rgba(0,0,0,0.4);
    margin: 25px auto;
}

.steps-container {
    padding-left: 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    position: relative;
    margin-bottom: 30px;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
    flex-shrink: 0;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.step-desc {
    margin: 0;
    color: #555;
}

.step-line {
    position: absolute;
    left: 20px;
    top: 45px;
    width: 2px;
    height: 60px;
    background-color: #6c757d;
    opacity: 0.8;
}

/* Download Section */
.download-section {
    min-height: 601px;
    padding-top: 60px !important;
    padding-bottom: 60px !important;
    scroll-margin-top: 120px;
}

.section-subtitle {
    font-weight: 600;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.game-version-image {
    width: 198px;
    height: 198px;
    border-radius: 30px !important;
    box-shadow: 5px 5px 20px 0 rgba(0,0,0,0.4);
    margin-bottom: 15px;
}

.game-version-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.download-section .btn-warning {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
    width: 174px !important;
    padding: 9px 20px !important;
    margin-bottom: 10px;
}

.download-section .btn-warning:hover {
    background-color: #333333;
    border-color: #333333;
    color: #fff;
}

.download-section .btn-outline-dark {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
    padding: 9px 40px;
}

/* Mod Description Section */

.mod-description {
    padding: 0;
}

.mod-description-text {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    color: #333;
    text-align: left;
    max-width: 100%;
    margin: 0;
    padding: 0;
    letter-spacing: 0.3px;
}

/* Gallery Section */
.gallery-section {
    background: linear-gradient(#ff9a3c, #ffd700);
    min-height: 400px;
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}

.gallery-title {
    font-family: 'Roboto Slab', serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
}

.carousel-inner img {
    max-height: 500px;
    width: 100%;
    object-fit: contain;
}


.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    bottom: 20px;
    top: auto;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.9);
    border-color: #fff;
    opacity: 1;
    transform: scale(1.1);
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}


/* Reviews Section */
.reviews-section {
    background-color: #fff;
    min-height: 500px;
    padding-top: 40px !important;
    padding-bottom: 40px !important;
}

.reviews-title {
    font-family: 'Roboto Slab', serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
}

.review-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    height: 100%;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.review-header {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

.review-meta {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.review-text {
    margin: 0;
    line-height: 1.5;
    color: #495057;
    flex: 1;
    font-size: 0.95rem;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    font-size: 18px;
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.scroll-to-top:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

/* Footer */
.footer {
    background: linear-gradient(#ff9a3c, #ffd700) !important;
}

.footer-logo {
    height: 170px;
    width: auto;
}

.footer-text {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive styles */
@media (max-width: 991px) {
    .hero-section {
        min-height: 341px;
        padding-top: 60px !important;
    }

    .hero-title {
        margin-top: 19px;
    }

    .hero-section .btn-primary {
        margin-top: 59px;
        margin-bottom: 60px;
    }

    .how-to-play-section {
        min-height: 600px;
        padding-top: 60px !important;
    }

    .game-image {
        width: 336px;
        height: 504px;
        margin: 0 auto;
    }

    .steps-container {
        margin-top: 28px;
        padding-left: 0;
    }

    .download-section {
        min-height: 606px;
        padding-top: 60px !important;
    }

    .game-version-image {
        margin-top: 35px;
        margin-left: auto;
        margin-right: auto;
    }

    .reviews-section {
        min-height: 600px;
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    .review-card {
        min-height: 160px;
        margin-bottom: 20px;
    }
}

@media (max-width: 767px) {
    .hero-subtitle {
        max-width: 540px;
    }

    .section-title {
        font-size: 2rem;
    }

    .gallery-title {
        font-size: 2rem;
    }

    .reviews-title {
        font-size: 2rem;
    }

    .steps-container {
        margin-left: 0;
        text-align: center;
    }

    .game-version-image {
        margin-right: auto;
    }

    .reviews-section .row {
        --bs-gutter-x: 15px;
    }

    .review-card {
        margin-top: 15px;
        margin-bottom: 15px;
    }
}

@media (max-width: 575px) {
    .hero-section {
        min-height: 437px;
        padding-top: 80px !important;
    }

    .hero-title {
        font-size: 2.25rem;
        width: 184px;
        margin-top: 42px;
        margin-left: auto;
        margin-right: auto;
        display: block;
        text-align: center !important;
    }

    .hero-subtitle {
        width: auto;
        margin-top: 33px;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-section .btn-primary {
        margin-top: 15px;
    }

    .how-to-play-section {
        min-height: 700px;
    }

    .section-title {
        width: 340px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .gallery-title {
        width: 340px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .reviews-title {
        width: 340px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .game-image {
        margin-top: 29px;
        margin-left: auto;
        margin-right: auto;
    }

    .steps-container {
        margin-top: 38px;
        margin-bottom: -14px;
        margin-right: initial;
        margin-left: initial;
    }

    .download-section {
        min-height: 600px;
    }

    .game-version-image {
        margin-top: 20px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 10px;
    }

    .game-version-title {
        margin-top: 10px;
        margin-left: auto;
        margin-bottom: 15px;
    }

    .download-section .btn-warning {
        width: 174px !important;
        padding: 9px 20px !important;
        margin-top: 10px;
        margin-left: auto;
        margin-bottom: 8px;
    }

    .download-section .btn-outline-dark {
        margin-top: 5px;
        margin-left: auto;
        margin-right: auto;
    }

    .gallery-section {
        min-height: 516px;
    }

    .gallery-title {
        margin-top: 2px;
    }

    .review-card {
        width: 100%;
        margin-top: 15px;
        margin-bottom: 15px;
        padding: 18px;
        min-height: 130px;
    }

    .review-name,
    .review-meta {
        margin: 0;
    }

    .review-text {
        margin-top: 10px;
        margin-left: 0;
        margin-right: 0;
        font-size: 0.9rem;
    }

    /* Mod description section mobile styles */

    .mod-description-text {
        font-size: 16px;
        text-align: left;
        padding: 0;
        line-height: 1.5;
    }
}