/* 
* Основные стили для блога "Русская кухня в США"
* Автор: Иван Смирнов
* Год: 2024
*/

/* ==================== ОБЩИЕ СТИЛИ ==================== */

:root {
    --primary-color: #e63946;
    --secondary-color: #457b9d;
    --accent-color: #f1faee;
    --dark-color: #1d3557;
    --light-color: #a8dadc;
    --white-color: #ffffff;
    --gray-color: #f8f9fa;
    --text-color: #333333;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--dark-color);
    color: var(--white-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--dark-color);
}

section {
    padding: 60px 0;
}

.hover-effect {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: var(--transition);
}

.hover-effect:after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.hover-effect:hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.hover-effect:hover {
    color: var(--primary-color);
}

/* ==================== ШАПКА ==================== */

header {
    background-color: var(--white-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    max-width: 150px;
}

.logo img {
    width: 100%;
    height: auto;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 30px;
}

nav ul li:first-child {
    margin-left: 0;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

nav ul li a:hover:after,
nav ul li a.active:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

nav ul li a.active {
    color: var(--primary-color);
}

/* ==================== ГЛАВНАЯ СТРАНИЦА ==================== */

.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white-color);
    text-align: center;
    padding: 120px 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--white-color);
}

.hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.featured-posts {
    background-color: var(--gray-color);
}

.featured-posts h2 {
    text-align: center;
    margin-bottom: 40px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.post-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card .post-content {
    padding: 20px;
}

.post-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.post-card p {
    color: #666;
    margin-bottom: 15px;
}

.read-more {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.read-more:after {
    content: '→';
    margin-left: 5px;
    transition: var(--transition);
}

.read-more:hover:after {
    margin-left: 10px;
}

/* ==================== СТРАНИЦА БЛОГА ==================== */

.page-header {
    background-color: var(--dark-color);
    color: var(--white-color);
    text-align: center;
    padding: 60px 0;
}

.page-header h1 {
    color: var(--white-color);
    margin-bottom: 15px;
}

.page-header p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
}

.blog-posts {
    background-color: var(--white-color);
}

.post-item {
    display: flex;
    margin-bottom: 50px;
    background-color: var(--gray-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-image {
    flex: 0 0 300px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 20px;
    flex: 1;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.post-meta span {
    margin-right: 20px;
}

/* ==================== СТРАНИЦА ПОСТА ==================== */

.post-header {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 60px 0;
}

.post-header h1 {
    color: var(--white-color);
    margin-bottom: 15px;
}

.post-content {
    padding: 60px 0;
}

.post-content .post-image {
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-text h2 {
    margin-top: 40px;
}

.post-text h3 {
    margin-top: 30px;
}

.post-text blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #555;
}

.post-tags {
    margin-top: 30px;
}

.post-tags ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.post-tags ul li {
    margin-right: 10px;
    margin-bottom: 10px;
}

.post-tags ul li a {
    display: block;
    background-color: var(--light-color);
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.post-tags ul li a:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.share-post {
    margin-top: 30px;
}

.social-share {
    display: flex;
}

.social-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--dark-color);
    color: var(--white-color);
    border-radius: 50%;
    margin-right: 10px;
}

.social-share a:hover {
    background-color: var(--primary-color);
}

.post-navigation {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.nav-links {
    display: flex;
    justify-content: space-between;
}

.nav-previous,
.nav-next {
    max-width: 45%;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 15px;
    background-color: var(--gray-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-previous a:hover,
.nav-next a:hover {
    background-color: var(--light-color);
}

.nav-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.nav-title {
    font-weight: 700;
    color: var(--dark-color);
}

.related-posts {
    background-color: var(--gray-color);
}

.related-posts h2 {
    text-align: center;
    margin-bottom: 40px;
}

/* ==================== СТРАНИЦА О НАС ==================== */

.about-content {
    padding: 60px 0;
}

.about-intro {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
}

.team-section {
    margin-bottom: 60px;
}

.team-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

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

.team-member {
    text-align: center;
    background-color: var(--gray-color);
    padding: 20px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.team-member img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 15px;
}

.team-member h3 {
    margin-bottom: 5px;
}

.team-member p {
    color: #666;
    margin-bottom: 10px;
}

.team-member .social-icons {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.team-member .social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: var(--dark-color);
    color: var(--white-color);
    border-radius: 50%;
    margin: 0 5px;
}

.team-member .social-icons a:hover {
    background-color: var(--primary-color);
}

.our-story {
    max-width: 800px;
    margin: 0 auto;
}

.testimonials {
    background-color: var(--gray-color);
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 40px;
}

.testimonials-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.testimonials-slider::-webkit-scrollbar {
    display: none;
}

.testimonial {
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding: 20px;
}

.testimonial-content {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
}

.testimonial-content:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50px;
    width: 20px;
    height: 20px;
    background-color: var(--white-color);
    transform: rotate(45deg);
}

.testimonial-author {
    margin-top: 20px;
    margin-left: 50px;
    font-weight: 700;
}

/* ==================== СТРАНИЦА КОНТАКТОВ ==================== */

.contact-content {
    padding: 60px 0;
}

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

.contact-card {
    display: flex;
    background-color: var(--gray-color);
    padding: 20px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.contact-card .icon {
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

.contact-card .content {
    flex: 1;
}

.contact-card h3 {
    margin-bottom: 5px;
}

.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    background-color: var(--gray-color);
    padding: 30px;
    border-radius: var(--border-radius);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.map-section {
    background-color: var(--gray-color);
}

.map-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.map-container {
    height: 450px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-section {
    padding: 60px 0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-item h3 {
    margin-bottom: 10px;
    cursor: pointer;
    display: inline-block;
}

/* ==================== ОПРОС ==================== */

.poll-section {
    background-color: var(--accent-color);
    padding: 60px 0;
}

.poll-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.poll {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.poll h3 {
    margin-bottom: 20px;
    text-align: center;
}

.poll-option {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.poll-option input[type="radio"] {
    margin-right: 10px;
}

.poll-option label {
    cursor: pointer;
}

.poll button {
    display: block;
    margin: 20px auto 0;
}

.poll-results {
    margin-top: 30px;
    display: none;
}

.poll-results h4 {
    margin-bottom: 15px;
}

.result-bar {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.result-bar span:first-child {
    flex: 0 0 100px;
}

.result-bar span:last-child {
    flex: 0 0 50px;
    text-align: right;
}

.result-bar .bar {
    flex: 1;
    height: 20px;
    background-color: #eee;
    border-radius: 10px;
    margin: 0 10px;
    overflow: hidden;
}

.result-bar .fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 10px;
}

/* ==================== ПОДПИСКА НА НОВОСТИ ==================== */

.newsletter {
    background-color: var(--dark-color);
    color: var(--white-color);
    text-align: center;
}

.newsletter h2 {
    color: var(--white-color);
    margin-bottom: 15px;
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 30px;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-family: inherit;
}

.newsletter-form button {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* ==================== ФУТЕР ==================== */

footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 60px 0 30px;
}

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

.footer-logo {
    max-width: 150px;
}

.footer-logo img {
    width: 100%;
    margin-bottom: 15px;
}

.footer-links h3 {
    color: var(--white-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-links h3:after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 0;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--light-color);
}

.footer-links ul li a:hover {
    color: var(--white-color);
}

.footer-contact h3 {
    color: var(--white-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-contact h3:after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 0;
}

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.footer-contact p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-contact .social-icons {
    display: flex;
    margin-top: 20px;
}

.footer-contact .social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.footer-contact .social-icons a:hover {
    background-color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== КУКИС БАННЕР ==================== */

.cookies-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 15px 0;
    z-index: 1000;
    display: none;
}

.cookies-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.cookies-content p {
    margin: 0 0 10px;
    flex: 1 0 100%;
}

.cookies-buttons {
    display: flex;
    gap: 10px;
    margin-right: 20px;
}

.cookies-content a {
    color: var(--light-color);
    text-decoration: underline;
}

.cookies-content a:hover {
    color: var(--white-color);
}

/* ==================== МОДАЛЬНОЕ ОКНО ==================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    overflow: auto;
}

.modal-content {
    background-color: var(--white-color);
    margin: 15% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 500px;
    position: relative;
    animation: modalopen 0.4s;
}

@keyframes modalopen {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==================== РЕЦЕПТ ==================== */

.recipe-box {
    background-color: var(--gray-color);
    padding: 30px;
    border-radius: var(--border-radius);
    margin: 30px 0;
}

.recipe-box h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.recipe-box h4 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.recipe-box ul,
.recipe-box ol {
    margin-bottom: 0;
}

.recipe-ingredients {
    background-color: var(--accent-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.recipe-notes {
    background-color: var(--gray-color);
    padding: 15px;
    border-left: 4px solid var(--primary-color);
    margin: 20px 0;
}

.recipe-instructions {
    counter-reset: step;
}

.recipe-instructions li {
    margin-bottom: 20px;
}

.recipe-instructions h4 {
    margin-bottom: 10px;
}

.product-table {
    margin: 30px 0;
    overflow-x: auto;
}

.product-table table {
    width: 100%;
    border-collapse: collapse;
}

.product-table th,
.product-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.product-table th {
    background-color: var(--dark-color);
    color: var(--white-color);
}

.product-table tr:nth-child(even) {
    background-color: var(--gray-color);
}

.product-table tr:hover {
    background-color: var(--light-color);
}

/* ==================== АДАПТИВНЫЙ ДИЗАЙН ==================== */

@media (max-width: 992px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .post-item {
        flex-direction: column;
    }
    
    .post-image {
        flex: 0 0 200px;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-previous,
    .nav-next {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .nav-next {
        margin-bottom: 0;
    }
    
    .cookies-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookies-buttons {
        margin-top: 10px;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 10px 10px;
    }
    
    .post-meta {
        flex-direction: column;
    }
    
    .post-meta span {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: var(--border-radius);
        margin-bottom: 10px;
    }
    
    .newsletter-form button {
        border-radius: var(--border-radius);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-logo {
        max-width: 120px;
    }
}

@media (max-width: 576px) {
    section {
        padding: 40px 0;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .post-card img {
        height: 150px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* ==================== ИКОНКИ ==================== */

.icon-location:before {
    content: '\1F4CD';
    font-family: 'Arial Unicode MS', sans-serif;
}

.icon-phone:before {
    content: '\1F4DE';
    font-family: 'Arial Unicode MS', sans-serif;
}

.icon-mail:before {
    content: '\1F4E7';
    font-family: 'Arial Unicode MS', sans-serif;
}
