html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}


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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8f9fa;
    font-size: 1rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem; 
}

/* Header */
.header {
    background: linear-gradient(135deg, #4a6741 0%, #6b8e5a 100%);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

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

.logo h2 {
    color: white;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #f8d7a8;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f8d7a8;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* .nav-menu a.active {
    color: #FFD700;
    font-weight: bold;
    border-bottom: 2px solid #FFD700;
    animation: fadeIn 0.5s ease-in-out;
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} */

/* Mobile Menu Styles */
.hamburger {
    display: none;
    cursor: pointer;
    width: 40px; /* чуть больше для удобства */
    height: 40px;
    position: relative;
    z-index: 1001;
    margin-left: auto;
    background: rgba(76, 103, 65, 0.95); /* фон для кнопки */
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s;
}

.hamburger:hover {
    background: rgba(76, 103, 65, 1);
}

.hamburger span {
    display: block;
    position: absolute;
    left: 8px;
    right: 8px;
    height: 4px;
    width: 30px;
    background: white;
    border-radius: 3px;
    opacity: 1;
    transform: rotate(0deg);
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) {
    top: 12px;
}

.hamburger span:nth-child(2) {
    top: 18px;
}

.hamburger span:nth-child(3) {
    top: 24px;
}

.hamburger.active span:nth-child(1) {
    top: 18px;
    transform: rotate(135deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    left: -30px;
    right: 30px;
}

.hamburger.active span:nth-child(3) {
    top: 18px;
    transform: rotate(-135deg);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4e6d4 100%);
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    min-height: auto;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #5a6c5a;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    color: #4a6741;
}

.feature-icon {
    font-size: 1.5rem;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #8b5a8b 0%, #a67ba6 100%);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 90, 139, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 90, 139, 0.4);
}

.game-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    aspect-ratio: 1/1;
}

.game-preview iframe {
    width: 100%;
    height: 100%;
    max-width: 550px;
    max-height: 550px;
}

.game-board-preview {
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-radius: 50%;
    overflow: visible; /* Изменено с hidden на visible, чтобы фишка была видна */
    width: 100%;
    height: auto;
    max-width: 1243px; 
    margin: 0 auto;
    aspect-ratio: 1243/1245;
}
@media (min-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .game-token {
        width: 35px;
        height: 35px;
    }

}
.game-board-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;   /* Чтобы изображение заполнило весь круг */
}

.game-token.debug {
    border: 2px solid red;
    background-color: rgba(255, 0, 0, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Section Titles */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #8b5a8b 0%, #6b8e5a 100%);
    border-radius: 2px;
}

/* About Section */
.about {
    padding: 80px 0;
    background: white;
}

.about-description {
    font-size: 1.5rem;
    color: #5a6c5a;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    line-height: 1.5;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.feature-card h3 {
    color: #4a6741;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card p {
    color: #5a6c5a;
    line-height: 1.6;
}

/* Cards Description Section */
.cards-description {
    margin-top: 60px;
    padding: 40px;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4e6d4 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.cards-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.cards-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #f8d7a8 0%, #e8c39e 100%);
    border-radius: 2px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card-type {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 18px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255,255,255,0.1);
}

.card-type:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    border-color: rgba(248, 215, 168, 0.3);
}

.card-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    display: block;
    background: linear-gradient(135deg, #4a6741 0%, #6b8e5a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.stone-image {
    width: 70px;
    height: 70px;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.card-type:hover .stone-image {
    transform: scale(1.1);
}

.card-icon:has(img) {
    background: linear-gradient(135deg, #4a6741 0%, #6b8e5a 100%);
}

.card-icon:not(:has(img)) {
    background: linear-gradient(135deg, #8b5a8b 0%, #a67ba6 100%);
    color: white;
}

.card-type h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
}

.card-type p {
    color: #34495e;
    line-height: 1.6;
    font-size: 0.95rem;
}

.house-example {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid #f39c12;
    margin-top: 30px;
}

.house-example h4 {
    color: #d68910;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.example-question {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.question-text {
    color: #2c3e50;
    font-weight: 500;
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 1.1rem;
}

.question-description {
    color: #8b6f47;
    font-size: 0.9rem;
    font-weight: 500;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 5px;
    display: inline-block;
}

/* Rules Section */
.rules {
    padding: 80px 0;
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.rule-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease;
}

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

.rule-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8b5a8b 0%, #a67ba6 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.rule-card h3 {
    color: #4a6741;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rule-card h3 .icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rule-card h3 .icon-wrap img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.rule-card p {
    color: #5a6c5a;
    line-height: 1.6;
}



.rules-note {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid #f39c12;
    max-width: 600px;
    margin: 0 auto;
}

.rules-note h3 {
    color: #d68910;
    margin-bottom: 15px;
}

.rules-note p {
    color: #8b6f47;
    line-height: 1.6;
}



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


/* Gallery Section */
.gallery {
    padding: 80px 0;
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

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

.gallery-image {
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.game-board {
    background: linear-gradient(135deg, #8b5a8b 0%, #6b8e5a 50%, #4a6741 100%);
}

.game-cards {
    background: linear-gradient(135deg, #f8d7a8 0%, #e8c39e 100%);
}

.game-houses {
    background: linear-gradient(135deg, #a8d5ba 0%, #8bc34a 100%);
}

.game-players {
    background: linear-gradient(135deg, #ffb3d9 0%, #e91e63 100%);
}

.gallery-item p {
    color: #4a6741;
    font-weight: 500;
}

/* Галерея с коллажем для тестового файла */
.gallery-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto 30px;
    cursor: pointer;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-cover:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.gallery-cover img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-cover a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.gallery-cover img:hover {
    transform: scale(1.05);
}

/* Адаптивность для галереи */
@media (max-width: 768px) {
    .gallery-cover {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 500px;
    }
    
    .gallery-cover img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .gallery-cover {
        gap: 8px;
        max-width: 100%;
    }
    
    .gallery-cover img {
        height: 120px;
    }
}

.gallery-description {
    text-align: center;
    color: #5a6c5a;
    font-size: 1.1rem;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .gallery-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-description {
        font-size: 0.9rem;
    }
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: white;
}

/* Order Form Section - компактный блок без отступов */
.order-form-section {
    padding: 0 0 60px 0; /* Увеличиваем отступ снизу */
    background: white;
    margin-top: -20px; /* Убираем промежуток с предыдущим блоком */
    scroll-margin-top: 80px; /* Уменьшаем отступ при прокрутке к якорю */
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.contact-info h3 {
    color: #4a6741;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.contact-info p {
    color: #5a6c5a;
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #4a6741;
    font-weight: 500;
}

.contact-icon {
    font-size: 1.2rem;
}

.contact-form {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4e6d4 100%);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e8f5e8;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: rgb(255 244 244 / 78%);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5a8b;
}

.submit-button {
    background: linear-gradient(135deg, #8b5a8b 0%, #a67ba6 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 90, 139, 0.4);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
}

.footer-logo h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
}

.footer-logo p {
    color: #bdc3c7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #f8d7a8;
}

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

/* Responsive Design */
@media (max-width: 854px) {
    .game-preview {
        max-width: 400px;
    }

    .game-token {
        width: 25px;
        height: 25px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: linear-gradient(135deg, #4a6741 0%, #6b8e5a 100%);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start; /* Изменено с center на flex-start */
        padding: 80px 20px 20px; /* Увеличено верхнее padding для кнопки меню */
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        overflow-y: auto; /* Добавлена возможность прокрутки */
    }

    .nav-menu li {
        margin: 10px 0; /* Уменьшен отступ между пунктами */
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        font-size: 1rem; /* Уменьшен размер шрифта */
        padding: 8px 0; /* Уменьшен padding */
        display: block;
    }

    .nav-menu a::after {
        display: none;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .order-form-section {
        margin-top: -15px;
        padding: 0 0 40px 0; /* Увеличиваем отступ снизу на планшетах */
        scroll-margin-top: 70px; /* Меньший отступ на планшетах */
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .cards-description {
        padding: 25px;
        margin-top: 40px;
    }
    
    .cards-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .board-img {
        max-width: 300px;
    }

    .game-preview {
        max-width: 300px;
    }

    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .order-form-section {
        margin-top: -10px;
        padding: 0 0 30px 0; /* Меньший отступ снизу на мобильных */
        scroll-margin-top: 60px; /* Меньший отступ на мобильных */
    }
} 

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

p {
    margin-bottom: 0.8rem;
}

.card-type img.stone-image {
    display: block;
    margin: 0 auto 15px auto;
}

@media (min-width: 854px) {
    .hamburger {
        display: none !important;
    }
}

@media (max-width: 854px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 70px;
        min-height: 70px;
        padding: 0 1.5rem;
    }
    .hamburger {
        order: 1;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .logo {
        order: 2;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }
    .logo h2 {
        margin: 0;
        display: flex;
        align-items: center;
    }
    
    .nav-menu {
        order: 3;
    }
}

/* Game Token Styles */
.game-token {
    position: absolute;
    width: 30px;
    height: 30px;
    background-image: url("images/fishka.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    transition: all 0.8s ease-in-out;
    pointer-events: none;
    /* Убираем любые отступы и границы */
    margin: 0;
    padding: 0;
    border: none;
    /* Точное позиционирование по центру */
    transform: translate(-50%, -50%);
}

@keyframes diceRoll {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.board-preview-section {
    padding: 80px 0 40px;
    background: #f8f9fa;
}

.board-preview {
    position: relative;
    width: 100%;
    max-width: 550px;   /* Максимальный размер карты на больших экранах */
    aspect-ratio: 1/1;  /* Квадратная форма */
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(44,62,80,0.15);
    border-radius: 50%; /* если нужен круг */
}

.board-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;      /* Сохраняет квадратную форму */
    object-fit: cover;
    /* border-radius: 50%;  // если нужен круг, оставь, если нет — убери */
    max-width: 100%;
}

.pawn {
    position: absolute;
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 60% 40%, #e74c3c 70%, #c0392b 100%);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 12px #0005;
    transition: left 0.3s, top 0.3s;
    z-index: 2;
    pointer-events: none;
}

.board-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.board-controls button {
    background: linear-gradient(135deg, #4a6741 0%, #6b8e5a 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(44,62,80,0.08);
    transition: background 0.2s, transform 0.2s;
}

.board-controls button:hover {
    background: linear-gradient(135deg, #8b5a8b 0%, #a67ba6 100%);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .board-preview {
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .board-preview, .board-img {
        width: 100vw;
        max-width: 100vw;
        aspect-ratio: 1/1;
        margin: 0;
    }
    body, html {
        padding: 0;
        margin: 0;
    }
}

/* Author Section */
.author {
    padding: 80px 0;
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
}
.author-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}
.author-photo {
    flex: 0 0 140px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #e8f5e8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.author-bio {
    flex: 1;
    font-size: 1.1rem;
    color: #4a6741;
    line-height: 1.7;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
}

.bio-text {
    position: relative;
    max-height: 200px;
    transition: max-height 0.5s ease;
    overflow: hidden;
}

.bio-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    opacity: 1;
    transition: opacity 0.3s ease;
}

.author-bio.expanded .bio-text {
    max-height: 1000px;
}

.author-bio.expanded .bio-text::after {
    opacity: 0;
}

.read-more-btn {
    background: none;
    border: none;
    color: #6b8e5a;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    padding: 10px 0;
    margin-top: 10px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.read-more-btn:hover {
    color: #4a6741;
}

.read-more-btn::after {
    content: '↓';
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.author-bio.expanded .read-more-btn::after {
    transform: rotate(180deg);
}

.author-content {
    transition: all 0.5s ease;
}

.author-bio.expanded ~ .author-photo {
    transform: translateY(20px);
}
@media (max-width: 768px) {
    .author-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .author-bio {
        padding: 20px;
    }
    .author-photo {
        margin: 0 auto;
    }
    /* Увеличиваем max-height для раскрытого текста на мобильных */
    .author-bio.expanded .bio-text {
        max-height: 3000px;
    }
}

/* QR Code in Contact Section */
.qr-block {
    margin-top: 35px;
    text-align: center;
}
.qr-image {
    width: 200px;
    max-width: 60vw;
    height: auto;
    display: inline-block;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(44,62,80,0.10);
    margin-bottom: 10px;
}
.qr-caption {
    color: #4a6741;
    font-size: 1rem;
    margin-top: 0;
}
@media (max-width: 480px) {
    .qr-image {
        width: 120px;
        max-width: 90vw;
    }
}

/* Contact Info Flex Layout for QR */
.contact-info-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}
.contact-info-text {
    flex: 1 1 300px;
}
.qr-block {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 160px;
}
@media (max-width: 900px) {
    .contact-info-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }
    .qr-block {
        align-items: center;
        margin-top: 20px;
        min-width: 0;
    }
}

@media (min-width: 769px) {
    .author-bio,
    .bio-text {
        font-size: 1rem;
    }
}

@media (max-width: 854px) {
    .nav-menu.active {
        right: 0;
    }
}

@media (max-width: 480px) {
    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 0 5px;
    }
    .footer-links {
        flex-direction: row;
        gap: 6px;
    }
    .footer-bottom {
        font-size: 0.9rem;
        padding-top: 10px;
    }
    .footer-logo h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        padding: 0;
    }
    .contact-info-flex-bg {
        padding: 18px 5px !important;
        margin-bottom: 18px !important;
    }
    .contact-info-flex {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }
    .contact-info-text {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    .qr-block {
        margin-top: 10px;
        align-items: center;
    }
    .qr-image {
        width: 160px;
        max-width: 80vw;
    }
    .contact-form {
        padding: 10px !important;
        border-radius: 12px !important;
    }
    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 0.95rem;
    }
    .submit-button {
        padding: 12px 0;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        max-width: 280px; /* Чуть уже меню на очень маленьких экранах */
        padding-top: 70px; /* Меньше отступ сверху */
    }
    
    .nav-menu a {
        font-size: 0.95rem; /* Еще меньше шрифт */
        padding: 6px 0; /* Еще меньше padding */
    }
}