/* Alumni page — scoped styles (no global overrides) */
.page-alumni {
    --alumni-primary: #0D2C54; /* Deep Blue */
    --alumni-secondary: #1A5276; /* Medium Blue */
    --alumni-accent: #FFC107; /* Bright Gold */
    --alumni-light-gold: #FFD700; /* Lighter Gold for subtle effects */
    --alumni-text: #333;
    --alumni-bg: #f0f2f5; /* Softer light grey */
    --alumni-white: #ffffff;
    --card-bg-1: linear-gradient(135deg, #e0f2f7, #c6e6ee); /* Brighter Light Blue */
    --card-bg-2: linear-gradient(135deg, #fff3e0, #ffe7c6); /* Brighter Light Orange */
    --card-bg-3: linear-gradient(135deg, #e0ffe0, #c6efc6); /* Brighter Light Green */
    --card-bg-4: linear-gradient(135deg, #f7e0ef, #eec6e0); /* Brighter Light Pink */
    --card-bg-5: linear-gradient(135deg, #eaf2ff, #d2e4ff); /* Softer Light Purple */
}

/* Google Fonts - Poppins & Playfair Display for elegance */
    body.page-alumni {
    background-color: var(--alumni-bg, #f0f2f5);
}

/* Hero Section - Compact and Impactful */
    .alumni-hero {
        padding: 80px 20px;
        text-align: center;
        background: linear-gradient(rgba(13, 44, 84, 0.98), rgba(13, 44, 84, 0.9)), url('https://i.ibb.co/68S4Lp0/principal-image.png') no-repeat center center/cover;
        background-position: center bottom;
        color: #fff;
        position: relative;
        overflow: hidden;
        border-bottom: 8px solid var(--alumni-accent, #FFC107);
        min-height: 350px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .alumni-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, transparent 1px, rgba(255, 255, 255, 0.08) 1px);
        background-size: 100px 100px;
        animation: twinkle 60s linear infinite;
        opacity: 0.9;
        z-index: 0;
    }
    @keyframes twinkle {
        from { background-position: 0 0; }
        to { background-position: 1000px 1000px; }
    }

    .alumni-hero h1 {
        font-family: 'Playfair Display', serif; /* Luxury font */
        font-size: 4.5rem;
        font-weight: 700;
        margin: 0 0 15px 0;
        text-shadow: 4px 4px 15px rgba(0,0,0,0.7);
        position: relative;
        z-index: 1;
        background: linear-gradient(to right, #fff, var(--alumni-accent, #FFC107));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    .alumni-hero p {
        font-family: 'Poppins', sans-serif; /* Clean font */
        font-size: 1.5rem;
        color: rgba(255,255,255,0.95);
        max-width: 800px;
        margin: 0 auto 30px auto;
        position: relative;
        z-index: 1;
        font-weight: 300;
    }
    .register-cta-btn {
        background-color: var(--alumni-accent, #FFC107);
        color: var(--alumni-primary, #0D2C54);
        padding: 15px 35px;
        text-decoration: none;
        font-size: 1.2rem;
        font-weight: 700;
        border-radius: 50px;
        transition: all 0.4s ease;
        box-shadow: 0 6px 25px rgba(255, 193, 7, 0.5);
        display: inline-block;
        position: relative;
        overflow: hidden;
        z-index: 1;
    }
    .register-cta-btn::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.3);
        transform: skewX(-20deg);
        transition: all 0.7s ease;
    }
    .register-cta-btn:hover {
        background-color: #fff;
        transform: translateY(-7px) scale(1.02);
        box-shadow: 0 10px 30px rgba(255, 193, 7, 0.8);
        color: var(--alumni-primary, #0D2C54);
    }
    .register-cta-btn:hover::after {
        left: 100%;
    }

    /* Alumni Grid Section */
    .alumni-grid-section {
        padding: 60px 20px;
        background-color: var(--alumni-white, #fff);
        position: relative;
    }

    .alumni-cards-wrapper {
        max-width: 1200px;
        margin: 0 auto;
        padding-top: 75px; /* Add padding here to account for the overlapping image */
        position: relative;
    }

    .alumni-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 30px;
    }

    .alumni-card {
        border-radius: 15px;
        /* Multiple shadows for a pronounced lifted/3D effect */
        box-shadow: 0 5px 15px rgba(0,0,0,0.1), /* Base shadow */
                    0 15px 40px rgba(0,0,0,0.1); /* Lifted shadow */
        transition: transform 0.4s ease, box-shadow 0.4s ease;
        border: none; /* No explicit border */
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 20px;
        text-align: center;
        cursor: pointer;
        position: relative;
        overflow: visible; /* Crucial for image to pop out */
    }
    /* Dynamic background colors using nth-child for variety */
    .alumni-card:nth-child(5n+1) { background: var(--card-bg-1); }
    .alumni-card:nth-child(5n+2) { background: var(--card-bg-2); }
    .alumni-card:nth-child(5n+3) { background: var(--card-bg-3); }
    .alumni-card:nth-child(5n+4) { background: var(--card-bg-4); }
    .alumni-card:nth-child(5n+5) { background: var(--card-bg-5); }


    .alumni-card:hover {
        transform: translateY(-15px) scale(1.03); /* More pronounced lift and scale */
        box-shadow: 0 10px 25px rgba(0,0,0,0.15), /* Closer shadow */
                    0 25px 60px rgba(13, 44, 84, 0.4); /* Stronger, blue-tinted lift shadow */
    }

    .alumni-card-img-container {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        /* बॉर्डर हटा दिया गया है */
        background-color: var(--alumni-white, #fff); /* Ensures white background behind image if it doesn't fill */
        /* Advanced box-shadow for a luminous/halo effect */
        box-shadow: 
            inset 0 0 15px rgba(255, 193, 7, 0.6), /* Inner glow - more intense accent color */
            0 0 0 6px rgba(255, 255, 255, 0.8), /* White ring for shimmer */
            0 0 0 12px rgba(13, 44, 84, 0.4), /* Outer glow - primary color (softer) */
            0 5px 25px rgba(0,0,0,0.3); /* Stronger image shadow */
        z-index: 10;
        
        position: absolute;
        top: -75px; /* Half of image height to place it above the card */
        left: 50%;
        transform: translateX(-50%);
        
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden; /* Keep hidden to maintain circular shape */
    }
    .alumni-card-img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* IMPORTANT: Fills the container, may crop parts of image but no empty space */
        display: block;
        transition: transform 0.5s ease; /* Added transition for smooth zoom */
    }
    .alumni-card:hover .alumni-card-img {
        transform: scale(1.1); /* Zoom in on hover */
    }

    .alumni-card-content {
        padding: 15px 25px;
        width: 100%;
        box-sizing: border-box;
        margin-top: 75px; /* Offset for the overlapping image above */
    }

    .alumni-card h3 {
        font-family: 'Playfair Display', serif; /* Luxury font */
        font-size: 1.8rem;
        /* Gradient text for name */
        background: linear-gradient(to right, var(--alumni-primary, #0D2C54), var(--alumni-secondary, #1A5276));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin: 10px 0 5px 0;
        font-weight: 700;
        line-height: 1.2;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.2); /* Stronger text shadow for more depth */
    }
    .alumni-card p.batch {
        font-family: 'Poppins', sans-serif; /* Clean font */
        font-size: 0.95rem;
        color: #777;
        margin-bottom: 10px;
        font-style: italic;
    }
    .alumni-card p.profession {
        font-family: 'Poppins', sans-serif; /* Clean font */
        font-size: 1.2rem;
        color: var(--alumni-secondary, #1A5276);
        font-weight: 600;
        margin-bottom: 15px;
        padding: 5px 10px;
        background-color: rgba(255, 193, 7, 0.25); /* Stronger highlight for profession */
        border-radius: 5px;
        display: inline-block;
        text-transform: capitalize;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Stronger shadow for profession box */
    }
    .alumni-card p.message-snippet {
        font-family: 'Poppins', sans-serif; /* Clean font */
        font-size: 1rem;
        color: #555;
        font-style: italic;
        line-height: 1.6;
        margin: 0;
        padding-top: 15px;
        border-top: 1px dashed rgba(0,0,0,0.3); /* Stronger dashed line */
        margin-bottom: 15px;
        min-height: 48px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .alumni-card .read-more-btn {
        background-color: var(--alumni-secondary, #1A5276);
        color: var(--alumni-white, #fff);
        padding: 10px 20px;
        border-radius: 25px;
        text-decoration: none;
        font-size: 1rem;
        font-weight: 600;
        transition: all 0.3s ease;
        display: inline-block;
        border: none;
        cursor: pointer;
        box-shadow: 0 5px 18px rgba(0,0,0,0.35); /* Stronger button shadow */
    }
    .alumni-card .read-more-btn:hover {
        background-color: var(--alumni-primary, #0D2C54);
        transform: translateY(-4px); /* More lift on hover */
        box-shadow: 0 10px 25px rgba(0,0,0,0.5); /* Stronger hover shadow */
    }

    /* Modal (Popup) Styles - Adjusted for better size and look */
    .alumni-modal {
        display: none; /* IMPORTANT: Ensures modal is hidden by default */
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0,0,0,0.95); /* Even darker overlay */
        animation: fadeIn 0.3s ease-out;
        backdrop-filter: blur(18px); /* More blur */
        -webkit-backdrop-filter: blur(18px);
        align-items: center; /* Initial alignment for flex */
        justify-content: center; /* Initial alignment for flex */
    }
    /* NEW: Class to show the modal with flex display */
    .alumni-modal.show {
        display: flex; /* Only show with flex when this class is added by JS */
    }

    .modal-content {
        background: linear-gradient(to bottom right, var(--alumni-white, #fff) 0%, #f8f8f8 100%);
        padding: 45px;
        border-radius: 20px;
        text-align: center;
        position: relative;
        animation: slideInPop 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        box-shadow: 0 30px 80px rgba(0,0,0,0.9); /* Even stronger shadow */
        max-width: 650px;
        width: 90%;
        border: 4px solid var(--alumni-accent, #FFC107); /* Thicker accent border */
        overflow: hidden;
    }

    /* Congratulatory Ribbon Banner (same as before, good design) */
    .modal-content::before {
        content: 'सरस्वती विद्या मंदिर को आप पर गर्व है!';
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%) rotate(-5deg);
        background-color: var(--alumni-accent, #FFC107);
        color: var(--alumni-primary, #0D2C54);
        padding: 8px 30px;
        border-radius: 5px;
        font-weight: 700;
        font-size: 1.1rem;
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
        z-index: 1;
        white-space: nowrap;
        animation: dropIn 0.8s ease-out;
    }

    .modal-close {
        color: var(--alumni-secondary, #1A5276);
        position: absolute;
        top: 20px;
        right: 25px;
        font-size: 38px;
        font-weight: normal;
        cursor: pointer;
        transition: color 0.3s ease, transform 0.3s ease;
        z-index: 2;
    }
    .modal-close:hover,
    .modal-close:focus {
        color: var(--alumni-primary, #0D2C54);
        transform: rotate(90deg);
    }
    .modal-img {
        width: 160px;
        height: 160px;
        border-radius: 50%;
        /* बॉर्डर हटा दिया गया है */
        background-color: var(--alumni-white, #fff);
        /* Subtle glow/halo effect (same as card) */
        box-shadow: 
            inset 0 0 15px rgba(255, 193, 7, 0.6), /* Inner glow - more intense accent color */
            0 0 0 6px rgba(255, 255, 255, 0.8), /* White ring for shimmer */
            0 0 0 12px rgba(13, 44, 84, 0.4), /* Outer glow - primary color (softer) */
            0 8px 25px rgba(0,0,0,0.3); /* Stronger overall image shadow */
        transition: transform 0.3s ease;
        object-fit: cover; /* Use cover for modal image too, for consistency */
    }
    .modal-img:hover {
        transform: scale(1.03);
    }
    .modal-name {
        font-family: 'Playfair Display', serif; /* Luxury font */
        font-size: 3rem;
        color: var(--alumni-primary, #0D2C54);
        margin: 0 0 8px 0;
        font-weight: 700;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    .modal-name .star-icon {
        font-size: 1.8rem;
        color: var(--alumni-accent, #FFC107);
        animation: pulseStar 1.5s infinite alternate;
    }
    @keyframes pulseStar {
        from { transform: scale(1); opacity: 0.8; }
        to { transform: scale(1.1); opacity: 1; }
    }
    .modal-batch {
        font-family: 'Poppins', sans-serif; /* Clean font */
        font-size: 1.1rem;
        color: #777;
        margin-top: 5px;
        margin-bottom: 20px;
        font-style: italic;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }
    .modal-profession {
        font-family: 'Poppins', sans-serif; /* Clean font */
        font-size: 1.8rem;
        color: var(--alumni-secondary, #1A5276);
        margin-bottom: 30px;
        font-weight: 600;
        text-transform: capitalize;
        letter-spacing: 1px;
        padding: 8px 15px;
        background-color: rgba(255, 193, 7, 0.18);
        border-radius: 8px;
        display: inline-block;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    .modal-message {
        font-family: 'Poppins', sans-serif; /* Clean font */
        font-style: italic;
        color: #444;
        padding-top: 25px;
        font-size: 1.1rem;
        line-height: 1.8;
        position: relative;
        background-color: var(--alumni-white, #fff);
        border-radius: 12px;
        padding: 30px 25px 15px 25px;
        box-shadow: inset 0 0 10px rgba(0,0,0,0.04);
    }
    .modal-message::before {
        content: '“';
        font-family: 'Playfair Display', serif; /* Luxury font for quotes */
        font-size: 5em;
        color: var(--alumni-light-gold, #FFD700);
        position: absolute;
        left: 5px;
        top: -20px;
        opacity: 0.6;
        z-index: 0;
    }
    .modal-message::after {
        content: '”';
        font-family: 'Playfair Display', serif; /* Luxury font for quotes */
        font-size: 5em;
        color: var(--alumni-light-gold, #FFD700);
        position: absolute;
        right: 5px;
        bottom: -50px;
        opacity: 0.6;
        z-index: 0;
    }
    .modal-message p {
        position: relative;
        z-index: 1;
        margin: 0;
        padding: 0;
    }
    .message-author {
        font-family: 'Poppins', sans-serif; /* Clean font */
        display: block;
        text-align: right;
        margin-top: 15px;
        font-size: 0.9rem;
        color: var(--alumni-secondary, #1A5276);
        font-weight: 600;
        position: relative;
        z-index: 1;
    }


    /* Keyframe Animations */
    @keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
    @keyframes slideInPop {
        0% { transform: translateY(-100px) scale(0.8); opacity: 0; }
        60% { transform: translateY(10px) scale(1.02); opacity: 1; }
        100% { transform: translateY(0) scale(1); }
    }
    @keyframes dropIn {
        0% { transform: translateX(-50%) translateY(-100px) rotate(-5deg); opacity: 0; }
        100% { transform: translateX(-50%) translateY(0) rotate(-5deg); opacity: 1; }
    }


    /* Responsive adjustments */
    @media (max-width: 992px) {
        .alumni-hero h1 { font-size: 3.5rem; }
        .alumni-hero p { font-size: 1.3rem; }
        .alumni-cards-wrapper { padding-top: 65px; } /* Adjust for smaller images */
        .alumni-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; }
        .alumni-card-img-container { width: 130px; height: 130px; top: -65px; }
        .alumni-card-content { margin-top: 65px; }
        .alumni-card h3 { font-size: 1.6rem; }
        .alumni-card p.profession { font-size: 1.1rem; }
        .alumni-card p.message-snippet { font-size: 0.9rem; margin-bottom: 10px; }
        .read-more-btn { padding: 6px 12px; font-size: 0.8rem; }
        .modal-content { padding: 30px; max-width: 550px; }
        .modal-name { font-size: 2.5rem; }
        .modal-profession { font-size: 1.6rem; }
        .modal-img { width: 140px; height: 140px; }
        .modal-message { font-size: 1rem; }
        .modal-message::before, .modal-message::after { font-size: 4em; }
    }

    @media (max-width: 768px) {
        .alumni-hero { padding: 60px 15px; min-height: 300px; }
        .alumni-hero h1 { font-size: 2.8rem; }
        .alumni-hero p { font-size: 1.1rem; margin-bottom: 20px; }
        .register-cta-btn { padding: 12px 25px; font-size: 1rem; }
        .alumni-cards-wrapper { padding-top: 50px; } /* Adjust for mobile images to reduce overlap */
        .alumni-grid { grid-template-columns: 1fr; gap: 30px; } /* Single column on mobile for better display, increased gap */
        .alumni-card { padding-bottom: 15px; }
        .alumni-card-img-container { width: 100px; height: 100px; top: -45px; } /* Smaller image, less top overlap */
        .alumni-card-content { margin-top: 45px; } /* Adjusted content margin */
        .alumni-card h3 { font-size: 1.5rem; }
        .alumni-card p.profession { font-size: 1rem; }
        .alumni-card p.message-snippet { font-size: 0.9rem; margin-bottom: 10px; }
        .read-more-btn { padding: 5px 10px; font-size: 0.8rem; }
        .modal-content { padding: 25px; margin: 5% auto; width: 95%; border-width: 1px; }
        .modal-content::before {
            padding: 5px 15px;
            font-size: 0.8rem;
            top: 10px;
            transform: translateX(-50%) rotate(0deg);
        }
        .modal-close { font-size: 30px; top: 10px; right: 15px; }
        .modal-img { width: 100px; height: 100px; margin-bottom: 15px;}
        .modal-name { font-size: 2rem; flex-direction: column; gap: 5px;}
        .modal-name .star-icon { font-size: 1.3rem; }
        .modal-batch { font-size: 1rem; margin-bottom: 10px;}
        .modal-profession { font-size: 1.3rem; margin-bottom: 20px;}
        .modal-message { font-size: 0.95rem; line-height: 1.5; padding: 25px 15px 10px 15px;}
        .modal-message::before, .modal-message::after { font-size: 3.5em; left: 0; right: 0;}
        .modal-message::after { bottom: -35px; }
    }

    @media (max-width: 480px) {
        .alumni-hero h1 { font-size: 2.2rem; }
        .alumni-hero p { font-size: 0.9rem; }
        .register-cta-btn { font-size: 0.9rem; padding: 10px 20px; }
        .alumni-cards-wrapper { padding-top: 40px; } /* Adjust for smallest screens */
        .alumni-card-img-container { width: 80px; height: 80px; top: -35px; } /* Smallest image size */
        .alumni-card-content { margin-top: 35px; }
    }

.alumni-empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    padding: 40px 20px;
}