/**
 * Hero Posts Gallery Styles
 * Минималистичный дизайн галереи постов
 * 
 * @package EHF
 * @since 1.0.0
 */

/* === Hero Posts Section === */
.hero-posts-gallery {
    position: relative;
    padding: 0;
    background-color: var(--ehf-white);
    overflow: hidden;
}

.hero-posts-container {
    max-width: var(--ehf-container-xl);
    margin: 0 auto;
    padding: 0 var(--ehf-spacing-lg);
    padding-top: var(--ehf-spacing-lg);
    padding-bottom: var(--ehf-spacing-xl);
}

/* === Hero Header === */
.hero-header {
    display: none;
}

.hero-title {
    font-size: var(--ehf-font-size-4xl);
    font-weight: var(--ehf-font-weight-bold);
    color: #4A4A4A;
    margin-bottom: var(--ehf-spacing-md);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: var(--ehf-font-size-lg);
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
}

/* === Posts Grid (3 posts: 1 featured + 2 regular) === */
.hero-posts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--ehf-spacing-xl);
    margin-bottom: 0;
    min-height: 500px;
}

/* === Featured Post (Large) === */
.hero-post-featured {
    grid-row: span 2;
    position: relative;
    border-radius: var(--ehf-border-radius-xl);
    overflow: hidden;
    background-color: #F9FAFB;
    box-shadow: var(--ehf-shadow-lg);
    transition: all var(--ehf-transition-normal);
}

.hero-post-featured:hover {
    transform: translateY(-8px);
    box-shadow: var(--ehf-shadow-xl);
}

/* === Regular Posts (Small) === */
.hero-post-regular {
    position: relative;
    border-radius: var(--ehf-border-radius-lg);
    overflow: hidden;
    background-color: #F9FAFB;
    box-shadow: var(--ehf-shadow-md);
    transition: all var(--ehf-transition-normal);
}

.hero-post-regular:hover {
    transform: translateY(-4px);
    box-shadow: var(--ehf-shadow-lg);
}

/* === Post Links === */
.hero-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.hero-post-link:hover {
    text-decoration: none;
}

/* === Post Images === */
.hero-post-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}

.hero-post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ehf-transition-slow);
}

.hero-post:hover .hero-post-img {
    transform: scale(1.05);
}

/* === Image Placeholder === */
.hero-post-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9CA3AF;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}

/* === Post Overlay === */
.hero-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    padding: var(--ehf-spacing-xl);
    color: var(--ehf-white);
    transform: translateY(20px);
    transition: all var(--ehf-transition-normal);
}

.hero-post:hover .hero-post-overlay {
    transform: translateY(0);
}

.hero-post-content {
    position: relative;
    z-index: 2;
}

/* === Post Categories === */
.hero-post-category {
    display: inline-block;
    background-color: #D1B79F;
    color: var(--ehf-white);
    font-size: var(--ehf-font-size-xs);
    font-weight: var(--ehf-font-weight-semibold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: var(--ehf-spacing-xs) var(--ehf-spacing-sm);
    border-radius: var(--ehf-border-radius-md);
    margin-bottom: var(--ehf-spacing-sm);
}

/* === Post Titles === */
.hero-post-title {
    font-weight: var(--ehf-font-weight-bold);
    line-height: 1.3;
    margin-bottom: var(--ehf-spacing-sm);
    color: var(--ehf-white);
}

.hero-post-featured .hero-post-title {
    font-size: var(--ehf-font-size-2xl);
    margin-bottom: var(--ehf-spacing-md);
}

.hero-post-regular .hero-post-title {
    font-size: var(--ehf-font-size-lg);
}

/* === Post Meta === */
.hero-post-meta {
    display: flex;
    align-items: center;
    gap: var(--ehf-spacing-sm);
    font-size: var(--ehf-font-size-sm);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--ehf-spacing-md);
}

.hero-post-author,
.hero-post-date {
    position: relative;
}

.hero-post-author::after {
    content: '•';
    margin-left: var(--ehf-spacing-sm);
    opacity: 0.6;
}

/* === Post Excerpt === */
.hero-post-excerpt {
    display: none;
}

/* === Read More === */
.hero-post-readmore {
    display: inline-flex;
    align-items: center;
    gap: var(--ehf-spacing-xs);
    font-size: var(--ehf-font-size-sm);
    font-weight: var(--ehf-font-weight-semibold);
    color: #D1B79F;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--ehf-transition-fast);
}

.hero-post:hover .hero-post-readmore {
    gap: var(--ehf-spacing-sm);
    color: #F5D5AE;
}

/* === View All Button === */
.hero-posts-footer {
    text-align: center;
}

.hero-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--ehf-spacing-sm);
    background-color: #D1B79F;
    color: var(--ehf-white);
    font-weight: var(--ehf-font-weight-semibold);
    font-size: var(--ehf-font-size-base);
    text-decoration: none;
    padding: var(--ehf-spacing-md) var(--ehf-spacing-xl);
    border-radius: var(--ehf-border-radius-lg);
    transition: all var(--ehf-transition-normal);
    box-shadow: var(--ehf-shadow-md);
}

.hero-view-all-btn:hover {
    background-color: #C4A885;
    transform: translateY(-2px);
    box-shadow: var(--ehf-shadow-lg);
    text-decoration: none;
    color: var(--ehf-white);
}

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

/* Large screens */
@media (max-width: 1200px) {
    .hero-posts-container {
        padding-inline: var(--ehf-spacing-md);
    }
    
    .hero-posts-grid {
        gap: var(--ehf-spacing-lg);
        min-height: 500px;
    }
}

/* Medium screens */
@media (max-width: 768px) {
    .hero-posts-container {
        padding-inline: var(--ehf-spacing-md);
    }
    
    .hero-title {
        font-size: var(--ehf-font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--ehf-font-size-base);
    }
    
    .hero-posts-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: var(--ehf-spacing-lg);
        min-height: auto;
    }
    
    .hero-post-featured {
        grid-row: span 1;
        min-height: 400px;
    }
    
    .hero-post-regular {
        min-height: 280px;
    }
    
    .hero-post-overlay {
        padding: var(--ehf-spacing-lg);
        transform: translateY(0);
    }
    
    .hero-post-featured .hero-post-title {
        font-size: var(--ehf-font-size-xl);
    }
    
    .hero-posts-footer {
        margin-top: var(--ehf-spacing-3xl);
    }
}

/* Small screens */
@media (max-width: 480px) {
    .hero-posts-container {
        padding-inline: var(--ehf-spacing-sm);
    }
    
    .hero-title {
        font-size: var(--ehf-font-size-2xl);
    }
    
    .hero-posts-grid {
        gap: var(--ehf-spacing-md);
    }
    
    .hero-post-featured {
        min-height: 320px;
    }
    
    .hero-post-regular {
        min-height: 220px;
    }
    
    .hero-post-overlay {
        padding: var(--ehf-spacing-md);
    }
    
    .hero-view-all-btn {
        font-size: var(--ehf-font-size-sm);
        padding: var(--ehf-spacing-sm) var(--ehf-spacing-lg);
    }
}

/* Animation for loading state */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.hero-post-loading {
    background: linear-gradient(
        90deg,
        #f3f4f6 25%, 
        #e5e7eb 50%, 
        #f3f4f6 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Focus states for accessibility */
.hero-post-link:focus {
    outline: 2px solid #D1B79F;
    outline-offset: 4px;
}

.hero-view-all-btn:focus {
    outline: 2px solid #D1B79F;
    outline-offset: 4px;
}

/* === Front Page Additional Content === */

.front-page-content {
    padding: var(--ehf-spacing-4xl) 0;
    background-color: #FAFAFA;
}

.front-page-static-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* === Recent Posts Section === */
.recent-posts-section {
    margin-top: var(--ehf-spacing-lg);
}

.section-header {
    text-align: center;
    margin-bottom: var(--ehf-spacing-3xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: var(--ehf-font-size-3xl);
    font-weight: var(--ehf-font-weight-bold);
    color: #4A4A4A;
    margin-bottom: var(--ehf-spacing-md);
    line-height: 1.2;
}

.section-subtitle {
    font-size: var(--ehf-font-size-lg);
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
}

/* === Posts Grid === */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--ehf-spacing-xl);
    margin-bottom: var(--ehf-spacing-3xl);
}

/* === Post Cards === */
.post-card {
    background-color: var(--ehf-white);
    border-radius: var(--ehf-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--ehf-shadow-sm);
    transition: all var(--ehf-transition-normal);
    border: 1px solid #F3F4F6;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ehf-shadow-lg);
    border-color: #D1B79F;
}

.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.post-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* === Post Card Images === */
.post-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}

.post-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ehf-transition-slow);
}

.post-card:hover .post-card-img {
    transform: scale(1.05);
}

.post-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9CA3AF;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}

/* === Post Card Content === */
.post-card-content {
    padding: var(--ehf-spacing-lg);
}

.post-card-category {
    display: inline-block;
    background-color: #F0EDE8;
    color: #8B6F47;
    font-size: var(--ehf-font-size-xs);
    font-weight: var(--ehf-font-weight-semibold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: var(--ehf-spacing-xs) var(--ehf-spacing-sm);
    border-radius: var(--ehf-border-radius-md);
    margin-bottom: var(--ehf-spacing-sm);
}

.post-card-title {
    font-size: var(--ehf-font-size-xl);
    font-weight: var(--ehf-font-weight-bold);
    color: #4A4A4A;
    line-height: 1.3;
    margin-bottom: var(--ehf-spacing-sm);
    transition: color var(--ehf-transition-fast);
}

.post-card:hover .post-card-title {
    color: #D1B79F;
}

.post-card-excerpt {
    font-size: var(--ehf-font-size-sm);
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: var(--ehf-spacing-md);
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: var(--ehf-spacing-sm);
    font-size: var(--ehf-font-size-xs);
    color: #9CA3AF;
}

.post-card-author::after {
    content: '•';
    margin-left: var(--ehf-spacing-sm);
    opacity: 0.6;
}

/* === Posts Grid Footer === */
.posts-grid-footer {
    text-align: center;
}

.view-all-posts-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--ehf-spacing-sm);
    background-color: transparent;
    color: #D1B79F;
    font-weight: var(--ehf-font-weight-semibold);
    font-size: var(--ehf-font-size-base);
    text-decoration: none;
    padding: var(--ehf-spacing-md) var(--ehf-spacing-xl);
    border: 2px solid #D1B79F;
    border-radius: var(--ehf-border-radius-lg);
    transition: all var(--ehf-transition-normal);
}

.view-all-posts-btn:hover {
    background-color: #D1B79F;
    color: var(--ehf-white);
    transform: translateY(-2px);
    box-shadow: var(--ehf-shadow-md);
    text-decoration: none;
}

/* === Responsive Design for Additional Content === */

/* Medium screens */
@media (max-width: 768px) {
    .front-page-content {
        padding: var(--ehf-spacing-3xl) 0;
    }
    
    .recent-posts-section {
    }
    
    .section-header {
        margin-bottom: var(--ehf-spacing-2xl);
    }
    
    .section-title {
        font-size: var(--ehf-font-size-2xl);
    }
    
    .section-subtitle {
        font-size: var(--ehf-font-size-base);
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: var(--ehf-spacing-lg);
        margin-bottom: var(--ehf-spacing-2xl);
    }
    
    .post-card-image {
        aspect-ratio: 3 / 4;
    }
    
    .post-card-content {
        padding: var(--ehf-spacing-md);
    }
    
    .post-card-title {
        font-size: var(--ehf-font-size-lg);
    }
}

/* Small screens */
@media (max-width: 480px) {
    .front-page-content {
        padding: var(--ehf-spacing-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--ehf-spacing-xl);
    }
    
    .section-title {
        font-size: var(--ehf-font-size-xl);
    }
    
    .posts-grid {
        gap: var(--ehf-spacing-md);
        margin-bottom: var(--ehf-spacing-xl);
    }
    
    .post-card-image {
        aspect-ratio: 3 / 4;
    }
    
    .post-card-content {
        padding: var(--ehf-spacing-sm);
    }
    
    .view-all-posts-btn {
        font-size: var(--ehf-font-size-sm);
        padding: var(--ehf-spacing-sm) var(--ehf-spacing-lg);
    }
}

.post-card-link:focus {
    outline: 2px solid #D1B79F;
    outline-offset: 4px;
}

.view-all-posts-btn:focus {
    outline: 2px solid #D1B79F;
    outline-offset: 4px;
}

/* === Page Main Content === */
.hero-page-content {
    text-align: center;
    margin: 0 auto;
    max-width: var(--ehf-container-xl);
    padding: var(--ehf-spacing-lg);
    background-color: var(--ehf-white);
}

.page-main-title {
    font-family: var(--ehf-font-family-headings);
    font-size: var(--ehf-font-size-4xl);
    font-weight: var(--ehf-font-weight-bold);
    color: #4A4A4A;
    margin-bottom: var(--ehf-spacing-lg);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.page-main-description {
    font-family: var(--ehf-font-family);
    font-size: var(--ehf-font-size-lg);
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
}

.page-main-description p {
    margin-bottom: var(--ehf-spacing-md);
}

.page-main-description p:last-child {
    margin-bottom: 0;
}

/* Responsive styles for page content */
@media (max-width: 768px) {
    .hero-page-content {
        padding: var(--ehf-spacing-2xl) var(--ehf-spacing-md);
    }
    
    .page-main-title {
        font-size: var(--ehf-font-size-3xl);
    }
    
    .page-main-description {
        font-size: var(--ehf-font-size-base);
    }
}

@media (max-width: 480px) {
    .hero-page-content {
        padding: var(--ehf-spacing-xl) var(--ehf-spacing-sm);
    }
}