/* Premium Home Page Styles */
.home-page {
    overflow-x: hidden;
}

/* Modern Hero Section */
.home-hero-modern {
    background: var(--ke-gradient);
    color: white;
    padding: 8rem 0 6rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
    border-radius: 0 0 50px 50px;
}

.home-hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../branding/hero-pattern.svg') center/cover;
    opacity: 0.1;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title-modern {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-desc-modern {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Glass Search Card */
.glass-search-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    margin-top: -5rem;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ke-primary);
    z-index: 5;
}

.glass-search-card .form-control {
    padding-left: 3rem;
    height: 3.5rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.glass-search-card .form-control:focus {
    border-color: var(--ke-primary);
    box-shadow: 0 0 0 4px rgba(var(--ke-primary-rgb), 0.1);
}

.btn-search {
    height: 3.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    background: var(--ke-primary);
    border: none;
    transition: transform 0.2s;
}

.btn-search:hover {
    transform: translateY(-2px);
    background: var(--ke-btn-hover-color);
}

/* Stats Section */
.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--ke-primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #f1f5f9;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: var(--ke-primary);
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(var(--ke-primary-rgb), 0.1);
    /* Fallback if RGB not avail, handled by opacity */
    background: #f0f4ff;
    /* Safe fallback */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--ke-primary);
    font-size: 2rem;
}

.feature-card h4 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--ke-text-color);
}

/* University Cards (KE Card) */
.ke-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    position: relative;
}

.ke-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.ke-card-media {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.ke-card-media img.cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ke-card:hover .ke-card-media img.cover {
    transform: scale(1.05);
}

.ke-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.ke-card-rating-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    color: #f59e0b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ke-card-logo-wrapper {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 12px;
    position: absolute;
    top: 170px;
    /* Overlaps media and body */
    left: 1.5rem;
    padding: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ke-card-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.ke-card-logo-wrapper i {
    font-size: 1.5rem;
    color: var(--ke-primary);
}

.ke-card-body {
    padding: 2.5rem 1.5rem 1.5rem;
    /* Extra top padding for logo */
}

.ke-card-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--ke-text-color);
}

.ke-card-location {
    font-size: 0.9rem;
    color: #64748b;
}

/* CTA Section */
.cta-section {
    background: var(--ke-primary);
    border-radius: 30px;
    padding: 5rem 0;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
}

/* Animations */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@media (max-width: 768px) {
    .hero-title-modern {
        font-size: 2.5rem;
    }

    .glass-search-card {
        margin-top: -2rem;
        padding: 1.5rem;
    }
}