/* ========================================
   Homepage Styles - Làng Lá Base
   Modern, responsive design for homepage
   ======================================== */

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    margin: 0 0 20px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.hero-banner {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 20px; /* Reduced from 30px */
    color: white;
}

.hero-title {
    font-size: 1.8rem; /* Reduced from 2.5rem */
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1rem; /* Reduced from 1.2rem */
    margin: 5px 0 0 0;
    opacity: 0.9;
}

/* News Section */
.news-section {
    margin: 25px 0; /* Reduced from 40px */
}

.section-header {
    text-align: center;
    margin-bottom: 20px; /* Reduced from 30px */
}

.section-title {
    font-size: 1.5rem; /* Reduced from 2rem */
    font-weight: 800;
    color: #1c1e21;
    margin: 0 0 8px 0;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #00AB55;
    border-radius: 10px;
}

.section-subtitle {
    font-size: 0.85rem;
    color: #65676b;
    margin: 10px 0 0 0;
}

/* News Cards Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* More compact */
    gap: 15px; /* Reduced from 25px */
    margin-top: 20px;
}

.news-card {
    background: white;
    border-radius: 16px; /* Optimized rounding */
    overflow: hidden;
    border: 1px solid #e4e6eb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
    border-color: #00AB55;
}

.news-card-image {
    width: 100%;
    height: 160px; /* Reduced from 200px */
    object-fit: cover;
}

.news-card-image-wrapper {
    overflow: hidden;
    position: relative;
    background: #f0f2f5;
}

.news-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #00AB55;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.news-card-content {
    padding: 12px; /* Reduced from 20px */
}

.news-card-title {
    font-size: 0.95rem; /* Reduced from 1.1rem */
    font-weight: 700;
    color: #1c1e21;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.news-card-description {
    font-size: 0.8rem; /* Reduced from 0.9rem */
    color: #65676b;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f2f5;
}

.news-card-date {
    font-size: 0.75rem;
    color: #8a8d91;
}

.news-card-link {
    color: #00AB55;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

/* Intro Section */
.intro-section {
    background: #ffffff;
    padding: 25px; /* Reduced from 40px */
    border-radius: 16px;
    margin: 20px 0;
    border: 1px solid #e4e6eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.intro-section h4 {
    color: #00AB55;
    font-size: 1.3rem; /* Reduced from 1.8rem */
    margin-bottom: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.intro-section p {
    font-size: 0.9rem; /* Reduced from 1.05rem */
    line-height: 1.6;
    margin-bottom: 12px;
    color: #4b4f56;
}

.intro-section b {
    color: #00AB55;
    font-weight: 700;
}

.intro-image {
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    margin: 20px 0;
    transition: transform 0.3s ease;
}

.intro-image:hover {
    transform: scale(1.02);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.4rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.2rem; /* Sync with global */
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .news-card-image {
        height: 140px;
    }
    
    .intro-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .intro-section h4 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-overlay {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .news-card-content {
        padding: 15px;
    }
}

/* Utilities & Add-ons */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hover-translate-y:hover {
    transform: translateY(-8px) !important;
}

.transition-all {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-outline-emerald {
    color: #00AB55;
    border: 1.5px solid #00AB55;
    background: transparent;
    transition: all 0.2s;
}

.btn-outline-emerald:hover {
    background: #00AB55;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 171, 85, 0.2);
}

.news-card-image {
    transition: transform 0.5s ease;
}

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

.news-card {
    animation: fadeInUp 0.6s ease forwards;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }
