/* ========================================
   STAGE-WISE EDUCATIONAL FRAMEWORK SECTION
   Interactive cards with hover information overlay
   ======================================== */

   .educational-framework-section {
    background: linear-gradient(135deg, #5a3d6a 0%, #8b4d6f 25%, #b65e4f 50%, #d87f3f 75%, #f39c12 100%);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

/* ========== SECTION HEADER ========== */

.framework-header {
    text-align: center;
    margin-bottom: 60px;
}

.framework-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0;
    font-family: var(--font-heading);
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ========== STAGES GRID ========== */

.stages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* ========== STAGE CARD ========== */

.stage-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Card Image */
.stage-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

/* ========== DEFAULT OVERLAY (Always Visible) ========== */

.stage-card-overlay-default {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
    color: white;
    z-index: 2;
    transition: opacity 0.4s ease;
}

.stage-card:hover .stage-card-overlay-default {
    opacity: 0;
}

.stage-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    line-height: 1.2;
}

.stage-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 500;
}

/* ========== HOVER OVERLAY (Shows on Hover) ========== */

.stage-card-overlay-hover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    color: white;
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
}

.stage-card:hover .stage-card-overlay-hover {
    opacity: 1;
}

.hover-stage-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    font-family: var(--font-heading);
    line-height: 1.2;
}

.hover-stage-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
    font-weight: 500;
}

/* Information List */
.stage-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.stage-info-item {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 15px;
    padding-left: 0;
    position: relative;
    text-align: center;
    animation: fadeInUp 0.5s ease backwards;
}

.stage-info-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stage-info-item:nth-child(2) {
    animation-delay: 0.2s;
}

.stage-info-item:nth-child(3) {
    animation-delay: 0.3s;
}

.stage-info-item:last-child {
    margin-bottom: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVE DESIGN ========== */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .framework-title {
        font-size: 3.25rem;
    }
    
    .stages-grid {
        gap: 30px;
    }
    
    .stage-title {
        font-size: 1.9rem;
    }
    
    .hover-stage-title {
        font-size: 2rem;
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .stage-card-overlay-default {
        padding: 25px 20px;
    }
    
    .stage-title {
        font-size: 1.6rem;
    }
    
    .stage-subtitle {
        font-size: 1.05rem;
    }
    
    .hover-stage-title {
        font-size: 1.75rem;
    }
    
    .stage-info-item {
        font-size: 1rem;
    }
}

/* Laptop/Tablet Landscape (992px - 1199px) */
@media (max-width: 1199px) {
    .educational-framework-section {
        padding: 70px 0;
    }
    
    .framework-header {
        margin-bottom: 50px;
    }
    
    .framework-title {
        font-size: 2.75rem;
    }
    
    .stages-grid {
        gap: 20px;
    }
    
    .stage-card-overlay-default {
        padding: 20px 18px;
    }
    
    .stage-card-overlay-hover {
        padding: 30px 25px;
    }
    
    .stage-title {
        font-size: 1.5rem;
    }
    
    .stage-subtitle {
        font-size: 1rem;
    }
    
    .hover-stage-title {
        font-size: 1.6rem;
    }
    
    .hover-stage-subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .stage-info-item {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) {
    .educational-framework-section {
        padding: 60px 0;
    }
    
    .framework-header {
        margin-bottom: 40px;
    }
    
    .framework-title {
        font-size: 2.5rem;
    }
    
    /* 2 columns on tablet */
    .stages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stage-card {
        aspect-ratio: 4 / 5;
    }
    
    .stage-card-overlay-default {
        padding: 25px 22px;
    }
    
    .stage-card-overlay-hover {
        padding: 30px 25px;
    }
    
    .stage-title {
        font-size: 1.65rem;
    }
    
    .stage-subtitle {
        font-size: 1.05rem;
    }
    
    .hover-stage-title {
        font-size: 1.7rem;
    }
    
    .hover-stage-subtitle {
        font-size: 1.02rem;
    }
    
    .stage-info-item {
        font-size: 1rem;
    }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 767px) {
    .educational-framework-section {
        padding: 50px 0;
    }
    
    .framework-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .stages-grid {
        gap: 18px;
    }
    
    .stage-card-overlay-default {
        padding: 20px 18px;
    }
    
    .stage-card-overlay-hover {
        padding: 25px 20px;
    }
    
    .stage-title {
        font-size: 1.5rem;
    }
    
    .stage-subtitle {
        font-size: 1rem;
    }
    
    .hover-stage-title {
        font-size: 1.55rem;
    }
    
    .hover-stage-subtitle {
        font-size: 0.98rem;
        margin-bottom: 18px;
    }
    
    .stage-info-item {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
}

/* Small Mobile (< 576px) */
@media (max-width: 575px) {
    .educational-framework-section {
        padding: 40px 0;
    }
    
    .framework-header {
        margin-bottom: 30px;
    }
    
    .framework-title {
        font-size: 1.75rem;
    }
    
    /* Single column on small mobile */
    .stages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .stage-card {
        aspect-ratio: 4 / 5;
    }
    
    .stage-card-overlay-default {
        padding: 22px 20px;
    }
    
    .stage-card-overlay-hover {
        padding: 28px 22px;
    }
    
    .stage-title {
        font-size: 1.6rem;
    }
    
    .stage-subtitle {
        font-size: 1.05rem;
    }
    
    .hover-stage-title {
        font-size: 1.65rem;
    }
    
    .hover-stage-subtitle {
        font-size: 1rem;
    }
    
    .stage-info-item {
        font-size: 1rem;
    }
}

/* Extra Small Mobile (< 400px) */
@media (max-width: 399px) {
    .framework-title {
        font-size: 1.5rem;
    }
    
    .stage-title {
        font-size: 1.45rem;
    }
    
    .stage-subtitle {
        font-size: 1rem;
    }
    
    .hover-stage-title {
        font-size: 1.5rem;
    }
    
    .stage-info-item {
        font-size: 0.95rem;
    }
}

/* ========== ACCESSIBILITY ========== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .stage-card,
    .stage-card-image,
    .stage-card-overlay-default,
    .stage-card-overlay-hover,
    .stage-info-item {
        animation: none !important;
        transition: none;
    }
}

/* Focus states for keyboard navigation */
.stage-card:focus {
    outline: 3px solid #f39c12;
    outline-offset: 3px;
}

.stage-card:focus .stage-card-overlay-hover {
    opacity: 1;
}

.stage-card:focus .stage-card-overlay-default {
    opacity: 0;
}

/* ========== PRINT STYLES ========== */
@media print {
    .educational-framework-section {
        background: white;
        padding: 40px 0;
    }
    
    .framework-title {
        color: #2d2d2d;
        text-shadow: none;
    }
    
    .stages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stage-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .stage-card-overlay-hover {
        display: none;
    }
    
    .stage-card-overlay-default {
        opacity: 1 !important;
    }
}