* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #1a237e;
    padding: 15px 0;
    position: fixed;   /* закріплений зверху */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;     /* щоб завжди був поверх контенту */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    filter: brightness(0) invert(1);
    height: 30px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 5px 0;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: #b3b3ff;
}

nav ul li a.active {
    color: white;
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #5f72ee;
}

main {
    flex: 1;
    background-color: white;
    padding: 40px 20px;
    margin-top: 70px;  /* відступ вниз, щоб контент не перекривався хедером */
}

.content {
    max-width: 1200px;
    margin: 0 auto;
}

section {
    margin-bottom: 50px;
}

/* About Section Styles */
.about-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.about-text {
    flex: 1;
    text-align: justify;
}

.about-text h1 {
    text-align: left;
}

.about-image {
    width: 20%;
    min-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.about-image img:hover {
    transform: scale(1.03);
}

/* Counters Section */
.counters-container {
    display: flex;
    justify-content: space-around;
    margin-top: 50px;
    flex-wrap: wrap;
}

.counter-block {
    text-align: center;
    margin: 15px;
    min-width: 150px;
}

.counter-number {
    font-size: 42px;
    font-weight: bold;
    color: #1a237e;
    margin-bottom: 5px;
}

.counter-label {
    font-size: 16px;
    color: #333;
}

/* Cases Section Styles */
.cases-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 30px;
}

.cases-text {
    flex: 1;
    text-align: justify;
}

.cases-image {
    width: 40%;
    min-width: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.cases-image img {
    width: 100%;
    height: auto;
    display: block;
}

.cases-section h2 {
    color: #1a237e;
    margin-bottom: 15px;
    font-size: 20px;
}

.cases-section ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.cases-section li {
    margin-bottom: 8px;
}

/* Footer */
footer {
    background-color: #1a237e;
    color: white;
    padding: 20px 0;
    text-align: center;
}

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

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.company-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.contact-info {
    margin-bottom: 10px;
}

.contact-info p {
    margin: 5px 0;
    font-size: 14px;
}

/* Loading Indicator */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 10px;
    }
    
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .about-container,
    .cases-container {
        flex-direction: column;
    }
    
    .about-image,
    .cases-image {
        width: 100%;
        margin-bottom: 20px;
        order: -1;
    }
    
    main {
        padding: 20px 10px;
    }
    
    .counters-container {
        flex-direction: column;
        align-items: center;
    }
    
    .counter-block {
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    nav ul li a {
        font-size: 12px;
    }
    
    .logo {
        height: 25px;
    }
    
    .counter-number {
        font-size: 36px;
    }
    
    .counter-label {
        font-size: 14px;
    }
/* Fix for footer overlapping content on mobile devices */
@media (max-width: 768px) {
    main {
        padding-bottom: 80px !important;
        min-height: calc(100vh - 150px);
    }
    
    .content {
        margin-bottom: 30px;
    }
    
    section {
        padding-bottom: 40px;
    }
    
    /* Specific fixes for about page */
    .about-container {
        margin-bottom: 40px;
    }
    
    .counters-container {
        margin-bottom: 60px;
        padding-bottom: 20px;
    }
    
    /* Specific fixes for cases page */
    .cases-container {
        margin-bottom: 40px;
    }
    
    .cases-text {
        padding-bottom: 20px;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    main {
        padding-bottom: 90px !important;
    }
    
    .about-text,
    .cases-text {
        padding-bottom: 25px;
    }
    
    .counters-container {
        margin-bottom: 70px;
    }
}

/* Additional safety margin for all pages */
@media (max-width: 1024px) {
    main {
        position: relative;
        z-index: 1;
    }
    
    footer {
        position: relative;
        z-index: 2;
    }
}    

}


/* === FIX FOOTER OVERLAP & MOBILE OPTIMIZATION === */
main {
    flex: 1;
    background-color: white;
    padding: 100px 20px 100px 20px; /* верхній відступ для хедера, нижній для футера */
    margin-top: 70px; /* висота хедера */
    box-sizing: border-box;
}

footer {
    position: relative;
    width: 100%;
    z-index: 2;
    background-color: #1a237e;
    color: white;
    padding: 25px 0;
    text-align: center;
}

/* Додатковий запас для мобільних пристроїв */
@media (max-width: 768px) {
    main {
        padding-bottom: 120px !important;
    }
}
