/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}
.logo img {
    height: 40px;
    margin-right: 10px;
}
nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}
nav a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}
nav a:hover {
    color: var(--primary-blue);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(37, 99, 235, 0.8), rgba(37, 99, 235, 0.8)),
                url('/static/images/background_hero.avif') center/cover;
    color: white;
    padding: 150px 0 100px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow-x: hidden;
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.cta-button {
    background: var(--primary-green);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 600;
}
.cta-button:hover {
    background: #15803d;
    transform: translateY(-2px);
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--bg-light);
}
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}
.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.service-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.service-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-blue);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
}
.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}
.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 100px 0;
    background: url('/static/images/background_about.avif') center/cover;
    position: relative;
}
.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
}
.about-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}
.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.stat {
    text-align: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}
.stat-label {
    color: var(--text-light);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--bg-light);
}
.projects-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 6px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.project-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}
.project-card:hover .project-overlay {
    opacity: 1;
}
.project-content {
    padding: 1.5rem;
}
.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}
.project-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Clients Section */
.clients {
    padding: 80px 0;
    background: white;
}
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-width: 1000px;
    margin: 0 auto;
    gap: 2rem;
    align-items: center;
}
.client-logo {
    text-align: center;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
    background: var(--bg-light);
    position: relative;
}
.client-logo:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.client-logo img {
    opacity: 0.7;
    transition: opacity 0.3s;
}
.client-logo:hover img {
    opacity: 1;
}
.client-image {
    max-width: 125px;
    height: 150px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}
.client-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    white-space: nowrap;
}
.client-logo:hover .client-hover {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}
.client-link {
    text-decoration: none;
    color: inherit;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: url('/static/images/background_contact.avif') center/cover;
    position: relative;
}
.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
}
.contact .section-title,
.contact .section-subtitle {
    position: relative;
    z-index: 1;
}
.contact-header h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}
.contact-header p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}
.contact-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
.contact-info {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}
.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}
.contact-item {
    margin-bottom: 2rem;
}
.contact-item strong {
    color: var(--primary-blue);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.contact-item p {
    color: var(--text-light);
    margin-bottom: 0.3rem;
}
.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}
.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}
.form-group textarea {
    height: 120px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 50px 0 20px;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--light-blue);
}
.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
    color: #d1d5db;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
        overflow-x: hidden;
    }
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.5rem 0;
        width: 100%;
        max-width: 100%;
    }
    /* Hamburger button */
    .hamburger {
        display: flex;
        flex-direction: column;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        z-index: 1100;
    }
    .hamburger span {
        width: 25px;
        height: 3px;
        background: var(--text-dark);
        margin: 3px 0;
        transition: 0.3s;
    }
    .hamburger.open span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .hamburger.open span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.open span:nth-child(3) {
        transform: rotate(45deg) translate(-7px, -6px);
    }
    /* Navigation, when hamburger button is opened */
    nav {
        max-height: 0;
        position: static;
        width: 100%;
        background: var(--white);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        transition: max-height 0.3s ease;
        z-index: 1050;
    }
    nav.open {
        max-height: 500px;
        transition: max-height 0.4s cubic-bezier(.4,2,.6,1);
    }
    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem;
    }
    nav ul li {
        border-bottom: 1px solid var(--border-color);
    }
    nav ul li:last-child {
        border-bottom: none;
    }
    nav a {
        display: block;
        padding: 1rem;
        text-align: left;
    }
    header {
        padding: 0.5rem 0;
        width: 100%;
        overflow-x: hidden;
    }
    .hero {
        padding: 100px 0 60px;
        min-height: calc(100vh - 60px);
        padding-top: 120px;
        width: 100%;
        overflow-x: hidden;
    }
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
        word-wrap: break-word;
    }
    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
        word-wrap: break-word;
    }
    .clients {
        width: 100%;
        overflow-x: hidden;
    }
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: 100%;
        max-width: 100%;
    }
    .client-logo {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .client-image {
        max-width: 100px;
        height: auto;
    }
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
    }
    .stats {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
    }
    .service-card,
    .project-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Additional mobile-specific fixes */
@media (max-width: 480px) {
    .container {
        padding: 0 10px; /* Even smaller padding for very small screens */
    }
    .hero {
        padding-top: 140px; /* Even more top padding for very small screens */
    }
    .hero h1 {
        font-size: 2rem;
        padding: 0 0.5rem;
    }
    .hero p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    .cta-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
    .clients-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .client-image {
        max-width: 80px;
    }
    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }
    .form-group input,
    .form-group textarea {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed header */
}
@media (max-width: 768px) {
    html {
        scroll-padding-top: 120px; /* Larger offset for mobile header */
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Alerts */
.alert { padding: 1rem; margin-bottom: 1rem; border-radius: 5px; }
.alert-success { background-color: #d4edda; color: #155724; }
.alert-error { background-color: #f8d7da; color: #721c24; }
.error { background-color: #f8d7da; color: #721c24; }
