/* Custom styles to complement Tailwind CSS */

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Custom gradient backgrounds */
.gradient-bg-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Custom hover effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Custom card styles */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

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

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
}

/* Custom navigation styles */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0ea5e9;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Custom code block styles */
.code-block {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
}

.code-block .line {
    display: block;
    margin-bottom: 0.5rem;
}

.code-block .comment {
    color: #6a737d;
}

.code-block .string {
    color: #32d74b;
}

.code-block .keyword {
    color: #ff7b72;
}

.code-block .number {
    color: #79c0ff;
}

/* Custom section spacing */
.section-padding {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 3rem 0;
    }
}

/* Custom responsive utilities */
@media (max-width: 640px) {
    .text-responsive-xl {
        font-size: 2rem;
        line-height: 2.5rem;
    }

    /* Mobile navigation improvements */
    .mobile-menu-open {
        overflow: hidden;
    }

    /* Mobile hero section adjustments */
    .hero-mobile {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* Mobile card spacing */
    .card-mobile {
        margin-bottom: 1rem;
    }

    /* Mobile form improvements */
    .form-mobile input,
    .form-mobile select,
    .form-mobile textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (min-width: 641px) {
    .text-responsive-xl {
        font-size: 3rem;
        line-height: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .text-responsive-xl {
        font-size: 4rem;
        line-height: 4.5rem;
    }
}

/* Tablet specific styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .tablet-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tablet-text {
        font-size: 1.125rem;
        line-height: 1.75rem;
    }
}

/* Mobile-first responsive images */
.responsive-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 768px) {
    .responsive-image {
        border-radius: 0.5rem;
    }
}

/* Touch-friendly buttons on mobile */
@media (max-width: 768px) {
    .btn-touch {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }

    .nav-touch {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
}

/* Mobile typography improvements */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
        line-height: 2.25rem;
    }

    h3 {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .mobile-text-sm {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }
}

/* Improved mobile spacing */
@media (max-width: 768px) {
    .mobile-px {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .mobile-py {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .mobile-mb {
        margin-bottom: 1.5rem;
    }
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Focus styles for accessibility */
.focus-ring:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

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

/* Custom spacing utilities */
.space-y-12 > * + * {
    margin-top: 3rem;
}

.space-y-16 > * + * {
    margin-top: 4rem;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}
