/* Animation Classes */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 1s ease forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 1s ease forwards;
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-up {
    animation: slideInUp 1s ease forwards;
}

/* Zoom Animations */
@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.zoom-in {
    animation: zoomIn 1s ease forwards;
}

/* Testimonial Slider Styles */
.testimonial-section {
    overflow: hidden;
}

.testimonial-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 50px;
}

.testimonial-wrapper {
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-item {
    min-width: 100%;
    padding: 30px;
    box-sizing: border-box;
}

.testimonial-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: relative;
}

.testimonial-content:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50px;
    width: 30px;
    height: 30px;
    background-color: var(--white);
    transform: rotate(45deg);
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.05);
    z-index: -1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: 30px;
    padding-left: 20px;
}

.author-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 5px;
}

.author-info p {
    color: var(--light-text);
    margin: 0;
}

.slider-controls {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 102, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--primary-color);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 1;
    transition: var(--transition);
}

.slider-nav:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.slider-prev {
    left: 0;
}

.slider-next {
    right: 0;
}

/* Portfolio Styles */
.portfolio-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.portfolio-filter li {
    padding: 8px 20px;
    border-radius: 30px;
    background-color: var(--light-bg);
    cursor: pointer;
    transition: var(--transition);
}

.portfolio-filter li.active,
.portfolio-filter li:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s ease;
}

.portfolio-item.show {
    opacity: 1;
    transform: scale(1);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 29, 61, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay h3 {
    color: var(--white);
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.portfolio-overlay .btn {
    transform: translateY(20px);
    transition: all 0.4s ease 0.2s;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p,
.portfolio-item:hover .portfolio-overlay .btn {
    transform: translateY(0);
}

/* Responsive Adjustments for Portfolio */
@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-container {
        padding: 0 30px;
    }
}

/* Counter Section Styles */
.counter-section {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 80px 0;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.counter-item {
    text-align: center;
}

.counter-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 auto 20px;
}

.counter {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.counter-title {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 992px) {
    .counter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .counter-grid {
        grid-template-columns: 1fr;
    }
}

/* Additional Responsive Improvements */
@media (max-width: 768px) {
    .contact-btn {
        display: none;
    }
    
    .hero {
        padding-top: 120px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .experience-badge {
        position: relative;
        right: 0;
        bottom: 0;
        margin-top: 20px;
        display: inline-block;
    }
    
    .about-image {
        text-align: center;
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 102, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}