/* Optimized CSS for Strickland Services Limited - Performance Focused */

/* Critical Performance Optimizations */
* {
    box-sizing: border-box;
}

/* Optimized Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimized Logo Styles */
.logo-image {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-image-small {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.logo-footer {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Optimized Client Logo Styles */
.client-logo {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.9;
    max-height: 60px;
    width: auto;
}

.client-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Optimized Image Placeholder Styles */
.image-placeholder {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
    padding: 2rem;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
}

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

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

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

@keyframes scaleIn {
    from { 
        opacity: 0; 
        transform: scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* Optimized animation classes */
.animate-fade-in-up { 
    animation: fadeInUp 0.6s ease-out forwards;
    will-change: transform, opacity;
}

.animate-slide-in-left { 
    animation: slideInLeft 0.6s ease-out forwards;
    will-change: transform, opacity;
}

.animate-slide-in-right { 
    animation: slideInRight 0.6s ease-out forwards;
    will-change: transform, opacity;
}

.animate-scale-in { 
    animation: scaleIn 0.6s ease-out forwards;
    will-change: transform, opacity;
}

/* Animation delays for staggered effects */
.animation-delay-200 { animation-delay: 0.2s; opacity: 0; }
.animation-delay-400 { animation-delay: 0.4s; opacity: 0; }
.animation-delay-600 { animation-delay: 0.6s; opacity: 0; }
.animation-delay-800 { animation-delay: 0.8s; opacity: 0; }

/* Optimized Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.7), rgba(37, 99, 235, 0.5));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 1200px;
    padding: 0 2rem;
}

/* Optimized Typography */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 2.25rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: #E0E7FF;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin-bottom: 2.5rem;
    color: #BFDBFE;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/* Optimized Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    will-change: transform, box-shadow;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: transparent;
    color: white;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid white;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    will-change: transform, background-color, color;
}

.btn-secondary:hover {
    background: white;
    color: #1e40af;
    transform: translateY(-2px);
}

/* Optimized Card Styles */
.card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    will-change: transform, box-shadow;
}

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

/* Optimized Section Styles */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #1f2937;
}

.section-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    text-align: center;
    margin-bottom: 3rem;
    color: #6b7280;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Optimized Grid Layouts */
.grid-responsive {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-2 {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.grid-3 {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Optimized Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    will-change: background-color, backdrop-filter;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1f2937;
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.navbar-nav a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    will-change: color;
}

.navbar-nav a:hover {
    color: #1e40af;
}

/* Optimized Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1f2937;
    cursor: pointer;
}

/* Optimized Footer */
.footer {
    background: #111827;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #f9fafb;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
    will-change: color;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* Optimized Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    will-change: border-color;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Optimized Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Optimized Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav.active {
        display: flex;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 5vw, 1.5rem);
    }
    
    .hero-description {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .grid-responsive,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* Performance optimizations for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-fade-in-up,
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-scale-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Optimized print styles */
@media print {
    .navbar,
    .footer,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero-section {
        min-height: auto;
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }
    
    .card {
        border: 2px solid #000;
    }
    
    .form-input {
        border-width: 3px;
    }
}

/* Focus management for accessibility */
.btn-primary:focus,
.btn-secondary:focus,
.form-input:focus,
.navbar-nav a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #3b82f6;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1001;
}

.skip-link:focus {
    top: 6px;
}

/* Optimized image loading */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Optimized hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, box-shadow;
}

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

/* Optimized text selection */
::selection {
    background: #3b82f6;
    color: white;
}

::-moz-selection {
    background: #3b82f6;
    color: white;
}