/* ==========================================================================
   S25 IMD Showcase - Graduates Page Styles - CLICKABLE CARDS VERSION
   ========================================================================== */

.graduates-hero {
    background: linear-gradient(135deg, rgba(63, 83, 72, 0.8) 0%, rgba(109, 103, 81, 0.7) 50%, rgba(243, 153, 43, 0.6) 100%), url('../../images/DSC04793.jpg');
    background-size: cover;
    background-position: bottom right;
    background-attachment: fixed;
    color: var(--color-white);
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.geometric-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 30%;
    left: 70%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.graduates-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.graduates-hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.graduates-hero .highlight {
    color: var(--color-primary);
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.graduates-hero .highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.graduates-hero p {
    font-family: var(--font-body);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Filters Section
   ========================================================================== */
.graduates-filters {
    background: var(--color-white);
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border-light);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-btn {
    background: var(--color-bg-secondary);
    color: var(--color-secondary);
    border: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 153, 43, 0.3);
}

.filter-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.search-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--color-border-light);
    border-radius: 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--color-white);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(243, 153, 43, 0.1);
}

/* ==========================================================================
   Graduates Grid - UPDATED FOR 4 CARDS PER ROW (300px width)
   ========================================================================== */
.graduates-main {
    padding: 4rem 0;
    background: var(--color-bg-secondary);
    min-height: 60vh;
}

.graduates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ==========================================================================
   Graduate Cards - CLICKABLE VERSION (NO PORTFOLIO BUTTON)
   ========================================================================== */
.graduate-card {
    background: var(--color-white);
    border-radius: var(--border-radius-2xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition-slow);
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.graduate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(243, 153, 43, 0.1), transparent);
    transition: left 0.5s ease;
}

.graduate-card:hover::before {
    left: 100%;
}

.graduate-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(109, 103, 81, 0.15);
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #ffffff 0%, #f9f8f6 100%);
}

.graduate-image {
    margin-bottom: 1.25rem;
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 1.25rem auto;
    flex-shrink: 0;
}

.student-image {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    transition: all 0.4s ease;
    border: 4px solid var(--color-white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.graduate-card:hover .student-image {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(243, 153, 43, 0.3);
    border-color: var(--color-primary);
}

.placeholder-avatar {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-medium-gray));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 2.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    transition: all 0.4s ease;
    margin: 0 auto;
}

.graduate-card:hover .placeholder-avatar {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(243, 153, 43, 0.3);
}

.graduate-info {
    transition: var(--transition-normal);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

.graduate-info h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-accent);
    margin-bottom: 0.6rem;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.graduate-card:hover .graduate-info h3 {
    color: var(--color-secondary);
}

.program {
    color: var(--color-primary);
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.graduate-card:hover .program {
    color: var(--color-secondary);
}

.bio {
    color: var(--color-text-body);
    font-family: var(--font-body);
    line-height: 1.5;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.skill {
    background: var(--color-bg-secondary);
    color: var(--color-secondary);
    padding: 0.3rem 0.7rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.graduate-card:hover .skill {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-1px);
}

/* ==========================================================================
   Graduate Actions - UPDATED FOR CLICKABLE CARDS (NO PORTFOLIO BUTTON)
   ========================================================================== */
.graduate-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.75rem;
    flex-shrink: 0;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.save-contact-btn-card {
    background: linear-gradient(135deg, var(--color-primary), #e0871f);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(243, 153, 43, 0.3);
}

.save-contact-btn-card:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 20px rgba(243, 153, 43, 0.4);
    background: linear-gradient(135deg, #e0871f, var(--color-secondary));
}

.save-contact-btn-card:active {
    transform: scale(1.05);
}

.graduate-card:hover .save-contact-btn-card {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-medium-gray));
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(243, 153, 43, 0.4);
}

.graduate-card:hover .social-links a {
    animation: bounce 0.6s ease infinite alternate;
}

.graduate-card:hover .social-links a:nth-child(1) {
    animation-delay: 0.1s;
}

.graduate-card:hover .social-links a:nth-child(2) {
    animation-delay: 0.2s;
}

.graduate-card:hover .social-links a:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes bounce {
    0% {
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(-5px) scale(1.1);
    }
}

/* ==========================================================================
   Modal Styles - UPDATED Z-INDEX FOR ABOVE NAVIGATION
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--color-white);
    border-radius: 1.5rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 2;
    animation: modalSlideIn 0.4s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #34453a;
    color: var(--color-white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    font-size: 1.2rem;
}

.modal-close:hover {
    background: #4a6152;
    transform: scale(1.1);
}

.modal-body {
    padding: 3rem;
}

.modal-graduate-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-graduate-image {
    flex-shrink: 0;
}

.modal-student-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-primary);
}

.modal-placeholder-avatar {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-medium-gray));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.modal-graduate-info h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.modal-program {
    color: var(--color-primary);
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-bio {
    margin-bottom: 2rem;
}

.modal-bio h4 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-bio p {
    color: var(--color-text-body);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 1.1rem;
}

.modal-skills {
    margin-bottom: 2rem;
}

.modal-skills h4 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.modal-skill {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.modal-social {
    text-align: center;
}

.modal-social h4 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.modal-social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-medium-gray));
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.modal-social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(243, 153, 43, 0.3);
}

.modal-social-link i {
    font-size: 1.25rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    background: var(--color-white);
    color: var(--color-secondary);
    border: 2px solid var(--color-border-light);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 44px;
}

.page-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.page-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.pagination-ellipsis {
    color: var(--color-text-muted);
    padding: 0.75rem 0.5rem;
}

/* ==========================================================================
   Loading and Error States
   ========================================================================== */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    color: var(--color-text-muted);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-border-light);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    color: var(--color-text-muted);
}

.no-results h3 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    color: var(--color-text-muted);
}

.error-message h3 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1200px) {
    .graduates-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.8rem;
    }
    
    .graduate-card {
        min-height: 440px;
    }
}

@media (max-width: 768px) {
    .graduates-hero {
        padding: 6rem 0 3rem;
        background-attachment: scroll;
    }
    
    .graduates-hero h1 {
        font-size: 2.5rem;
    }
    
    .graduates-hero p {
        font-size: 1rem;
    }
    
    .graduates-filters {
        top: 70px;
        padding: 1.5rem 0;
    }
    
    .filter-controls {
        gap: 0.75rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .graduates-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .graduate-card {
        padding: 1.25rem;
        min-height: 420px;
    }
    
    .graduate-image {
        width: 100px;
        height: 100px;
    }
    
    .student-image,
    .placeholder-avatar {
        width: 100px;
        height: 100px;
    }
    
    .placeholder-avatar {
        font-size: 2rem;
    }
    
    .graduate-info h3 {
        font-size: 1.2rem;
    }
    
    .graduate-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .save-contact-btn-card {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 2rem;
    }
    
    .modal-graduate-header {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-graduate-info h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .graduates-hero h1 {
        font-size: 2rem;
    }
    
    .graduates-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .graduate-card {
        min-height: 380px;
        padding: 1rem;
    }
    
    .graduate-card:hover {
        transform: translateY(-4px);
    }
    
    .graduate-image {
        width: 90px;
        height: 90px;
    }
    
    .student-image,
    .placeholder-avatar {
        width: 90px;
        height: 90px;
    }
    
    .placeholder-avatar {
        font-size: 1.8rem;
    }
    
    .graduate-info h3 {
        font-size: 1.1rem;
    }
    
    .program {
        font-size: 0.75rem;
    }
    
    .bio {
        font-size: 0.8rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    
    .social-links a {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .save-contact-btn-card {
        width: 100%;
        border-radius: 0.75rem;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .save-contact-btn-card:hover {
        transform: translateY(-2px) scale(1.02);
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-student-image,
    .modal-placeholder-avatar {
        width: 120px;
        height: 120px;
    }
    
    .modal-placeholder-avatar {
        font-size: 2.5rem;
    }
}