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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
    color: #2563eb;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: #666;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    min-height: 44px; /* Minimum touch target size for mobile */
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #2563eb;
    border-color: #2563eb;
}

.btn-secondary:hover {
    background-color: #2563eb;
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: #333;
    border-color: #333;
}

.btn-outline:hover {
    background-color: #333;
    color: white;
}

/* Header */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
    min-height: 60px;
}

.nav-brand h1 {
    margin-bottom: 0;
}

.location {
    font-size: 0.875rem;
    color: #666;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #2563eb;
}

/* Header contact section removed for cleaner design */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 1px;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-text h2 {
    font-size: 3.5rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
    max-width: 500px;
}

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

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: white;
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background-color: #f8fafc;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

/* Services Preview */
.services-preview {
    padding: 80px 0;
    background-color: #f8fafc;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: #1e293b;
}

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

.service-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.section-footer {
    text-align: center;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.cta-content {
    text-align: center;
}

.cta h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta p {
    color: rgba(255,255,255,0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background-color: white;
    color: #2563eb;
}

.cta .btn-primary:hover {
    background-color: #f1f5f9;
}

.cta .btn-secondary {
    border-color: white;
    color: white;
}

.cta .btn-secondary:hover {
    background-color: white;
    color: #2563eb;
}

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

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

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

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

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

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-word; /* Ensure email addresses wrap properly */
}

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

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

.footer-bottom p {
    color: #94a3b8;
    margin: 0;
}

/* Social Media Styles */
.social-media {
    margin-top: 1.5rem;
}

.social-media h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.social-icon:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 6rem 0 2rem;
    text-align: center;
    margin-top: 80px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.page-header p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
}

/* About Page Styles */
.about-content {
    padding: 4rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    color: #2563eb;
    margin-bottom: 1.5rem;
}

.about-text h3 {
    color: #1f2937;
    margin: 2rem 0 1rem;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.values {
    background: #f8fafc;
    padding: 4rem 0;
}

.values h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2563eb;
}

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

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-4px);
}

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

/* Services Page Styles */
.services-content {
    padding: 4rem 0;
}

.service-detail {
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.service-detail:nth-child(even) {
    background: #f8fafc;
}

.service-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.service-detail-content.reverse {
    direction: rtl;
}

.service-detail-content.reverse > * {
    direction: ltr;
}

.service-detail-text h2 {
    color: #2563eb;
    margin-bottom: 1.5rem;
}

.service-detail-text h3 {
    color: #1f2937;
    margin: 2rem 0 1rem;
}

.service-detail-text ul {
    list-style: none;
    padding: 0;
}

.service-detail-text li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-detail-text li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.service-detail-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.process {
    background: #f8fafc;
    padding: 4rem 0;
}

.process h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2563eb;
}

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

.process-step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* Projects Page Styles */
.portfolio {
    padding: 4rem 0;
}

.portfolio h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2563eb;
}

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

.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.project-details {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.project-type, .project-location {
    background: #e5e7eb;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #374151;
}

.testimonials {
    background: #f8fafc;
    padding: 4rem 0;
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2563eb;
}

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

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.testimonial-stars {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-author {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.testimonial-author strong {
    display: block;
    color: #1f2937;
}

.testimonial-author span {
    color: #6b7280;
    font-size: 0.875rem;
}

.stats {
    background: #2563eb;
    color: white;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Contact Page Styles */
.contact-content {
    padding: 80px 0;
}

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

.contact-info h2 {
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.contact-info > p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    margin-top: 0.25rem;
    min-width: 40px;
}

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

.contact-details a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.contact-details a:hover {
    text-decoration: underline;
}

.contact-form-container {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.contact-form h3 {
    color: #1e293b;
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    min-height: 44px; /* Minimum touch target for mobile */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

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

.contact-form .btn {
    width: 100%;
    justify-content: center;
}

.faq {
    padding: 80px 0;
    background-color: #f8fafc;
}

.faq h2 {
    text-align: center;
    color: #1e293b;
    margin-bottom: 3rem;
}

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

.faq-item {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.faq-item h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header .container {
        flex-wrap: wrap;
        min-height: 70px;
        position: relative;
    }
    
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        padding-bottom: 1rem;
        background-color: white;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        border-radius: 0 0 8px 8px;
        padding: 1rem 20px;
    }
    
    .nav.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero Section Mobile Fix */
    .hero {
        margin-top: 0;
        padding-top: 120px;
        min-height: calc(100vh - 120px);
        flex-direction: column;
        text-align: center;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Page Header Mobile Fix */
    .page-header {
        margin-top: 0;
        padding-top: 120px;
        padding-bottom: 2rem;
    }
    
    .hero-text h2 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .hero-text p {
        font-size: 1.1rem;
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        flex: 1;
        min-width: 140px;
        max-width: 200px;
    }
    
    .hero-image {
        margin-top: 2rem;
        padding: 0 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1.1rem;
    }

    /* Typography adjustments */
    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Grid layouts mobile optimization */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .service-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-detail-content.reverse {
        direction: ltr;
    }

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

    .contact-form-container {
        padding: 1.5rem;
    }

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

    .project-details {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

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

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

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .cta-buttons .btn {
        min-width: 200px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .social-icons {
        justify-content: center;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
    }

    /* Section padding adjustments */
    .features,
    .services-preview,
    .cta,
    .about-content,
    .services-content,
    .portfolio,
    .testimonials,
    .contact-content,
    .faq {
        padding: 60px 0;
    }

    .values,
    .process {
        padding: 60px 0;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        padding: 0.75rem 15px;
        min-height: 65px;
    }
    
    /* Adjust for even smaller screens */
    .hero {
        padding-top: 100px;
        min-height: calc(100vh - 100px);
    }
    
    .page-header {
        padding-top: 100px;
    }
    
    .hero-text h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .hero-buttons .btn {
        min-width: 120px;
        padding: 12px 16px;
    }

    .feature-card,
    .value-card,
    .testimonial-card,
    .faq-item {
        padding: 1.5rem;
    }

    .service-card .service-content,
    .project-content {
        padding: 1.25rem;
    }

    .contact-form-container {
        padding: 1.25rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .contact-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

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

    .stat-number {
        font-size: 2.5rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }
}

/* Safe area handling for devices with notches */
@supports (padding-top: env(safe-area-inset-top)) {
    .header {
        padding-top: env(safe-area-inset-top);
    }
    
    @media (max-width: 768px) {
        .hero {
            padding-top: calc(120px + env(safe-area-inset-top));
        }
        
        .page-header {
            padding-top: calc(120px + env(safe-area-inset-top));
        }
    }
    
    @media (max-width: 480px) {
        .hero {
            padding-top: calc(100px + env(safe-area-inset-top));
        }
        
        .page-header {
            padding-top: calc(100px + env(safe-area-inset-top));
        }
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image img,
    .service-card img,
    .project-card img,
    .about-image img,
    .service-detail-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Improved focus states for accessibility */
.btn:focus,
.nav-link:focus,
.phone-link:focus,
.cta-button:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.social-link:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}