/* 3D Dynamic Loader Styles */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #0a0a0a 70%, #000000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    perspective: 1000px;
    overflow: hidden;
}

.loader-scene {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    transform-style: preserve-3d;
    width: 100%;
    max-width: 800px;
}

/* Dynamic Image Carousel */
.image-carousel {
    position: absolute;
    top: -110px;
    left: 0;
    width: 100%;
    height: 180px;
    overflow: hidden;
    z-index: 1;
}

.carousel-track {
    display: flex;
    animation: carouselMove 20s linear infinite;
    width: calc(300px * 16);
}

.carousel-item {
    width: 300px;
    height: 180px;
    margin: 0 18px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(136, 237, 153, 0.3);
    transition: all 0.3s ease;
    transform: scale(0.9);
}

.carousel-item:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(136, 237, 153, 0.5);
    z-index: 10;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.carousel-item:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #88ed99;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.carousel-item:hover .image-overlay {
    transform: translateY(0);
}

@keyframes carouselMove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-300px * 8));
    }
}

/* 3D Cube Animation */
.loader-cube {
    width: 120px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRotate 4s linear infinite;
    filter: drop-shadow(0 0 30px rgba(136, 237, 153, 0.6));
    z-index: 2;
}

.cube-face {
    position: absolute;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(136, 237, 153, 0.9), rgba(63, 244, 63, 0.7));
    border: 2px solid rgba(136, 237, 153, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #1a1a1a;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.cube-face:hover {
    background: linear-gradient(135deg, rgba(136, 237, 153, 1), rgba(63, 244, 63, 0.9));
    transform: scale(1.05);
}

.cube-front {
    transform: translateZ(60px);
    animation: faceGlow 2s ease-in-out infinite;
}

.cube-back {
    transform: translateZ(-60px) rotateY(180deg);
    animation: faceGlow 2s ease-in-out infinite 0.5s;
}

.cube-right {
    transform: translateX(60px) rotateY(90deg);
    animation: faceGlow 2s ease-in-out infinite 1s;
}

.cube-left {
    transform: translateX(-60px) rotateY(-90deg);
    animation: faceGlow 2s ease-in-out infinite 1.5s;
}

.cube-top {
    transform: translateY(-60px) rotateX(90deg);
    animation: faceGlow 2s ease-in-out infinite 2s;
}

.cube-bottom {
    transform: translateY(60px) rotateX(-90deg);
    animation: faceGlow 2s ease-in-out infinite 2.5s;
}

@keyframes cubeRotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    25% {
        transform: rotateX(90deg) rotateY(45deg) rotateZ(45deg);
    }
    50% {
        transform: rotateX(180deg) rotateY(90deg) rotateZ(90deg);
    }
    75% {
        transform: rotateX(270deg) rotateY(135deg) rotateZ(135deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(180deg) rotateZ(180deg);
    }
}

@keyframes faceGlow {
    0%, 100% {
        box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1), 0 0 15px rgba(136, 237, 153, 0.3);
    }
    50% {
        box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.2), 0 0 25px rgba(136, 237, 153, 0.6);
    }
}

/* 3D Logo Animation */
.loader-logo-container {
    width: 120px;
    height: 120px;
    position: relative;
    z-index: 2;
    perspective: 800px;
    margin-top: 60px;
}

.loader-logo-image {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
    animation: logoRotate 6s ease-in-out infinite;
    transform-style: preserve-3d;
    box-shadow: 0 15px 40px rgba(136, 237, 153, 0.4);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.loader-logo-container:hover .loader-logo-image {
    transform: scale(1.15) rotateY(10deg);
    box-shadow: 0 20px 50px rgba(136, 237, 153, 0.6);
    animation-play-state: paused;
}

@keyframes logoRotate {
    0% {
        transform: rotateY(0deg) scale(1);
    }
    50% {
        transform: rotateY(180deg) scale(1.1);
    }
    100% {
        transform: rotateY(360deg) scale(1);
    }
}

/* Loader Content */
.loader-content {
    text-align: center;
    transform-style: preserve-3d;
    z-index: 2;
    margin-top: 20px;
}

.loader-title h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(136, 237, 153, 0.8);
    animation: titleFloat 3s ease-in-out infinite;
    background: linear-gradient(45deg, #ffffff, #88ed99, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleFloat 3s ease-in-out infinite, gradientShift 4s ease-in-out infinite;
}

.loader-title p {
    font-size: 1.3rem;
    color: #88ed99;
    font-weight: 600;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(136, 237, 153, 0.5);
    animation: subtitlePulse 2s ease-in-out infinite;
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

/* Progress Ring */
.loader-progress-container {
    margin: 30px 0;
    position: relative;
}

.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.progress-ring-svg {
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 10px rgba(136, 237, 153, 0.5));
}

.progress-ring-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 4;
}

.progress-ring-circle {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 0.1s ease-out;
    filter: drop-shadow(0 0 5px rgba(136, 237, 153, 0.8));
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: #88ed99;
    text-shadow: 0 0 10px rgba(136, 237, 153, 0.8);
    animation: progressPulse 1s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Achievement Counter */
.achievement-counter {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.counter-item {
    text-align: center;
    padding: 15px;
    background: rgba(136, 237, 153, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(136, 237, 153, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: counterFloat 3s ease-in-out infinite;
}

.counter-item:hover {
    background: rgba(136, 237, 153, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(136, 237, 153, 0.3);
}

.counter-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #88ed99;
    text-shadow: 0 0 10px rgba(136, 237, 153, 0.8);
    margin-bottom: 5px;
}

.counter-label {
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 500;
}

@keyframes counterFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    font-size: 1.5rem;
    color: #88ed99;
    text-shadow: 0 0 10px rgba(136, 237, 153, 0.8);
    animation: floatingMove 6s ease-in-out infinite;
}

.floating-icon-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon-2 {
    top: 60%;
    right: 15%;
    animation-delay: 1.5s;
}

.floating-icon-3 {
    bottom: 30%;
    left: 20%;
    animation-delay: 3s;
}

.floating-icon-4 {
    top: 40%;
    right: 10%;
    animation-delay: 4.5s;
}

@keyframes floatingMove {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px) translateX(-10px) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-30px) translateX(5px) rotate(270deg);
        opacity: 1;
    }
}

/* Enhanced Particle System */
.particle-system {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #88ed99;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(136, 237, 153, 0.8);
    animation: particleFloat 6s linear infinite;
}

.particle-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle-2 {
    top: 60%;
    right: 15%;
    animation-delay: 1s;
    animation-duration: 7s;
}

.particle-3 {
    bottom: 30%;
    left: 20%;
    animation-delay: 2s;
    animation-duration: 9s;
}

.particle-4 {
    top: 40%;
    left: 80%;
    animation-delay: 3s;
    animation-duration: 6s;
}

.particle-5 {
    bottom: 60%;
    right: 10%;
    animation-delay: 4s;
    animation-duration: 10s;
}

.particle-6 {
    top: 80%;
    left: 50%;
    animation-delay: 5s;
    animation-duration: 8s;
}

.particle-7 {
    top: 30%;
    right: 30%;
    animation-delay: 2.5s;
    animation-duration: 7.5s;
}

.particle-8 {
    bottom: 20%;
    right: 40%;
    animation-delay: 3.5s;
    animation-duration: 9.5s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px) scale(0);
        opacity: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .loader-scene {
        gap: 20px;
        transform: scale(0.9);
    }
    
    .image-carousel {
        height: 120px;
        top: -80px;
    }

    .carousel-item {
        width: 200px;
        height: 120px;
    }
    
    .carousel-track {
        width: calc(200px * 16);
    }
    
    @keyframes carouselMove {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-200px * 8)); }
    }

    .loader-logo-container {
        width: 100px;
        height: 100px;
        margin-top: 40px;
    }
    
    .loader-title h1 {
        font-size: 2rem;
    }

    .loader-title p {
        font-size: 1rem;
    }

    .progress-ring {
        transform: scale(0.9);
    }
    
    .achievement-counter {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
        align-items: center;
    }
    
    .counter-item {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .loader-scene {
        transform: scale(0.8);
    }

    .loader-logo-container {
        margin-top: 0;
    }
    
    .achievement-counter {
        gap: 10px;
    }
    
    .counter-item {
        padding: 5px 10px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
    }

    .counter-number {
        font-size: 1.2rem;
    }

    .counter-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 767px) {
    .achievement-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .achievement-image {
        width: 100%;
        height: 200px;
    }
    
    .profile-pictures-section {
        flex-direction: column;
        gap: 20px;
    }

    .swiper-slide.services {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 80px 20px 40px; /* Add padding for header */
        gap: 20px;
    }

    .swiper-slide.services .service {
        width: 100%;
        max-width: 350px; /* Limit card width on mobile */
        margin: 0;
    }

    .swiper-slide.services .heading {
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   Targeted Fix for Services Page Responsiveness
   ========================================================================== */

@media (max-width: 767px) {
    .swiper-slide.services {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 80px 20px 40px; /* Add padding for header */
        gap: 20px;
    }

    .swiper-slide.services .service {
        width: 100%;
        max-width: 350px; /* Limit card width on mobile */
        margin: 0;
    }

    .swiper-slide.services .heading {
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   Definitive Fix for Sidebar Link Colors
   ========================================================================== */

/* 1. Set a consistent default color for all sidebar links. */
aside .Links a {
    color: #ffffff; /* Set all links to white */
    text-decoration: none;
    transition: color 0.3s ease;
}

/* 2. Style the link of the currently active page. */
aside .Links .activeLink a {
    color: #88ed99; /* Set the active link to green */
    font-weight: 600;
}

/* 3. Style the hover effect for non-active links. */
aside .Links li:not(.activeLink):hover a {
    color: #88ed99; /* Make non-active links green on hover */
}

/* 4. Remove any conflicting generic styles from the activeLink list item itself. */
.activeLink {
    color: inherit; /* Prevents the li from having its own color */
}

/* ==========================================================================
   Responsive Fix for Education & Achievement Cards
   ========================================================================== */

@media (max-width: 767px) {
    /* Target both achievement and education cards */
    .achievement-card,
    .education-card {
        grid-template-columns: 1fr; /* Stack image and content */
        gap: 20px;
        text-align: center; /* Center-align content */
    }

    /* Target both achievement and education images */
    .achievement-image,
    .education-image {
        width: 100%;
        height: 200px; /* Maintain a consistent height */
        margin: 0 auto; /* Center the image */
    }
    
    .education-content h3 {
        justify-content: center; /* Center the heading content */
    }
}

/* ==========================================================================
   Definitive Fix for Services Page Responsiveness & Scrolling
   ========================================================================== */

/* This targets the services slide specifically on mobile devices. */
@media (max-width: 767px) {
    .swiper-slide.services {
        /* Override Swiper's default flexbox settings. */
        display: block !important; 
        
        /* Ensure the slide itself can scroll vertically if content overflows. */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */

        /* Add padding to prevent content from going under the mobile header. */
        padding: 80px 20px 40px; 
        
        /* Ensure the slide takes up the full height to allow scrolling. */
        height: 100% !important;
    }

    /* Style the individual service cards for mobile. */
    .swiper-slide.services .service {
        width: 100%;
        max-width: 380px; /* Set a max-width for readability. */
        margin: 0 auto 25px; /* Center the cards and add space between them. */
        text-align: center;
    }

    .swiper-slide.services .heading {
        text-align: center;
        margin-bottom: 30px;
    }
} 