/* Clients Page Styles */

/* Top Header */
.top-header {
    background-color: #04aac9;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: white;
    font-family: 'Poppins', Arial, sans-serif;
    padding-left: 100px;
}

.top-header h1 {
    font-size: 3em;
    margin: 0 10px 0 0;
    display: inline;
    vertical-align: middle;
}

.top-header span {
    font-size: 2em;
    vertical-align: middle;
}

/* Clients Section */
.clients-section {
    padding: 80px 20px;
    background-color: #00243c;
}

.clients-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: #04aac9;
    font-family: 'Poppins', sans-serif;
    margin: 0 0 10px 0;
}

.section-title p {
    font-size: 18px;
    color: white;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    justify-items: center;
}

.client-logo {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    border: 2px solid #04aac9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 220px;
    cursor: pointer;
}

.client-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #ffd700;
}

.client-img {
    width: calc(100% - 10px);
    height: calc(100% - 30px);
    object-fit: contain;
    margin: 5px;
    transition: transform 0.3s ease;
}

.client-logo:hover .client-img {
    transform: scale(1.05);
}

.name-box {
    background: #04aac9;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    color: white;
    font-weight: 500;
    line-height: 1.2;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.client-logo:hover .name-box {
    background: #ffd700;
    color: #333;
    transform: scale(1.05);
}

/* Projects Section */
.clients-projects-section {
    padding: 80px 20px;
    background-color: #002e47;
}

.clients-projects-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.project-img {
    width: calc(100% - 10px);
    height: 240px;
    object-fit: contain;
    display: block;
    margin: 5px;
    transition: transform 0.3s ease;
}

.project-item:hover .project-img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,46,71,0.75));
    color: white;
    padding: 25px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-item:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.project-overlay p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Testimonials Section */
.clients-testimonials-section {
    padding: 80px 20px;
    background-color: #002e47;
}

.clients-testimonials-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    border-left: 5px solid #04aac9;
}

.testimonial-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-left-color: #ffd700;
}

.testimonial-card::before {
    content: '"';
    font-size: 60px;
    color: #04aac9;
    position: absolute;
    top: 10px;
    left: 20px;
    opacity: 0.2;
}

.testimonial-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
    font-style: italic;
    padding-left: 30px;
}

.client-info h4 {
    margin: 0 0 5px 0;
    color: #04aac9;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.client-info span {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* CTA Section */
.clients-cta-section {
    padding: 80px 20px;
    background-color: #04aac9;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.clients-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>') repeat;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateX(0); }
    100% { transform: translateX(100px); }
}

.clients-cta-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.clients-cta-title {
    font-size: 36px;
    font-family: 'Poppins', sans-serif;
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.clients-cta-description {
    font-size: 18px;
    margin: 0 0 30px 0;
    opacity: 0.9;
    line-height: 1.6;
}

.clients-cta-button {
    display: inline-block;
    background: #00243c;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.clients-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    background: #ffd700;
    color: #333;
}

/* Animations */
.animate {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-header {
        height: auto;
        padding: 40px 20px;
        text-align: center;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .top-header h1 {
        font-size: 2.5em;
        margin: 0 0 10px 0;
        display: block;
    }

    .top-header span {
        font-size: 1.2em;
        display: block;
    }

    .clients-section,
    .clients-projects-section,
    .clients-testimonials-section,
    .clients-cta-section {
        padding: 50px 15px;
    }

    .section-title h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .section-title p {
        font-size: 16px;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .client-logo {
        width: 100%;
        height: 160px;
        padding: 10px;
        border-radius: 10px;
    }

    .client-img {
        width: calc(100% - 10px);
        height: calc(100% - 40px);
        margin: 5px;
    }

    .name-box {
        font-size: 10px;
        padding: 4px 8px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .project-item {
        border-radius: 12px;
    }

    .project-img {
        width: 100%;
        height: 200px;
        margin: 0;
        border-radius: 12px 12px 0 0;
    }

    .project-overlay {
        border-radius: 0 0 12px 12px;
        padding: 20px 15px;
    }

    .project-overlay h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .project-overlay p {
        font-size: 13px;
        line-height: 1.3;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonial-card {
        padding: 20px;
        border-radius: 12px;
        border-left: 4px solid #04aac9;
    }

    .testimonial-card::before {
        font-size: 50px;
        top: 5px;
        left: 15px;
    }

    .testimonial-content p {
        font-size: 14px;
        line-height: 1.5;
        padding-left: 20px;
    }

    .client-info h4 {
        font-size: 16px;
        margin-bottom: 3px;
    }

    .client-info span {
        font-size: 12px;
    }

    .clients-cta-section {
        padding: 60px 20px;
        min-height: 300px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .clients-cta-container {
        text-align: center;
        max-width: 100%;
    }

    .clients-cta-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .clients-cta-description {
        font-size: 16px;
        margin-bottom: 25px;
        line-height: 1.5;
    }

    .clients-cta-button {
        display: inline-block;
        padding: 14px 28px;
        font-size: 16px;
        border-radius: 30px;
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 1px;
    }
}

/* Performance Optimizations */

/* Image loading states */
.client-img,
.project-img {
    transition: opacity 0.3s ease;
}

.client-img[loading="lazy"],
.project-img[loading="lazy"] {
    opacity: 0;
}

.client-img[loading="lazy"].loaded,
.project-img[loading="lazy"].loaded {
    opacity: 1;
}

/* Optimize animations for performance */
@media (prefers-reduced-motion: reduce) {
    .animate,
    .client-logo,
    .project-item,
    .testimonial-card {
        animation: none !important;
        transition: none !important;
    }
}

/* Optimize for mobile performance */
@media (max-width: 768px) {
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Critical CSS for above-the-fold content */
.top-header,
header,
nav {
    font-display: swap;
}

/* Optimize font loading */
@font-face {
    font-family: 'Poppins';
    font-display: swap;
}