/**
 * Homepage Specific Styles
 */

/* ========== HERO SECTION ========== */
.hero-section {
    position: relative;
    display: block;
    background: linear-gradient(135deg, #1E3A8A 0%, #1E40AF 55%, #3B82F6 100%);
    overflow: hidden;
    padding: 56px 0 48px;
}
.hero-section::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.12) 0, transparent 40%),
                radial-gradient(circle at 85% 80%, rgba(245,158,11,0.18) 0, transparent 45%);
    pointer-events: none;
}
.hero-bg {
    position: absolute; inset: 0;
    background: transparent;
    z-index: 0;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: transparent;
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hero-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.25);
    padding: 7px 16px; border-radius: 999px;
    font-size: 13px; font-weight: 600; letter-spacing: 0.4px;
    text-transform: uppercase; margin-bottom: 18px;
    color: #fff;
}
.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-search-wrap { max-width: 1100px; margin: 0 auto 40px; }
.hero-search-row { display: flex; gap: 16px; margin-bottom: 16px; }
.hero-search-form { flex: 1; background: #fff; border-radius: var(--eph-radius-lg); padding: 10px; box-shadow: var(--eph-shadow-lg); position: relative; }
.hero-search-inner { display: flex; align-items: center; gap: 0; position: relative; }
.hero-search-icon { position: absolute; left: 20px; color: var(--eph-text-lighter); z-index: 1; pointer-events: none; }
.hero-search-input {
    flex: 1; border: none; padding: 14px 16px 14px 50px;
    font-size: 15px; font-family: var(--eph-font-body); outline: none;
    background: transparent;
}
.hero-search-btn {
    width: 64px; height: 64px; flex-shrink: 0; padding: 0;
    background: var(--eph-accent); color: #fff;
    border: none; border-radius: var(--eph-radius); font-size: 14px;
    cursor: pointer; transition: var(--eph-transition);
    font-family: var(--eph-font-body); white-space: nowrap;
    display: flex; align-items: center; justify-content: center;
}
.hero-search-btn:hover { background: var(--eph-accent-dark); }
.hero-search-btn-icon { flex-shrink: 0; }
.hero-search-combined .hero-search-btn { align-self: center; }

.hero-search-select-form { flex: 1; background: #fff; border-radius: var(--eph-radius-lg); padding: 10px; box-shadow: var(--eph-shadow-lg); position: relative; }
.hero-search-select-form .hero-search-inner { display: flex; align-items: center; gap: 0; }
.hero-search-select-form .hero-search-icon { position: static; flex-shrink: 0; margin-left: 8px; z-index: 2; color: var(--eph-text-lighter); }
.hero-select-dropdown { flex: 1; border: none; padding: 12px 40px 12px 12px; font-size: 15px; line-height: 1.4; font-family: var(--eph-font-body); outline: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; background-size: 16px; cursor: pointer; color: var(--eph-text-light); appearance: none; -webkit-appearance: none; }

.hero-search-filters { display: flex; gap: 10px; margin-top: 12px; justify-content: center; }
.hero-filter-select {
    padding: 10px 16px; border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1); color: #fff; border-radius: var(--eph-radius-sm);
    font-size: 14px; font-family: var(--eph-font-body); cursor: pointer;
    backdrop-filter: blur(10px); outline: none; appearance: auto;
}
.hero-filter-select option { color: var(--eph-text); background: #fff; }
.hero-filter-select:focus { border-color: rgba(255,255,255,0.5); }

.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); }

/* ========== CLOSING SOON SECTION ========== */
.closing-soon-section { padding: 36px 0 40px; background: var(--eph-bg-light); }
.closing-soon-inner { position: relative; }
.closing-soon-scroll {
    display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important;
    gap: 20px; overflow-x: auto; overflow-y: hidden;
    padding-bottom: 16px; padding-right: 20px;
    scroll-snap-type: none; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; scrollbar-color: transparent transparent;
}
.closing-soon-scroll::-webkit-scrollbar { display: none; height: 0; }
.closing-soon-scroll::-webkit-scrollbar-track { background: transparent; }
.closing-soon-scroll::-webkit-scrollbar-thumb { background: transparent; }

.closing-soon-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid var(--eph-border); background: #e5e7eb; color: var(--eph-text);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 3; box-shadow: var(--eph-shadow-sm);
    transition: var(--eph-transition);
}
.closing-soon-prev { left: -16px; }
.closing-soon-next { right: -16px; }
.closing-soon-nav-btn:hover { background: var(--eph-primary); color: #fff; border-color: var(--eph-primary); }

.closing-card {
    flex: 0 0 280px !important; min-width: 280px; 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 { text-align: center; padding: 40px; color: var(--eph-text-light); }

/* ========== BLOG SECTION ========== */
.blog-section { padding: 44px 0; }
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.blog-card {
    background: #fff;
    border-radius: var(--eph-radius-lg);
    overflow: hidden;
    box-shadow: var(--eph-shadow);
    border: 1px solid var(--eph-border-light);
    transition: var(--eph-transition);
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--eph-shadow-md);
}
.blog-card-image {
    position: relative;
    aspect-ratio: 3/2;
    overflow: hidden;
}
.blog-card-image a { display: block; width: 100%; height: 100%; }
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.blog-card:hover .blog-card-image img { transform: scale(1.05); }
.blog-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);
}
.blog-card-category {
    position: absolute;
    top: 12px; left: 12px;
    padding: 4px 12px;
    background: var(--eph-primary);
    color: #fff;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
}
.blog-card-body { padding: 20px; }
.blog-card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--eph-text-lighter);
}
.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.blog-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}
.blog-card-title a { color: var(--eph-text); text-decoration: none; }
.blog-card-title a:hover { color: var(--eph-primary); }
.blog-card-excerpt {
    font-size: 14px;
    color: var(--eph-text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}
.blog-card-link {
    color: var(--eph-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
.blog-card-link:hover { text-decoration: underline; }
.no-blog { 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; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.featured .scholarship-card { border: 2px solid var(--eph-accent-light); }
.featured .scholarship-card:hover { border-color: var(--eph-accent); }

/* ========== BROWSE SECTION ========== */
.browse-section {
    padding: 40px 0;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}
.browse-section::before {
    display: none;
}
.browse-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}
.browse-title {
    font-family: var(--eph-font-heading);
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 12px;
}
.browse-subtitle {
    font-size: 17px;
    color: #64748b;
    max-width: 500px;
    margin: 0 auto;
}

.browse-region-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    position: relative;
    z-index: 1;
}

.browse-region-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}
.browse-region-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--card-accent);
    border-radius: 4px 0 0 4px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.browse-region-card:hover {
    background: #eef2ff;
    border-color: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.browse-region-card:hover::before {
    opacity: 1;
}
.browse-region-card:hover .browse-region-arrow {
    transform: translateX(4px);
    opacity: 1;
}
.browse-region-card:hover .browse-region-icon svg {
    color: var(--card-accent);
}

.browse-region-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    border-radius: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.browse-region-icon svg {
    color: #64748b;
    transition: color 0.3s ease;
}

.browse-region-info {
    flex: 1;
    min-width: 0;
}
.browse-region-name {
    display: block;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 2px;
    line-height: 1.3;
}
.browse-region-count {
    display: block;
    font-size: 13px;
    color: #94a3b8;
}

.browse-region-arrow {
    color: #94a3b8;
    flex-shrink: 0;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.browse-region-card--all {
    background: #fff3cd;
    border-color: #ffe69c;
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
    padding: 10px 22px;
}
.browse-region-card--all .browse-region-name {
    font-size: 30px;
}
.browse-region-card--all .browse-region-count {
    font-size: 16px;
}
.browse-region-card--all .browse-region-icon,
.browse-region-card--all .browse-region-arrow {
    display: none;
}
.browse-region-card--all::before {
    background: #f59e0b;
    opacity: 1;
}
.browse-region-card--all:hover {
    background: #ffeeba;
    border-color: #fcd34d;
}

/* ========== LATEST SECTION ========== */
.latest-section { padding: 70px 0; }

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 1024px) {
    .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .browse-region-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero-section { padding: 48px 0 40px; }
    .hero-headline { font-size: 32px; }
    .hero-subheadline { font-size: 16px; }
    .hero-search-row { flex-direction: column; }
    .hero-search-combined .hero-search-btn { width: 100%; }
    .hero-search-select-form .hero-search-inner { flex-direction: row; padding: 0; }
    .hero-search-select-form .hero-search-icon { margin-left: 18px; }
    .hero-select-dropdown { padding: 14px; width: 100%; }
    .hero-search-filters { flex-direction: column; }
    .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; }
    .related-grid { grid-template-columns: 1fr; }
    .browse-title { font-size: 28px; }
    .browse-region-grid { grid-template-columns: 1fr; }
    .browse-section { padding: 50px 0; }
    .blog-grid { grid-template-columns: 1fr; }
    .closing-soon-prev { left: 4px; }
    .closing-soon-next { right: 4px; }
}

@media (max-width: 480px) {
    .hero-section { padding: 40px 0 36px; }
    .hero-content { padding: 0 20px; }
    .hero-kicker { font-size: 11px; padding: 6px 12px; }
    .hero-headline { font-size: 26px; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .stat-divider { display: none; }
    .browse-title { font-size: 26px; }
    .browse-region-grid { grid-template-columns: 1fr; }
    .browse-section { padding: 50px 0; }
}
