/* =====================
   Education Section - Enhanced & Unique
   ===================== */
.education-section {
    position: relative;
    z-index: 10;
    padding: 120px 0;
    background: transparent;
    overflow: hidden;
}

/* Header */
.edu-header {
    text-align: center;
    margin-bottom: 3rem;
}

.edu-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.edu-highlight {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.edu-subtitle {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    letter-spacing: 0.02em;
}

/* Education Grid - Stacked vertically */
.edu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Education Card - Two parts: banner (top) + coursework (bottom) */
.edu-card {
    position: relative;
    border-radius: 24px;
    padding: 0;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: transparent;
    min-width: 0;
}

/* .edu-card::before { removed top line } */

.edu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.15);
    border: 2px solid rgba(245, 158, 11, 0.6);
}

[data-theme="dark"] .edu-card {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ========== Banner (top of card) ========== */
.edu-banner {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

/* Banner background image (Texas A&M) */
.edu-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: block;
    pointer-events: none;
}

.edu-banner-bg img,
.edu-banner-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* JNTU: gradient fallback when image fails to load */
.edu-banner--jntu .edu-banner-bg-img {
    background: linear-gradient(135deg, #8198b9 0%, #2c5282 50%, #2b6cb0 100%);
}

/* Overlay for text readability */
.edu-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.45) 50%,
        rgba(0, 0, 0, 0.75) 100%
    );
    z-index: 1;
}

[data-theme="dark"] .edu-banner-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.55) 50%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

/* Degree details on top of banner */
.edu-banner-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
}

[data-theme="dark"] .edu-card:hover {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(245, 158, 11, 0.6);
}

/* Card Top Section with Logo (inside banner) */
.edu-card-top {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.edu-logo-wrapper {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.edu-card:hover .edu-logo-wrapper {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.edu-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.edu-header-info {
    flex: 1;
    min-width: 0;
}

.edu-header-info .edu-degree,
.edu-header-info .edu-field {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Year Badge (on banner: white text) */
.edu-year {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    background: rgba(245, 158, 11, 0.95);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Degree Title (on banner) */
.edu-degree {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.4rem 0;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Field of Study (on banner: accent) */
.edu-field {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: rgba(255, 200, 100, 1);
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* University Info (on banner) */
.edu-university {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    min-height: 2.5rem;
}

.edu-university i {
    color: rgba(245, 158, 11, 1);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.edu-university span {
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
}

/* Coursework Section - Bottom of card */
.edu-coursework {
    padding: 2.5rem;
    margin: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0 0 24px 24px;
}

[data-theme="dark"] .edu-coursework {
    background: rgba(255, 255, 255, 0.06);
}

.edu-coursework-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 1rem 0;
}

.edu-coursework-title i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.edu-coursework-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.edu-course-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    background: rgba(245, 158, 11, 0.1);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    transition: all 0.3s ease;
    line-height: 1.4;
}

.edu-course-tag:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .edu-course-tag {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.25);
    color: var(--text-color);
}

[data-theme="dark"] .edu-course-tag:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.4);
}

/* Responsive - Banner size & content */
@media (max-width: 991px) {
    .edu-title {
        font-size: 2.5rem;
    }

    .edu-grid {
        gap: 2rem;
        max-width: 900px;
    }

    .edu-banner {
        height: 200px;
    }

    .edu-banner-content {
        padding: 1.5rem;
    }

    .edu-card-top {
        gap: 1.25rem;
    }

    .edu-logo-wrapper {
        width: 70px;
        height: 70px;
    }

    .edu-coursework {
        padding: 2rem;
    }
}

@media (max-width: 767px) {
    .education-section {
        padding: 80px 0;
    }

    .education-section .container {
        max-width: 100%;
    }

    .edu-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        width: 100%;
        gap: 2rem;
    }

    .edu-banner {
        height: 200px;
    }

    .edu-banner-content {
        padding: 1.25rem 1rem;
    }

    .edu-degree {
        font-size: 1.35rem;
    }

    .edu-field {
        font-size: 0.95rem;
    }

    .edu-coursework {
        padding: 1.75rem 1.25rem;
    }
}

@media (max-width: 575px) {
    .education-section {
        padding: 60px 0;
    }

    .edu-header {
        margin-bottom: 2.5rem;
    }

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

    .edu-banner {
        height: 200px;
    }

    .edu-banner-content {
        padding: 1rem;
    }

    .edu-card-top {
        flex-direction: row;
        gap: 0.75rem;
    }

    .edu-logo-wrapper {
        width: 56px;
        height: 56px;
        padding: 6px;
    }

    .edu-degree {
        font-size: 1.15rem;
    }

    .edu-field {
        font-size: 0.85rem;
    }

    .edu-university {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .edu-coursework {
        padding: 1.25rem 1rem;
    }

    .edu-coursework-title {
        font-size: 0.95rem;
    }

    .edu-coursework-list {
        gap: 0.5rem;
    }

    .edu-course-tag {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }

    /* Reduce hover lift on mobile to avoid layout shift */
    .edu-card:hover {
        transform: translateY(-4px);
    }
}