/* Ripple Button Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Invalid input styling */
.is-invalid {
    border-color: #dc2626 !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Progress bar animation */
.progress-bar {
    width: 0;
    transition: width 1.5s ease-out;
}

/* Statistic counter styling */
.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
}

.stat-card p {
    font-size: 1.1rem;
    margin: 10px 0 0;
    opacity: 0.9;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated border */
.animated-border {
    position: relative;
    padding: 30px;
    background: white;
    border-radius: 15px;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Floating labels for forms */
.form-floating-custom {
    position: relative;
}

.form-floating-custom label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    pointer-events: none;
    color: #64748b;
}

.form-floating-custom input:focus + label,
.form-floating-custom input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: white;
    padding: 0 5px;
}

/* Image hover zoom */
.img-hover-zoom {
    overflow: hidden;
    border-radius: 15px;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

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

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Tooltip custom styling */
.custom-tooltip {
    position: relative;
    cursor: pointer;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--dark-color);
    color: white;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.custom-tooltip:hover::after {
    opacity: 1;
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Badge animations */
.badge-animated {
    animation: badgePulse 2s ease-in-out infinite;
}

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

/* Code block styling */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    position: relative;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 20px 0 0 #f59e0b, 40px 0 0 #10b981;
}

/* Timeline styling */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 30px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
}

.timeline-item:nth-child(odd)::before {
    right: -10px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
}

.timeline-item:nth-child(even)::before {
    left: -10px;
}

/* Sticky CTA Button */
.sticky-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Print media styling */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e2e8f0;
        --light-color: #1e293b;
        --dark-color: #0f172a;
    }
}

/* Portfolio Filter Styles */
.portfolio-filters {
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-btn {
    display: inline-block;
    padding: 10px 24px !important;
    border-radius: 30px !important;
    border: 2px solid #667eea !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden !important;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3) !important;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4) !important;
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: white;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        width: 0;
        left: 0;
    }
    to {
        width: 100%;
    }
}

/* Portfolio Grid Animation */
.portfolio-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.col-md-4:nth-child(1) .portfolio-item { animation-delay: 0.1s; }
.col-md-4:nth-child(2) .portfolio-item { animation-delay: 0.2s; }
.col-md-4:nth-child(3) .portfolio-item { animation-delay: 0.3s; }
.col-md-4:nth-child(4) .portfolio-item { animation-delay: 0.4s; }
.col-md-4:nth-child(5) .portfolio-item { animation-delay: 0.5s; }
.col-md-4:nth-child(6) .portfolio-item { animation-delay: 0.6s; }
.col-md-4:nth-child(7) .portfolio-item { animation-delay: 0.7s; }
.col-md-4:nth-child(8) .portfolio-item { animation-delay: 0.8s; }
.col-md-4:nth-child(9) .portfolio-item { animation-delay: 0.9s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Portfolio Filters */
@media (max-width: 768px) {
    .filter-btn {
        padding: 8px 16px !important;
        font-size: 12px !important;
        border-radius: 20px !important;
    }
    
    .portfolio-filters {
        gap: 10px !important;
    }
}
