/* Remove all white space around clients page */
body:has(.clients-page) {
    margin: 0;
    padding: 0;
}

body:has(.clients-page) main.container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Modern Clients Page Styles */
.clients-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    width: 100vw;
    min-height: 100vh;
    padding: 1.5rem 0;
    position: relative;
    overflow-x: hidden;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.clients-page::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 20"><defs><radialGradient id="a" cx=".66" cy=".3" r=".7"><stop offset="0" stop-color="rgba(255,255,255,0.05)"/><stop offset=".5" stop-color="rgba(255,255,255,0.02)"/><stop offset="1" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>');
    pointer-events: none;
}

.clients-header {
    text-align: center;
    margin-bottom: 2.5rem;
    color: white;
    position: relative;
    z-index: 1;
    padding: 0 2rem;
}

.clients-title {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 0.8rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #fff, #e3e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.clients-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 300;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.header-actions {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.add-client-btn {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 15px 35px rgba(238, 90, 36, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.add-client-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.add-client-btn:hover::before {
    left: 100%;
}

.add-client-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(238, 90, 36, 0.5);
    color: white;
    text-decoration: none;
}

.map-container {
    margin: 0 2rem 2.5rem 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    height: 300px;
    position: relative;
    animation: slideInUp 1s ease-out 0.6s both;
}

#cluster-map {
    height: 100%;
    width: 100%;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem;
    position: relative;
    z-index: 1;
    max-width: none;
}

.client-card {
    background: rgba(45, 45, 65, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    animation: fadeInUp 0.8s ease-out both;
}

.client-card:nth-child(1) {
    animation-delay: 0.1s;
}

.client-card:nth-child(2) {
    animation-delay: 0.2s;
}

.client-card:nth-child(3) {
    animation-delay: 0.3s;
}

.client-card:nth-child(4) {
    animation-delay: 0.4s;
}

.client-card:nth-child(5) {
    animation-delay: 0.5s;
}

.client-card:nth-child(6) {
    animation-delay: 0.6s;
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.client-card:hover::before {
    transform: scaleX(1);
}

.client-card:hover {
    transform: translateY(-15px) rotateY(5deg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.client-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.client-card:hover .client-image {
    transform: scale(1.1);
    filter: brightness(1.1) saturate(1.2);
}

.client-image-container {
    overflow: hidden;
    position: relative;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.client-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.client-card:hover .client-image-overlay {
    opacity: 1;
}

.no-image-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #2d3436, #636e72);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.no-image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-conic-gradient(rgba(255, 255, 255, 0.1) 0deg 15deg, transparent 15deg 30deg);
    animation: rotate 20s linear infinite;
}

.client-content {
    padding: 1.8rem;
    position: relative;
}

.client-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ecf0f1;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.client-card:hover .client-title {
    color: #74b9ff;
}

.client-description {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
}

.client-location {
    color: #fd79a8;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background: rgba(253, 121, 168, 0.15);
    border-radius: 15px;
    width: fit-content;
}

.client-location::before {
    content: "📍";
    margin-right: 0.7rem;
    font-size: 1.1rem;
}

.view-client-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    border: none;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.view-client-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.view-client-btn:hover::before {
    left: 100%;
}

.view-client-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.no-clients {
    text-align: center;
    color: white;
    padding: 6rem 2rem;
    animation: fadeInUp 1s ease-out;
}

.no-clients-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

.no-clients-text {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .clients-title {
        font-size: 2.8rem;
    }

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

    .map-container {
        height: 350px;
        margin-bottom: 3rem;
        border-radius: 20px;
    }

    .client-content {
        padding: 2rem;
    }

    .add-client-btn {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .clients-page {
        padding: 1rem 0;
    }

    .clients-title {
        font-size: 2.2rem;
    }

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

    .map-container {
        height: 280px;
        border-radius: 15px;
    }

    .client-card {
        border-radius: 20px;
    }

    .client-content {
        padding: 1.2rem;
    }

    .client-image {
        height: 160px;
    }

    .no-image-placeholder {
        height: 160px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .client-card {
        background: rgba(45, 45, 45, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .client-title {
        color: #ecf0f1;
    }

    .client-card:hover .client-title {
        color: #667eea;
    }

    .client-description {
        color: #bdc3c7;
    }
}