/* Custom Styles for Kwankwasiyya-MIU Scholarship Portal */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
}

.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.timeline .card {
    border-left: 4px solid #007bff;
}

.badge {
    font-weight: 500;
}

/* How It Works Section Styling - Carousel Version */
.how-it-works-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.how-it-works-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(147, 51, 234, 0.05) 0%, transparent 50%);
}

/* Step Indicators */
.step-indicators {
    margin-bottom: 2rem;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cbd5e1;
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.step-dot.active {
    background-color: #2563eb;
    transform: scale(1.2);
}

.step-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.3;
    animation: pulse-dot 3s infinite;
}

.step-dot.active::before {
    animation: pulse-dot-active 3s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes pulse-dot-active {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Large Step Icons - full-width rectangular/square container */
.step-icon-large {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 4 / 3;      /* this gives it height */
    border-radius: 16px;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: center;
    transition: all 0.4s ease;
    z-index: 1;
}

/* Show background & animation when image is loaded */
.step-icon-large.image-loaded {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 30px 80px rgba(0,0,0,0.2);
    animation: float-icon 8s ease-in-out infinite;
}

/* Animated “glow” behind image, same rectangle shape */
.step-icon-large.image-loaded::before {
    content: '';
    position: absolute;
    inset: 0;                     /* fill entire container */
    border-radius: inherit;       /* SAME shape as container */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.35;
    z-index: -1;
    animation: rotate-bg 25s linear infinite reverse;
}


.step-icon-large i {
    font-size: 6rem;
    color: white;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
    z-index: 1;
}

/* GIF/Images with zoom effect - fill the container rectangle */
.step-gif {
    position: absolute;
    inset: 0;                     /* top:0; right:0; bottom:0; left:0 */
    width: 100%;
    height: 100%;
    object-fit: cover;            /* crop nicely while filling rect/square */
    border-radius: inherit;       /* match .step-icon-large rectangle shape */
    box-shadow: 0 30px 80px rgba(0,0,0,0.2);
    transform-origin: center center;

    /* 👇 make it visible by default */
    transform: scale(1);
    opacity: 1;

    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.6s ease;
    z-index: 2;
}

/* Optional: keep a subtle zoom if you ever add the "loaded" class */
.step-gif.loaded {
    transform: scale(1.02);  /* tiny pop effect */
    opacity: 1;
}



/* Placeholder on top */
.image-placeholder {
    z-index: 10;
}

/* Image Placeholder */
.image-placeholder {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 18px;
    line-height: 1.5;
    color: #666;
    background: rgba(255, 255, 255, 0.95);
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px 20px;
    width: 100%;
    height: 400px;
    z-index: 10;
    pointer-events: none;
}

.image-placeholder small {
    font-size: 14px;
    color: #888;
    display: block;
    margin-top: 10px;
}

/* Responsive adjustments for placeholder */
@media (max-width: 992px) {
    .image-placeholder {
        font-size: 14px;
        height: 300px;
        padding: 30px 15px;
    }

    .image-placeholder small {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .image-placeholder {
        font-size: 12px;
        height: 220px;
        padding: 20px 10px;
    }

    .image-placeholder small {
        font-size: 11px;
    }
}

@keyframes float-icon {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate-bg {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Step Content */
.step-content {
    padding: 2rem 0;
}

.step-number-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.step-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #64748b;
    margin-bottom: 2rem;
}

.step-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.step-features li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 500;
    color: #374151;
}

.step-features li i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* Carousel Controls */
.carousel-control-custom {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.carousel-control-custom:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.carousel-control-prev {
    left: -25px;
}

.carousel-control-next {
    right: -25px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Carousel Animation - Improved transitions */
.carousel-item {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateX(50px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.carousel-item.active {
    position: relative;
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 2;
}

.carousel-item-prev {
    transform: translateX(-50px) scale(0.95);
}

.carousel-item-next {
    transform: translateX(50px) scale(0.95);
}

/* Enhanced slide transitions */
.carousel-item-start {
    opacity: 0;
    transform: translateX(-100px) scale(0.9);
}

.carousel-item-end {
    opacity: 0;
    transform: translateX(100px) scale(0.9);
}

/* Smooth fade for step icons */
.carousel-item .step-icon-large {
    transition: all 1.2s ease-out;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
}

.carousel-item.active .step-icon-large {
    opacity: 1;
    transform: scale(1) translateY(0);
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    60% {
        opacity: 0.8;
        transform: scale(1.02) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 992px) {
    .step-icon-large {
        max-width: 360px;      /* still full-width but slightly smaller cap */
        margin-bottom: 2rem;
    }

    .step-icon-large i {
        font-size: 3rem;
    }

    .step-title {
        font-size: 2rem;
    }

    .step-description {
        font-size: 1rem;
    }

    .carousel-control-custom {
        display: none;
    }

    .step-content {
        text-align: center;
        padding: 1rem 0;
    }
}

@media (max-width: 576px) {
    .step-icon-large {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }

    .step-icon-large i {
        font-size: 2.5rem;
    }

    .step-title {
        font-size: 1.75rem;
    }

    .step-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .step-number-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}
