/* =============================================
   UI/UX ENHANCEMENTS
   Modern, Clean, Professional Design
   ============================================= */

/* === SMOOTH INTERACTIONS === */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === BETTER FOCUS STATES === */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #e53e3e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* === LOADING STATES === */
img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

img[src] {
    animation: imageLoad 0.3s ease-in;
}

@keyframes imageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* === BETTER HOVER STATES === */
a,
button,
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover,
button:hover,
.btn:hover {
    transform: translateY(-2px);
}

.card:hover,
.project-card:hover,
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* === BETTER SPACING === */
.section {
    padding: 4rem 2rem;
}

.section-header {
    margin-bottom: 3rem;
}

/* === BETTER TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: #1e3555;
    margin-top: 0;
}

p {
    line-height: 1.7;
    color: #5c6b7a;
}

/* === BETTER BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #e53e3e;
    border: 2px solid #e53e3e;
}

.btn-secondary:hover {
    background: #e53e3e;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #e53e3e;
    border: 2px solid #e53e3e;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
}

.btn-outline:hover {
    background: #e53e3e;
    color: white;
}

/* === BETTER CARDS === */
.card,
.project-card,
.service-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card-content {
    padding: 1.5rem;
}

/* === BETTER IMAGES === */
.card-image,
.gallery-item {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.card-image img,
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.card:hover .card-image img,
.gallery-item:hover img {
    transform: scale(1.05);
}

/* === BETTER OVERLAYS === */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* === BETTER SECTION HEADERS === */
.section-subtitle {
    display: inline-block;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* === BETTER STATS === */
.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #e53e3e;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #5c6b7a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === BETTER LINKS === */
a {
    color: #e53e3e;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #c53030;
}

/* === BETTER FORMS === */
input,
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* === BETTER ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    animation: fadeInUp 0.6s ease-out;
}

/* === ACCESSIBILITY === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 768px) {
    .section {
        padding: 2.5rem 1rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: 0.95rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .card-content {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 2rem 0.75rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
}
