/* Global Styles */
:root {
    --primary-50: #fef2f2;
    --primary-500: #ef4444;
    --primary-600: #dc2626;
    --secondary-500: #64748b;
    --secondary-600: #475569;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

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

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

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

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

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

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

/* Responsive Image Container */
.img-container {
    position: relative;
    overflow: hidden;
}

.img-container img {
    transition: transform 0.7s ease;
}

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

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

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(100, 116, 139, 0.15);
}

/* Section Spacing */
.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Utility Classes */
.text-balance {
    text-wrap: balance;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Button Hover Effects */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(100, 116, 139, 0.2);
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem !important;
        line-height: 2.5rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
        line-height: 2.25rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
        line-height: 1.75rem !important;
    }
}

/* Improved Focus States */
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: 3px solid #fca5a5;
    outline-offset: 2px;
}

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

/* Accessible Link Styles */
a:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Grid Gap Fix for Mobile */
@media (max-width: 768px) {
    .grid {
        gap: 1rem !important;
    }
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Print Styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}