/* Custom Styles for Tech Dream Africa */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Custom Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Custom Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #0ea5e9 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 64, 175, 0.3);
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #1e40af;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Focus Styles */
input:focus,
textarea:focus,
select:focus {
    ring: 2px;
    ring-color: #1e40af;
    border-color: #1e40af;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

/* Portfolio Filter Animation */
.portfolio-item {
    transition: all 0.3s ease;
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* FAQ Accordion */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    max-height: 500px;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Responsive Text Sizing */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Success and Error Messages Animation */
.message-slide-in {
    animation: slideIn 0.5s ease-out;
}

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

/* Background Patterns */
.pattern-dots {
    background-image: radial-gradient(circle, #e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
}

.pattern-grid {
    background-image: 
        linear-gradient(#e5e7eb 1px, transparent 1px),
        linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Custom Shadow Effects */
.shadow-primary {
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.2);
}

.shadow-secondary {
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
}

/* Pulse Animation for CTAs */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-on-hover:hover {
    animation: pulse 1s infinite;
}

/* Navigation Active State */
nav a.active {
    color: #1e40af;
    font-weight: 600;
}

/* Image Overlay Effect */
.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.8) 0%, rgba(14, 165, 233, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
    opacity: 1;
}

/* Text Selection Color */
::selection {
    background-color: #1e40af;
    color: white;
}

::-moz-selection {
    background-color: #1e40af;
    color: white;
}