/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    color: #3b82f6;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #3b82f6;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    color: #3b82f6;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: 2px solid #f97316;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ea580c, #dc2626);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #333;
    border: 2px solid #e5e7eb;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tech-illustration {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: 1s;
}

.floating-card:nth-child(3) {
    bottom: 30%;
    left: 20%;
    animation-delay: 2s;
}

.floating-card:nth-child(4) {
    bottom: 10%;
    right: 20%;
    animation-delay: 3s;
}

.floating-card:nth-child(5) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

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

/* Services Section */
.services {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1e293b;
}

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

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    flex: 1;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.service-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-link {
    color: #c2410c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.service-link:hover {
    color: #9a3412;
}

/* About Preview Section */
.about-preview {
    padding: 80px 0;
    background: #f8fafc;
    margin-top: 0;
}

.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.about-content p {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 3rem;
}

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #64748b;
    font-weight: 500;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: #60a5fa;
    text-decoration: none;
}

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

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

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
}

/* Service Page Styles */
.service-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #1e40af, #f97316);
    color: white;
    text-align: center;
}

.service-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.service-content {
    padding: 80px 0;
}

.content-section {
    margin-bottom: 4rem;
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #c2410c;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tech-item {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    font-weight: 500;
    color: #475569;
}

/* Page-specific styles */
.page-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f0f9ff, #dbeafe);
    text-align: center;
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1e293b;
}

.page-content {
    padding: 60px 0;
}

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

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    flex: 1;
}

.contact-card h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.error-page {
    text-align: center;
    padding: 100px 0;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        max-width: 1200px;
        margin: 0 auto 4rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .why-choose-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-cta {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }

    .tech-illustration {
        height: 300px;
    }

    .floating-card {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tech-stack {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile button spacing for all CTA sections */
    .page-content .btn:first-child {
        margin-bottom: 1rem;
    }
    
    .service-content .btn:first-child {
        margin-bottom: 1rem;
    }
    
    /* Specific mobile styling for button containers */
    .page-content div[style*="text-align: center"] .btn,
    .service-content div[style*="text-align: center"] .btn {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 1rem auto;
    }
    
    .page-content div[style*="text-align: center"] .btn:last-child,
    .service-content div[style*="text-align: center"] .btn:last-child {
        margin-bottom: 0;
    }

    /* Contact page specific - center Errsol Worldwide text */
    .contact-card {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .service-hero h1 {
        font-size: 2rem;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .services {
        padding: 60px 0;
    }

    .about-preview {
        padding: 60px 0;
    }

    .service-content {
        padding: 60px 0;
    }

    .page-content {
        padding: 40px 0;
    }
}
