
/* ---------- Global ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}
body, html {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

/* Header */
header {
    background: linear-gradient(90deg, #3b82f6, #ff9800);
    color: #fff;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}
header h1 {
    font-size: 1.35rem;
}
nav ul {
    display: flex;
    list-style: none;
}
nav li {
    margin-left: 20px;
}
nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: .2s;
}
nav a:hover {
    opacity: .85;
}
nav a.active {
    border-bottom: 2px solid #ffeb3b;
    color: #ffeb3b;
    font-weight: 600;
}
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    cursor: pointer;
}
.menu-toggle span {
    height: 3px;
    background: #fff;
    border-radius: 3px;
    display: block;
}
.close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 26px;
    color: #fff;
    cursor: pointer;
    display: none;
}
@media(max-width:768px) {
    .menu-toggle {
        display: flex;
        order: 2;
    }
    .close-btn {
        display: block;
    }
    header h1 {
        order: 1;
    }
    nav ul {
        position: fixed;
        top: 0;
        right: -280px;
        height: 100%;
        width: 280px;
        flex-direction: column;
        background: linear-gradient(90deg, #4C2C96, #4634A7);
        padding-top: 80px;
        list-style: none;
        transition: right .25s;
        z-index: 1200;
    }
    nav ul.active {
        right: 0;
    }
    nav ul li {
        margin: 20px 0;
        text-align: center;
    }
    nav li {
        margin-left: 0;
    }
}

.logo-img {
    max-height: 80px;
    max-width: 200px;
    width: auto;
    height: auto;
    display: block;
}

/* Hero */
.hero {
    padding: 100px 18px;
    text-align: center;
    color: #fff;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/bj-clients-img.jpg') no-repeat center center;
    background-size: cover;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: 0.3s;
}
.hero h2 {
    font-size: 1.9rem;
    margin-bottom: 18px;
    animation: fadeInDown 1s ease forwards;
}
.hero p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1rem;
    color: #f0f0f0;
    animation: fadeInUp 1s ease forwards;
}
@media(max-width:768px) {
    .hero {
        padding: 70px 18px;
    }
    .hero h2 {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---------- Clients Section ---------- */
.clients-section {
    padding: 60px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f5f5f5;
}

.clients-section h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-align: center;
}

.clients-section p {
    max-width: 600px;
    margin-bottom: 30px;
    text-align: center;
    color: #6b7280;
}

/* ---------- Clients Grid ---------- */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 180px); /* fixed card width */
    justify-content: center; /* center cards in row */
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

/* ---------- Client Cards ---------- */
.client-card {
    width: 180px;
    aspect-ratio: 1; /* square */
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.client-card a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.client-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* FULL FRAME */
    border-radius: 10px;
    display: block;
}

/* Optional overlay text */
.client-card h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 6px 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.5); /* semi-transparent overlay */
    text-align: center;
    box-sizing: border-box;
}

.client-card:hover {
    transform: scale(1.05); /* Slightly enlarge */
    box-shadow: 0 8px 20px rgba(0,0,0,0.2); /* Stronger shadow */
    transition: transform 0.3s, box-shadow 0.3s;
}

.client-card img {
    transition: transform 0.3s; /* Smooth zoom for image */
}

.client-card:hover img {
    transform: scale(1.05);
}


.client-card:hover h3 {
    background: rgba(0,0,0,0.7); /* Darker overlay on hover */
}

/* Mobile / Touch Friendly Hover Simulation */
@media (hover: none) and (pointer: coarse) {
    .client-card:active {
        transform: scale(1.05); /* Same as hover effect */
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    }
    .client-card:active img {
        transform: scale(1.05);
    }
    .client-card:active h3 {
        background: rgba(0,0,0,0.7);
    }
}

/* ---------- Responsive Tweaks ---------- */
@media(max-width:768px) {
    .clients-grid {
        grid-template-columns: repeat(auto-fill, 140px); /* Adjust card size for tablets */
    }
    .client-card {
        width: 140px; /* Smaller width for tablets */
    }
    .client-card h3 {
        font-size: 0.8rem; /* Smaller text on tablet */
    }
}

@media(max-width:480px) {
    .clients-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row on mobile */
        gap: 15px; /* Adjust gap between cards */
    }
    .client-card {
        width: auto; /* Adjust the card size based on the grid layout */
    }
    .client-card h3 {
        font-size: 0.75rem; /* Smaller text for mobile */
    }
}

/* Extra Small Screens */
@media(max-width:320px) {
    .clients-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row even on very small screens */
    }
    .client-card {
        width: 100%; /* Ensure cards span full width on very small screens */
    }
    .client-card h3 {
        font-size: 0.65rem; /* Even smaller text */
    }
}

/* Pagination Buttons */
.cta-section {
    margin-top: 40px;
    text-align: center;
}

.cta-section button {
    padding: 10px 20px;
    margin: 5px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.cta-section button:hover {
    background: #2563eb;
    transform: scale(1.05);
}

/* Hero Section Tweaks for Mobile */
.hero {
    padding: 80px 15px;
}

.hero h2 {
    font-size: 1.5rem;
}

.hero p {
    font-size: 0.95rem;
}

/* Extra Small Screens */
@media(max-width:480px) {
    .cta-section button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Footer */
footer {
    text-align: center;
    background: #0f1724;
    color: #9ca3af;
    padding: 20px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}
.fb-link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}
.fb-link:hover {
    color: #60a5fa;
}

/* Scroll Up Button */
#scrollUp {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 20px;
    z-index: 1000;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}
#scrollUp:hover {
    background: #2563eb;
}
