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

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

.animate-fadeIn {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

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

::-webkit-scrollbar-track {
    background: #0F172A;
}

::-webkit-scrollbar-thumb {
    background: #38BDF8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0EA5E9;
}

/* Selection Styling */
::selection {
    background: rgba(56, 189, 248, 0.3);
    color: #E2E8F0;
}

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

/* Custom Utility Classes */
.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Back to Top Button Transition */
#backToTop {
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

#backToTop:hover {
    transform: translateY(-3px);
}

/* Form Input Focus Styles */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.5);
}

/* Custom Checkbox */
.custom-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #38BDF8;
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-right: 8px;
}

.custom-checkbox:checked {
    background-color: #38BDF8;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1E293B;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Custom Scrollbar for Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #38BDF8 #0F172A;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
}

/* Custom Animations for Portfolio Items */
.portfolio-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom Underline Animation */
.hover-underline {
    position: relative;
    display: inline-block;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #38BDF8;
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Custom Card Hover Effect */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Custom Gradient Text Animation */
.animate-gradient-text {
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 3s linear infinite;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Add mobile-specific styles here */
    .hero-content {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .feature-card {
        margin-bottom: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    a {
        text-decoration: underline;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
}
