/**
 * Homepage Specific Styles
 */

/* ========== HERO SECTION ========== */
.hero-section {
    position: relative; min-height: 540px;
    display: flex; align-items: center;
    background: linear-gradient(135deg, var(--eph-primary-dark) 0%, var(--eph-primary) 50%, var(--eph-primary-light) 100%);
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; background-size: cover;
    background-position: center; z-index: 0;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(30,58,138,0.92) 0%, rgba(30,64,175,0.85) 100%);
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 800px; margin: 0 auto; padding: 60px 0; }
.hero-headline {
    font-size: 48px; color: #fff; margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.hero-subheadline { font-size: 18px; color: rgba(255,255,255,0.85); margin-bottom: 36px; line-height: 1.7; }

.hero-stats {
    display: flex; justify-content: center; align-items: center; gap: 40px;
}
.stat-item { text-align: center; }
.stat-number {
    display: block; font-size: 32px; font-weight: 800; color: #fff;
    font-family: var(--eph-font-heading);
}
.stat-label { font-size: 14px; color: rgba(255,255,255,0.7); }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.2); }

/* ========== RECENT POSTS SECTION ========== */
.recent-posts-section { padding: 70px 0; }
.recent-posts-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px;
}

.recent-post-card {
    background: #fff; border-radius: var(--eph-radius-lg); overflow: hidden;
    box-shadow: var(--eph-shadow); transition: var(--eph-transition);
    border: 1px solid var(--eph-border-light); display: flex; flex-direction: column;
    width: 100%;
}
.recent-post-card:hover { transform: translateY(-4px); box-shadow: var(--eph-shadow-lg); }

.recent-post-image {
    position: relative; overflow: hidden; height: 160px;
    background: var(--eph-bg-gray);
}
.recent-post-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}
.recent-post-card:hover .recent-post-image img { transform: scale(1.05); }
.recent-post-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--eph-primary-50), var(--eph-primary-100));
    color: var(--eph-primary-light);
}
.recent-post-date {
    position: absolute; bottom: 12px; left: 12px;
    padding: 5px 14px; background: var(--eph-primary); color: #fff;
    border-radius: 50px; font-size: 12px; font-weight: 600;
}

.recent-post-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.recent-post-cats { margin-bottom: 8px; }
.recent-post-cat {
    display: inline-block; padding: 3px 10px; background: var(--eph-primary-50);
    color: var(--eph-primary); font-size: 11px; font-weight: 600;
    text-transform: uppercase; border-radius: 50px; letter-spacing: 0.3px;
}

.recent-post-title { font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; flex: 1; }
.recent-post-title a { color: var(--eph-text); }
.recent-post-title a:hover { color: var(--eph-primary); }

.recent-post-excerpt { font-size: 13px; color: var(--eph-text-light); line-height: 1.6; margin-bottom: 12px; }

.recent-post-link {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--eph-primary); font-weight: 600; font-size: 14px;
}
.recent-post-link:hover { color: var(--eph-primary-dark); }

.no-posts { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--eph-text-light); }

/* ========== BROWSE SECTION ========== */
.browse-section { padding: 70px 0; background: var(--eph-bg-light); }
.browse-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.browse-block .section-title { margin-bottom: 28px; }

.region-cards, .degree-cards { display: flex; flex-direction: column; gap: 14px; }
.region-card, .degree-card {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 22px; background: #fff; border: 1px solid var(--eph-border);
    border-radius: var(--eph-radius); transition: var(--eph-transition);
    text-decoration: none; color: var(--eph-text);
}
.region-card:hover, .degree-card:hover {
    border-color: var(--eph-primary); box-shadow: var(--eph-shadow-md);
    transform: translateX(4px);
}
.region-icon, .degree-icon {
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    background: var(--eph-primary-50); border-radius: var(--eph-radius-sm);
    font-size: 24px; flex-shrink: 0;
}
.degree-icon { color: var(--eph-primary); }
.region-name, .degree-name { font-weight: 700; font-size: 16px; }
.region-count, .degree-desc { font-size: 13px; color: var(--eph-text-light); }

/* ========== CLOSING SOON SECTION ========== */
.closing-soon-section { padding: 60px 0; background: var(--eph-bg-light); }
.closing-soon-scroll {
    display: flex; gap: 20px; overflow-x: auto; padding-bottom: 16px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.closing-soon-scroll::-webkit-scrollbar { height: 6px; }
.closing-soon-scroll::-webkit-scrollbar-track { background: var(--eph-border-light); border-radius: 3px; }
.closing-soon-scroll::-webkit-scrollbar-thumb { background: var(--eph-primary-light); border-radius: 3px; }

.closing-card {
    flex: 0 0 280px; scroll-snap-align: start; background: #fff;
    border-radius: var(--eph-radius-lg); overflow: hidden;
    box-shadow: var(--eph-shadow); transition: var(--eph-transition);
    border: 1px solid var(--eph-border-light);
}
.closing-card:hover { transform: translateY(-3px); box-shadow: var(--eph-shadow-md); }
.closing-card-image { position: relative; height: 160px; overflow: hidden; background: var(--eph-bg-gray); }
.closing-card-image img { width: 100%; height: 100%; object-fit: cover; }
.closing-card-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--eph-primary-50), var(--eph-primary-100));
    color: var(--eph-primary-light);
}
.days-badge {
    position: absolute; top: 10px; right: 10px;
    padding: 4px 12px; background: var(--eph-danger); color: #fff;
    border-radius: 50px; font-size: 11px; font-weight: 700;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.closing-card-body { padding: 16px; }
.closing-card-title { font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.closing-card-title a { color: var(--eph-text); }
.closing-card-title a:hover { color: var(--eph-primary); }
.closing-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }

.no-closing { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--eph-text-light); }

/* ========== FEATURED SECTION ========== */
.featured-section { padding: 70px 0; }
.featured-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 28px;
}
.featured .scholarship-card { border: 2px solid var(--eph-accent-light); }
.featured .scholarship-card:hover { border-color: var(--eph-accent); }

/* ========== LATEST SECTION ========== */
.latest-section { padding: 70px 0; }
.latest-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 28px;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 1200px) {
    .recent-posts-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 1024px) {
    .featured-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .latest-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .recent-posts-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .related-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .browse-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .hero-headline { font-size: 32px; }
    .hero-subheadline { font-size: 16px; }
    .hero-stats { gap: 20px; }
    .stat-number { font-size: 24px; }
    .newsletter-inner { flex-direction: column; text-align: center; }
    .newsletter-input { width: 100%; border-radius: var(--eph-radius-sm); }
    .newsletter-btn { border-radius: var(--eph-radius-sm); width: 100%; }
    .subscribe-form { flex-direction: column; gap: 10px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .featured-grid { grid-template-columns: 1fr !important; }
    .latest-grid { grid-template-columns: 1fr !important; }
    .recent-posts-grid { grid-template-columns: 1fr !important; }
    .related-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
    .hero-section { min-height: 480px; }
    .hero-content { padding: 40px 0; }
    .hero-headline { font-size: 26px; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .stat-divider { display: none; }
}
