/**
 * Homepage Styles
 * Add to child theme's style.css or separate file
 */

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e0e0e0;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: #1a1a1a;
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 40px 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Hero Button Styles */
.hero-btn {
    display: inline-block;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.hero-btn-primary,
.hero-btn-secondary {
    background-color: #fff;
    color: #333;
    border-color: #4d3bfe;
}

.hero-btn-primary:hover,
.hero-btn-secondary:hover {
    background-color: #4d3bfe;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* Кнопка заказа - выделяется */
.hero-btn-cta {
    padding: 18px 38px;
    font-size: 17px;
    background-color: #4d3bfe;
    color: #fff;
    border-color: #4d3bfe;
}

.hero-btn-cta:hover {
    background-color: #4d3bfe;
    border-color: #4d3bfe;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-btn-cta:visited {
    color: #fff;
}

/* ========================================
   Content Sections
   ======================================== */

.latest-workflows-section,
.latest-insights-section {
    padding: 60px 20px;
}

.latest-insights-section {
    background-color: #f8f9fa;
}

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

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

.view-all-link {
    display: inline-block;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    padding: 12px 24px;
    border: 2px solid #333;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background-color: #333;
    color: #fff;
    transform: translateY(-2px);
}

/* ========================================
   Grid Layout for Cards - CRITICAL FIX
   ======================================== */

.latest-workflows-section .post-cards--vertical,
.latest-insights-section .post-cards--vertical {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Tablet layout */
@media screen and (max-width: 1024px) {
    .latest-workflows-section .post-cards--vertical,
    .latest-insights-section .post-cards--vertical {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* Mobile layout */
@media screen and (max-width: 768px) {
    .latest-workflows-section .post-cards--vertical,
    .latest-insights-section .post-cards--vertical {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media screen and (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
    }

    .hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 30px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .btn {
        width: 100%;
        max-width: 400px;
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .hero-buttons a[href*="custom-n8n-workflow-development"] {
        padding: 16px 32px;
        font-size: 16px;
    }

    .section-title {
        font-size: 26px;
    }

    .latest-workflows-section,
    .latest-insights-section {
        padding: 40px 20px;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .hero-buttons a[href*="custom-n8n-workflow-development"] {
        padding: 14px 28px;
        font-size: 15px;
    }

    .section-title {
        font-size: 24px;
    }
}

/* ========================================
   Desktop specific
   ======================================== */

@media screen and (min-width: 1024px) {
    .hero-section {
        padding: 100px 20px;
    }

    .hero-title {
        font-size: 56px;
    }

    .hero-subtitle {
        font-size: 22px;
    }
}

/* ========================================
   Print styles
   ======================================== */

@media print {
    .hero-buttons,
    .view-all-link {
        display: none;
    }
}