@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0056b3;
    --primary-dark: #003d7a;
    --primary-light: #4a90e2;
    --accent: #00a8ff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f0f7ff;
    --bg-white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 150, 0.1);
    --shadow-lg: 0 15px 30px rgba(0, 0, 150, 0.15);
    --gradient-blue: linear-gradient(135deg, #0056b3 0%, #00a8ff 100%);
    --blue: var(--primary);
    --orange: #ff7d59;
    --red: #ff5a5a;
    --gold: #b8a62d;
    --purple: #9d6dff;
    --teal: #20c997;
}

/* Beautiful and unique background design */
.programs-container {
    padding: 0;
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center vertically */
    align-items: center;
    background-image: none;
}

/* Create stunning animated gradient background */
.programs-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(0, 168, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(0, 86, 179, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(74, 144, 226, 0.05) 0%, transparent 40%);
    animation: rotateBackground 60s linear infinite;
    z-index: -2;
}

@keyframes rotateBackground {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.programs-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(240, 247, 255, 0.97) 0%, rgba(240, 247, 255, 0.85) 100%);
    z-index: -1;
}

/* Decorative elements */
.bg-decoration {
    position: absolute;
    pointer-events: none;
    z-index: -1;
}

.circle-1 {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.03) 0%, rgba(0, 168, 255, 0.06) 100%);
    top: 5%;
    right: -100px;
    animation: floatCircle 20s ease-in-out infinite;
}

.circle-2 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    border: 2px solid rgba(0, 86, 179, 0.04);
    bottom: -150px;
    left: -100px;
    animation: floatCircle 25s ease-in-out infinite reverse;
}

.wave-1 {
    width: 100%;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath fill='rgba(0, 86, 179, 0.03)' d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    top: 10%;
    left: 0;
    animation: waveMotion 25s linear infinite;
}

.wave-2 {
    width: 100%;
    height: 150px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath fill='rgba(0, 168, 255, 0.04)' d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' opacity='.25'%3E%3C/path%3E%3Cpath fill='rgba(0, 168, 255, 0.03)' d='M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z' opacity='.5'%3E%3C/path%3E%3Cpath fill='rgba(0, 168, 255, 0.02)' d='M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z' opacity='.75'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    bottom: 0;
    left: 0;
    animation: waveMotion 20s linear infinite reverse;
}

@keyframes floatCircle {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes waveMotion {
    0% {
        background-position-x: 0%;
    }
    100% {
        background-position-x: 100%;
    }
}

/* Enhanced header styles */
.programs-header {
    text-align: center;
    margin: 0 auto 5rem;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 5;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Subtitle styles */
.programs-subtitle {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    position: relative;
    padding: 0.8rem 2rem;
    display: inline-block;
    background: rgba(0, 86, 179, 0.1);
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    animation: pulseSubtitle 3s infinite alternate ease-in-out;
}

@keyframes pulseSubtitle {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Title styles */
.programs-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 1rem 0 2rem;
    position: relative;
    display: inline-block;
    text-shadow: none;
    letter-spacing: -0.5px;
}

.programs-title::after {
    content: '';
    width: 120px;
    height: 6px;
    background: var(--gradient-blue);
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.3);
}

/* Enhanced grid with better spacing */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
    max-width: 1300px;
    width: 100%;
    position: relative;
    perspective: 1000px;
    margin-top: 2rem;
    margin-bottom: 5rem;
    box-sizing: border-box;
    padding-left: 8px;
    padding-right: 8px;
}

/* Make cards show only images clearly */
.program-card {
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 280px;
    padding: 0;
    clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
    color: white;
    transform-origin: center;
    will-change: transform, box-shadow;
    z-index: 1;
    transform-style: preserve-3d;
    background: transparent;
    cursor: pointer;
}

.program-card:hover {
    transform: translateY(-15px) scale(1.03) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

/* Make card images fully visible */
.card-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    z-index: 0;
    filter: brightness(1) contrast(1.1);
    transition: all 0.5s ease;
}

/* Remove dark overlay for better image visibility */
.program-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    opacity: 1;
    z-index: 1;
    pointer-events: none;
}

/* Add visible title to cards */
.card-title {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 60px;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    z-index: 3;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--accent);
}

.program-card:hover .card-title {
    transform: translateY(-10px);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Hide content by default, will show in popup only */
.program-content {
    display: none;
}

/* Enhanced 3D icon styling */
.program-icon-wrapper {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    z-index: 3;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 -5px 10px rgba(0, 0, 0, 0.05);
    transform-style: preserve-3d;
    transform: perspective(800px) translateZ(10px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.program-card:hover .program-icon-wrapper {
    transform: perspective(800px) translateZ(30px) scale(1.2) rotateY(15deg);
    box-shadow: 
        10px 15px 25px rgba(0, 0, 0, 0.3),
        0 5px 10px rgba(0, 0, 0, 0.1),
        inset 0 -5px 10px rgba(0, 0, 0, 0.05);
}

.program-icon {
    font-size: 2.2rem;
    color: var(--primary);
    transform: translateZ(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.program-card:hover .program-icon {
    transform: translateZ(40px) scale(1.2) rotate(-10deg);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.2));
    color: var(--accent);
}

/* Make hover effects work with new layout */
.program-card:hover .card-bg-image {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.15);
}

/* Add a visual hint that cards are clickable */
.program-card::before {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M12 16l-6-6h12z' fill='%230056b3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.program-card:hover::before {
    opacity: 1;
    transform: translateY(0);
}

/* Popup/Modal styles */
.program-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.program-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--bg-white);
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.4s ease;
}

.program-popup.active .popup-content {
    transform: translateY(0);
    opacity: 1;
}

.popup-header {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.popup-header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
}

.popup-title {
    position: absolute;
    bottom: 20px;
    left: 25px;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    backdrop-filter: blur(5px);
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.popup-body {
    padding: 30px;
}

.popup-description {
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--text-dark);
}

.popup-details {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.popup-detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.popup-detail-item:last-child {
    margin-bottom: 0;
}

.popup-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    flex-shrink: 0;
}

.popup-detail-text {
    flex: 1;
}

.popup-detail-title {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 3px;
}

.popup-detail-value {
    color: var(--text-light);
    font-size: 0.9rem;
}

.popup-action {
    text-align: right;
}

.popup-button {
    display: inline-block;
    padding: 12px 25px;
    background: var(--gradient-blue);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.3);
}

.popup-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.4);
}

/* Responsive styles for popup */
@media (max-width: 767px) {
    .popup-header {
        height: 180px;
    }
    
    .popup-title {
        font-size: 1.6rem;
    }
    
    .popup-body {
        padding: 20px;
    }
}

/* Improved responsive adjustments */
@media (max-width: 1200px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .programs-title {
        font-size: 2.5rem;
    }
}

/* Show 2 cards per row for screens up to 1024px */
@media (max-width: 1024px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
        gap: 1.5rem;
    }
}

/* Improved responsive adjustments for smaller screens */
@media (max-width: 992px) {
    .programs-container {
        padding: 2rem 1.5rem;
    }
    
    .program-card {
        min-height: 140px;
    }
    
    .program-icon-wrapper {
        width: 90px;
        height: 90px;
    }
    
    .program-icon {
        font-size: 2rem;
    }
    
    .program-title {
        font-size: 1.6rem;
    }

    .circle-1, .circle-2 {
        opacity: 0.5;
        transform: scale(0.7);
    }
}

/* Show 2 cards per row for screens up to 847px */
@media (max-width: 847px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100vw;
        gap: 1rem;
    }
}

/* Show 2 cards per row for screens up to 767px */
@media (max-width: 767px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
    }
    
    .programs-title {
        font-size: 2.2rem;
    }
    
    .programs-header {
        padding: 2rem 1rem;
        margin-bottom: 3rem;
    }
    
    .program-card {
        clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%);
        padding-right: 20px;
        min-height: 200px;
    }
    
    .program-icon-wrapper {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .program-card::before {
        width: 35px;
        height: 35px;
        background-size: 18px;
    }

    .wave-1, .wave-2 {
        height: 70px;
    }
}

/* Responsive: 2 cards per row for most mobile screens */
@media (max-width: 480px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100vw;
        gap: 0.75rem;
        padding-left: 4px;
        padding-right: 4px;
    }
    .program-card {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Responsive: 1 card per row for very small screens */
@media (max-width: 400px) {
    .programs-grid {
        grid-template-columns: 1fr;
    }
}

/* Show 1 card per row for screens up to 480px */
@media (max-width: 480px) {
    .programs-container {
        padding: 4rem 1rem;
    }
    
    .programs-header {
        margin-bottom: 3rem;
    }
    
    .programs-title {
        font-size: 1.8rem;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }
    
    .program-card {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px 30px;
        clip-path: polygon(0 0, 100% 0, 95% 92%, 0% 100%);
        min-height: 180px;
    }
    
    .program-icon-wrapper {
        margin: 0 auto 20px;
        width: 45px;
        height: 45px;
    }
    
    .program-card::before {
        width: 35px;
        height: 35px;
        background-size: 18px;
    }
    
    .bg-decoration {
        opacity: 0.3;
    }

    .programs-grid {
        grid-template-columns: 1fr;
        max-width: 100vw;
        gap: 1rem;
    }
}

/* Prevent horizontal scroll on body for mobile */
body {
    overflow-x: hidden;
}

/* NEW: Add shine effect on card */
.shine-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(0, 168, 255, 0.05) 25%, 
        rgba(0, 168, 255, 0.1) 50%,
        rgba(0, 168, 255, 0.05) 75%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    z-index: 3;
    pointer-events: none;
}

.program-card:hover .shine-effect {
    transform: translateX(100%);
}

/* Add floating particles to background */
.programs-container .particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-light);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

.programs-container .particle:nth-child(odd) {
    background: var(--accent);
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

/* Read More button styling */
.read-more-btn {
    position: absolute;
    bottom: 70px;
    left: 20px;
    padding: 8px 18px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
}

.program-card:hover .read-more-btn {
    opacity: 1;
    transform: translateY(0);
}

.read-more-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Enhanced circular popup styling with 3D effects */
.circular-popup {
    background: #fff;
    width: 400px !important;
    height: 400px;
    border-radius: 50% !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px !important;
    box-sizing: border-box;
    transform: scale(0.7) rotate(-10deg) translateY(-50px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        0 0 0 15px rgba(255, 255, 255, 0.05);
    max-width: 90vw !important;
    margin: 0 auto;
    position: relative;
    z-index: 100;
    perspective: 1000px;
    transform-style: preserve-3d;
    background-image: 
        linear-gradient(120deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,1) 100%);
}

/* Content layout */
.circular-popup .popup-inner {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transform-style: preserve-3d;
}

/* Circular icon */
.circular-popup .circular-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 2rem;
    box-shadow: 0 10px 25px rgba(0, 86, 179, 0.3);
    transform: translateZ(30px);
}

/* Title styling */
.circular-popup .popup-title {
    position: relative;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.3;
    transform: translateZ(20px);
    text-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Divider */
.circular-popup .popup-divider {
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 0 0 20px;
    border-radius: 2px;
    transform: translateZ(15px);
}

/* Description text */
.circular-popup .popup-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 25px;
    transform: translateZ(10px);
}

/* Button styling */
.circular-popup .popup-button {
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.3);
    position: relative;
    overflow: hidden;
    transform: translateZ(5px);
    transition: all 0.3s ease;
}

.circular-popup .popup-button:hover {
    transform: translateY(-3px) translateZ(5px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.4);
    background: var(--accent);
}

.circular-popup .popup-button i {
    transition: all 0.3s;
}

.circular-popup .popup-button:hover i {
    transform: translateX(5px);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .circular-popup {
        width: 320px !important;
        height: 320px;
        padding: 25px !important;
    }
    
    .circular-popup .circular-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .circular-popup .popup-title {
        font-size: 1.5rem;
    }
    
    .circular-popup .popup-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .circular-popup .popup-button {
        padding: 10px 20px;
    }
}

/* Glowing effect behind the popup */
.circular-popup:before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #b8a62d, #d4c251, #e6d685);
    z-index: -1;
    opacity: 0.3;
    filter: blur(25px);
    animation: glowPulse 4s infinite alternate ease-in-out;
}

@keyframes glowPulse {
    0% { 
        opacity: 0.2;
        transform: scale(0.95);
        filter: blur(25px);
    }
    100% { 
        opacity: 0.4;
        transform: scale(1.05); 
        filter: blur(30px);
    }
}

/* Decorative light effect */
.circular-popup:after {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(
        ellipse at 80% 20%, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 255, 255, 0) 50%
    );
    pointer-events: none;
    opacity: 0.7;
}

/* Improved close button */
.circular-popup .popup-close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    transform: rotate(0deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.circular-popup .popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg) scale(1.1);
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Content layout */
.circular-popup .popup-inner {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transform-style: preserve-3d;
}

/* Title styling */
.circular-popup .popup-title {
    position: relative;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 5px 0;
    color: #333;
    line-height: 1.3;
    transform: translateZ(20px);
    text-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.circular-popup .popup-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #b8a62d, #d4c251);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Subtitle styling */
.circular-popup .popup-subtitle {
    font-size: 1.4rem;
    color: #444;
    margin: 15px 0 15px;
    font-weight: 700;
    transform: translateZ(15px);
}

/* Description text */
.circular-popup .popup-description {
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 25px;
    transform: translateZ(10px);
}

/* Form elements container */
.circular-popup .popup-action {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    transform: translateZ(10px);
}

/* Email input field */
.circular-popup .popup-input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.circular-popup .popup-input:focus {
    border-color: #b8a62d;
    box-shadow: 0 0 0 3px rgba(184, 166, 45, 0.15);
    background-color: #fff;
}

/* Submit button */
.circular-popup .popup-button {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    background: #b8a62d;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(184, 166, 45, 0.3);
    position: relative;
    overflow: hidden;
    transform: translateZ(5px);
}

/* Button shine effect */
.circular-popup .popup-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: all 0.6s ease;
}

.circular-popup .popup-button:hover {
    transform: translateY(-3px) translateZ(5px);
    box-shadow: 0 8px 20px rgba(184, 166, 45, 0.4);
    background: #ccb82f;
}

.circular-popup .popup-button:hover:before {
    left: 100%;
}

/* Button icon animation */
.circular-popup .popup-button i {
    transition: all 0.3s;
}

.circular-popup .popup-button:hover i {
    transform: translateX(5px);
}

/* No thanks link */
.circular-popup .popup-no-thanks {
    color: #999;
    font-size: 0.85rem;
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 20px;
    transform: translateZ(5px);
}

.circular-popup .popup-no-thanks:hover {
    color: #666;
    background-color: rgba(0,0,0,0.04);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .circular-popup {
        width: 320px !important;
        height: 320px;
        padding: 25px !important;
    }
    
    .circular-popup .popup-title {
        font-size: 1.5rem;
    }
    
    .circular-popup .popup-subtitle {
        font-size: 1.2rem;
        margin: 15px 0 10px;
    }
    
    .circular-popup .popup-description {
        font-size: 0.8rem;
        margin-bottom: 15px;
    }
    
    .circular-popup .popup-button,
    .circular-popup .popup-input {
        padding: 10px 15px;
    }
    
    .circular-popup .popup-close {
        top: 20px;
        right: 20px;
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 340px) {
    .circular-popup {
        width: 280px !important;
        height: 280px;
    }
}

/* Image-First Popup Styling */
.image-first-popup {
    width: 800px !important;
    max-width: 90vw !important;
    height: auto !important;
    border-radius: 15px !important;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.program-popup.active .image-first-popup {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.popup-stages {
    position: relative;
    width: 100%;
    height: 500px;
    max-height: 80vh;
    overflow: hidden;
}

.popup-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.popup-stage.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Image Stage Styling */
.image-stage {
    background: #000;
}

.popup-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    transform: scale(1);
}

.image-stage.active .popup-image {
    animation: zoomImage 5s forwards;
}

@keyframes zoomImage {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.popup-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
}

.popup-image-title {
    position: absolute;
    bottom: 100px;
    left: 40px;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.7s ease;
    transition-delay: 0.3s;
}

.image-stage.active .popup-image-title {
    transform: translateY(0);
    opacity: 1;
}

.continue-button {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: white;
    color: var(--text-dark);
    border-radius: 30px;
    padding: 12px 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.7s ease;
    transition-delay: 0.5s;
}

.image-stage.active .continue-button {
    transform: translateY(0);
    opacity: 1;
}

.continue-button:hover {
    background: var(--primary);
    color: white;
}

.continue-button i {
    transition: transform 0.3s ease;
}

.continue-button:hover i {
    transform: translateX(5px);
}

/* Content Stage Styling */
.content-stage {
    background: white;
    display: flex;
    flex-direction: column;
}

.popup-content-header {
    padding: 30px 40px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.popup-content-title {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.8rem;
    font-weight: 700;
}

.popup-content-body {
    padding: 30px 40px;
    overflow-y: auto;
    flex: 1;
}

.popup-content-description {
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.popup-content-details {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.popup-content-details h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.program-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.program-highlights li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.program-highlights li i {
    color: var(--primary);
}

.popup-action {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.enroll-button {
    padding: 12px 25px;
    background: var(--gradient-blue);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.3);
    transition: all 0.3s ease;
}

.enroll-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.4);
}

.back-to-image {
    padding: 12px 25px;
    background: white;
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-image:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Dynamic color variations for the enroll button based on program color */
.image-first-popup[data-color="blue"] .enroll-button {
    background: var(--blue);
}

.image-first-popup[data-color="orange"] .enroll-button {
    background: var(--orange);
}

.image-first-popup[data-color="red"] .enroll-button {
    background: var(--red);
}

.image-first-popup[data-color="green"] .enroll-button {
    background: var(--teal);
}

.image-first-popup[data-color="purple"] .enroll-button {
    background: var(--purple);
}

.image-first-popup[data-color="teal"] .enroll-button {
    background: var(--teal);
}

/* Responsive styles for the image-first popup */
@media (max-width: 767px) {
    .popup-stages {
        height: 400px;
    }
    
    .popup-image-title {
        bottom: 90px;
        left: 20px;
        font-size: 1.8rem;
    }
    
    .continue-button {
        bottom: 30px;
        right: 20px;
        padding: 10px 20px;
    }
    
    .popup-content-header {
        padding: 20px 20px 15px;
    }
    
    .popup-content-title {
        font-size: 1.5rem;
    }
    
    .popup-content-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .popup-stages {
        height: 350px;
    }
    
    .popup-image-title {
        font-size: 1.5rem;
        bottom: 80px;
        left: 15px;
    }
    
    .continue-button {
        padding: 8px 15px;
        font-size: 0.9rem;
        bottom: 25px;
        right: 15px;
    }
    
    .popup-action {
        flex-direction: column;
    }
    
    .enroll-button, .back-to-image {
        width: 100%;
        text-align: center;
    }
}
