* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: #1a1a1a;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.logo i {
    color: #e74c3c;
}

/* Logo Image */
.logo-image {
    height: 4px;
    width: 4px;
    margin-right: 10px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo span {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo:hover span {
    color: #f5576c;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #e74c3c;
    color: #fff;
}

.btn-primary:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-admin {
    background: #f39c12;
    color: #fff;
}

.btn-admin:hover {
    background: #e67e22;
}

/* Flash Messages */
.flash-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    position: relative;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-close {
    position: absolute;
    right: 15px;
    top: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.search-form button {
    padding: 15px 30px;
}

/* Leave Review Button 

.leave-review-btn {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 30px 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
} */

.leave-review-section {
    padding: 40px 0;
    text-align: center;
}

.leave-review-btn {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 30px 50px;
background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(86, 171, 47, 0.4);
    transition: all 0.3s;
}

.leave-review-btn:hover {
    transform: translateY(-5px);
background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    box-shadow: 0 15px 40px rgba(86, 171, 47, 0.6);
}

.leave-review-btn .stars-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}

.leave-review-btn .fa-star:not(.fa-2x) {
    font-size: 20px;
}

.leave-review-btn .fa-2x {
    font-size: 40px;
}

.leave-review-btn span {
    font-size: 20px;
    display: block !important;
}

/*.leave-review-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
} */


/* Categories Grid */
.categories-section {
    padding: 60px 0;
    background: #fff;
}

.categories-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.category-card:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.category-card i {
    font-size: 36px;
}

.category-card span {
    font-weight: 600;
}

/* Blog Section */
.blog-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.blog-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card h3 {
    padding: 20px 20px 10px;
    font-size: 20px;
}

.blog-card p {
    padding: 0 20px;
    color: #666;
}

.blog-card .read-more {
    display: block;
    padding: 15px 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.blog-card .read-more:hover {
    color: #764ba2;
}

/* Footer */
.main-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-about h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-about p {
    color: #aaa;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #f5576c;
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start; /* ВАЖНО - чтобы кнопка не растягивалась */
}

.footer-social-icons {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: #fff;
    font-size: 20px;
    transition: color 0.3s;
    text-decoration: none;
}

.footer-social a:hover {
    color: #f5576c;
}

.mir-button {
    display: inline-flex; /* ИЗМЕНИЛ с inline-block на inline-flex */
    align-items: center; /* центрирует вертикально */
    justify-content: center; /* центрирует горизонтально */
    gap: 8px; /* отступ между иконкой и текстом */
    padding: 10px 20px;
    background: #fff;
    color: #1a1a1a !important;
    text-decoration: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    white-space: nowrap; /* текст не переносится */
}

.mir-button:hover {
    background: #f5576c;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #777;
}

/* Responsive */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    

    .hero-content h1 {
        font-size: 32px;
    }
    
    .search-form {
        flex-direction: column;
    }

   .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-about h3 {
        text-align: center;
    }
    
    .footer-about p {
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-social {
        align-items: center;
    }
    
    .footer-social-icons {
        justify-content: center;
    }

    
}




/* Header Responsive Styles - ADD THIS TO YOUR style.css */

/* Logo styles */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px !important;
    width: auto !important;
    max-width: 40px !important;
    margin-right: 10px;
}

.logo-text {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo:hover .logo-text {
    color: #f5576c;
} 

/* Header container */
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Desktop only elements */
.desktop-only {
    display: inline;
}

/* Button icon + text spacing */
.btn i {
    margin-right: 5px;
}

/* MOBILE VERSION - Hide text, show only icons */
@media (max-width: 768px) {
    /* Hide button text on mobile */
    .btn-text {
        display: none;
    }
    
    /* Hide user name on mobile */
    .desktop-only {
        display: none !important;
    }
    
    /* Remove icon margin when text is hidden */
    .btn i {
        margin-right: 0;
    }
    
    /* Make buttons smaller */
    .btn {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    /* Reduce header gaps */
    .header-right {
        gap: 5px;
    }
    
    .user-menu {
        gap: 5px;
    }
    
    /* Make logo smaller on mobile */
    .logo-img {
        height: 32px !important;
        max-width: 32px !important;
        margin-right: 8px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    /* Reduce container padding */
    .main-header .container {
        padding: 0 10px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .logo-text {
        font-size: 16px;
    }
    
    .logo-img {
        height: 28px !important;
        max-width: 28px !important;
    }
    
    .btn {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* ============================================ */
/*   HOW IT WORKS SECTION */

.how-it-works-section {
    padding: 80px 0;
    background: #fff;
}

.section-title {
    text-align: center;
    font-size: 42px;
    margin-bottom: 25px;
    color: #333;
}

.section-intro {
    text-align: center;
    font-size: 18px;
    line-height: 1.8;
    color: #555;
    max-width: 900px;
    margin: 0 auto 50px;
}

.section-intro strong {
    color: #333;
    font-size: 20px;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.step-card {
    background: #f8f9fa;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
}

.step-number {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.step-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.step-card p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

/* Color System */
.color-system {
    background: #f8f9fa;
    padding: 50px;
    border-radius: 20px;
    margin-bottom: 60px;
}

.subsection-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 35px;
    color: #333;
}

.color-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.color-card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.color-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.color-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
    
}

.color-card.black .color-badge {
    background: #1a1a1a;
    color: #fff;
}

.color-card.gray .color-badge {
    background: #95a5a6;
    color: #fff;
}

.color-card.white .color-badge {
    background: #f8f9fa;
    color: #95a5a6 !important; 
}

.color-period {
    font-size: 14px;
    color: #999;
    font-weight: 600;
    margin-bottom: 10px;
}

.color-card p {
    color: #666;
    font-size: 15px;
    margin: 0;
}

.color-explanation {
    text-align: center;
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.color-explanation strong {
    color: #333;
    font-size: 17px;
}

.warning-text {
    color: #e74c3c;
    font-weight: 600;
    display: block;
    margin-top: 10px;
}

/* Video Tutorials */
.video-tutorials {
    text-align: center;
    margin-bottom: 50px;
}

.tutorial-intro {
    font-size: 17px;
    color: #666;
    margin-bottom: 30px;
}

.tutorial-buttons {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.tutorial-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 35px;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    transition: all 0.3s;
}

.tutorial-btn:hover {
    background: #c0392b;
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(231, 76, 60, 0.5);
}

.tutorial-btn i.fab {
    font-size: 24px;
}

.tutorial-btn i.fas {
    font-size: 20px;
}

.tutorial-btn span {
    font-size: 17px;
}

/* CTA Message */
.cta-message {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.cta-message h3 {
    font-size: 32px;
    color: #fff;
    margin: 0;
    font-weight: 700;
}

/* RESPONSIVE - MOBILE */

@media (max-width: 768px) {
    .how-it-works-section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-intro {
        font-size: 16px;
        padding: 0 15px;
    }
    
    /* Steps - Stack vertically */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .step-card {
        padding: 30px 20px;
    }
    
    /* Color System */
    .color-system {
        padding: 30px 20px;
    }
    
    .subsection-title {
        font-size: 24px;
    }
    
    .color-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Tutorial buttons - Stack vertically */
    .tutorial-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .tutorial-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* CTA */
    .cta-message {
        padding: 25px 15px;
    }
    
    .cta-message h3 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .step-card h3 {
        font-size: 18px;
    }
}