/* Popup Styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.popup-overlay.active {
    display: flex;
}

.popup-content {
    background: linear-gradient(135deg, #1c324f 0%, #2d4a6f 100%);
    border-radius: 15px;
    padding: 40px;
    max-width: 550px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.4s ease-out;
    border: 3px solid #d4af37;
}

.popup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.popup-section {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.convocation-section {
    border-right: none;
}

.phd-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.phd-text {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
    margin: 20px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.phd-button {
    text-decoration: none;
    display: block;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: #ffffff;
    cursor: pointer;
    background: none;
    border: none;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.popup-icon {
    text-align: center;
    margin-bottom: 20px;
}

.popup-icon i {
    font-size: 64px;
    color: #d4af37;
    animation: bounce 2s infinite;
}

.popup-title {
    color: #d4af37;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-message {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 15px;
}

.popup-message .university-highlight {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 28px !important;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
    letter-spacing: 1.5px;
    display: block;
    line-height: 1.3;
}

.popup-details {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #d4af37;
}

.popup-detail-item {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.popup-detail-item:last-child {
    margin-bottom: 0;
}

.popup-detail-item i {
    color: #d4af37;
    margin-right: 12px;
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.popup-button {
    background-color: #d4af37;
    color: #1c324f;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 25px;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-button:hover {
    background-color: #c29d2f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .popup-content {
        padding: 20px 15px;
        max-width: 90%;
    }

    .popup-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .popup-section {
        padding: 15px;
    }

    .convocation-section {
        border-right: none;
        border-bottom: 2px solid rgba(212, 175, 55, 0.3);
        padding-bottom: 15px;
    }

    .popup-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .popup-message {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .popup-message .university-highlight {
        font-size: 18px !important;
    }

    .popup-details {
        padding: 15px;
        margin-top: 12px;
    }

    .popup-detail-item {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .popup-detail-item i {
        font-size: 16px;
        width: 20px;
        margin-right: 10px;
    }

    .popup-icon {
        margin-bottom: 12px;
    }

    .popup-icon i {
        font-size: 40px;
    }

    .popup-button {
        padding: 10px 20px;
        font-size: 14px;
        margin-top: 15px;
    }

    .phd-text {
        font-size: 14px;
        margin: 15px 0;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .phd-section {
        min-height: auto;
        align-items: center;
        text-align: center;
        justify-content: center;
    }

    .phd-button {
        width: 80% !important;
        max-width: 300px !important;
        margin: 15px auto 0 auto !important;
        display: block !important;
    }

    .popup-close {
        top: 10px;
        right: 15px;
        font-size: 28px;
        width: 35px;
        height: 35px;
    }
}

/* Extra adjustments for smaller mobile devices */
@media (max-width: 480px) {
    .popup-content {
        padding: 15px 10px;
    }

    .popup-section {
        padding: 12px;
    }

    .popup-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .popup-message .university-highlight {
        font-size: 16px !important;
    }

    .phd-text {
        font-size: 13px;
        margin: 12px 0;
        line-height: 1.4;
    }

    .popup-icon i {
        font-size: 36px;
    }

    .popup-button {
        padding: 8px 16px;
        font-size: 13px;
        margin-top: 12px;
    }

    .popup-detail-item {
        font-size: 12px;
    }

    .popup-details {
        padding: 12px;
    }

    .phd-button {
        width: 70% !important;
        max-width: 250px !important;
        margin: 12px auto 0 auto !important;
        display: block !important;
    }
}
