
/* Custom Styles for Freelance Africa */
/* These styles complement Tailwind CSS */

/* Brand Logo Styles */
.logo-text {
    background: linear-gradient(135deg, #343A40 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-africa {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-africa:hover {
    filter: drop-shadow(4px 4px 8px rgba(217, 165, 77, 0.3));
}

/* Gold/Mustard colored logo for dark backgrounds */
.logo-gold {
    filter: brightness(0) saturate(100%) invert(70%) sepia(50%) saturate(500%) hue-rotate(5deg) brightness(95%) contrast(90%);
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Custom selection colors */
::selection {
    background-color: #D9A54D;
    color: white;
}

::-moz-selection {
    background-color: #D9A54D;
    color: white;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FDFDFD;
}

::-webkit-scrollbar-thumb {
    background: #D9A54D;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c4923f;
}

/* Input focus ring animation */
input:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(217, 165, 77, 0.2);
}

/* Custom Dropdown Styles */
#dropdown-btn:focus {
    box-shadow: 0 0 0 3px rgba(217, 165, 77, 0.2);
}

#dropdown-btn.error {
    border-color: #ef4444 !important;
    animation: shake 0.5s ease-in-out;
}

#dropdown-menu {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #D9A54D #f1f1f1;
}

#dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

#dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
    margin: 8px 0;
}

#dropdown-menu::-webkit-scrollbar-thumb {
    background: #D9A54D;
    border-radius: 3px;
}

#dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #c4923f;
}

.dropdown-item {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.dropdown-item:hover svg {
    transform: scale(1.1);
}

.dropdown-item:active {
    background-color: rgba(217, 165, 77, 0.2);
}

.dropdown-item svg {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* Animated underline for headline */
@keyframes draw {
    0% {
        stroke-dasharray: 0, 200;
    }
    100% {
        stroke-dasharray: 200, 0;
    }
}

.animate-draw {
    animation: draw 1.5s ease-out forwards;
    stroke-dasharray: 0, 200;
}

/* Feature card hover effects */
.feature-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form validation styles */
input.error,
select.error {
    border-color: #ef4444 !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Success animation */
.success-checkmark {
    animation: scaleIn 0.5s ease-out forwards;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Floating label effect (optional enhancement) */
.form-group {
    position: relative;
}

/* Pulse effect for the live indicator */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Gradient text effect (if needed) */
.gradient-text {
    background: linear-gradient(135deg, #343A40 0%, #D9A54D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Counter animation smooth transition */
.counter {
    transition: all 0.3s ease-out;
}

/* Toast notification styles */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background-color: #10b981;
}

.toast.error {
    background-color: #ef4444;
}

/* Ripple effect for button */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 1280px) {
    html {
        font-size: 16px;
    }
}

/* Parallax-like scroll effect for background elements */
@media (prefers-reduced-motion: no-preference) {
    .parallax-bg {
        transition: transform 0.1s ease-out;
    }
}

/* Focus visible styles for accessibility */
:focus-visible {
    outline: 2px solid #D9A54D;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
}

/* Dark mode support (optional - for future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* Intersection observer fade-in animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover glow effect for cards */
.glow-on-hover {
    transition: box-shadow 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 30px rgba(217, 165, 77, 0.3);
}

/* Skeleton loading placeholder */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Typewriter cursor effect */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: #D9A54D;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* African-inspired pattern background (subtle) */
.pattern-bg {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D9A54D' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
