/*
 * Image-Based Cards Styling
 * Professional photography for services and industries
 */

/* ========================================
   Service Cards with Images
   ======================================== */

.service-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 480px;
    height: 480px; /* Fixed height for consistent layout */
}

.service-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(26, 54, 93, 0.5) 0%,
        rgba(26, 54, 93, 0.75) 100%
    );
    transition: all var(--transition-base);
}

.service-card:hover .service-overlay {
    background: linear-gradient(180deg,
        rgba(26, 54, 93, 0.4) 0%,
        rgba(26, 54, 93, 0.65) 100%
    );
}

.service-content {
    position: relative;
    padding: 220px 28px 28px;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-icon-small {
    position: absolute;
    top: 160px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--primary-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-base);
    z-index: 2;
}

.service-card:hover .service-icon-small {
    transform: translateX(-50%) translateY(-4px) rotate(5deg);
    box-shadow: 0 12px 24px rgba(212, 168, 75, 0.4);
}

.service-icon-small svg {
    color: var(--primary-navy);
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.service-content h3 {
    margin-bottom: 16px;
    margin-top: 0;
}

.service-content p {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Limit to 5 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.7;
    max-height: calc(1.7em * 5); /* 5 lines max */
    margin-bottom: 16px;
}

/* Remove old icon styling */
.service-icon {
    display: none;
}

/* ========================================
   Industry Cards with Images
   ======================================== */

.industry-card {
    position: relative;
    min-height: 260px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.industry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(26, 54, 93, 0.3) 0%,
        rgba(26, 54, 93, 0.85) 100%
    );
    transition: all var(--transition-base);
}

.industry-card:hover .industry-overlay {
    background: linear-gradient(180deg,
        rgba(212, 168, 75, 0.4) 0%,
        rgba(26, 54, 93, 0.9) 100%
    );
}

.industry-content {
    position: relative;
    z-index: 1;
    padding: 24px;
    text-align: center;
    width: 100%;
}

.industry-icon-small {
    width: 56px;
    height: 56px;
    background: rgba(212, 168, 75, 0.2);
    border: 2px solid var(--primary-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    backdrop-filter: blur(8px);
    transition: all var(--transition-base);
}

.industry-card:hover .industry-icon-small {
    background: rgba(212, 168, 75, 0.4);
    border-color: var(--primary-gold);
    box-shadow: 0 0 24px rgba(212, 168, 75, 0.6);
    transform: scale(1.1);
}

.industry-icon-small svg {
    color: var(--primary-gold);
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.industry-content h3 {
    color: white;
    font-size: 1.125rem;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Partner Logo Enhancements
   ======================================== */

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all var(--transition-base);
}

.partner-logo svg {
    filter: grayscale(100%) opacity(0.6);
    transition: all var(--transition-base);
}

.partner-logo:hover svg {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
    .service-card {
        min-height: 440px;
        height: 440px;
    }

    .service-image {
        height: 160px;
    }

    .service-content {
        padding: 180px 24px 24px;
    }

    .service-icon-small {
        top: 120px;
        width: 50px;
        height: 50px;
    }

    .service-icon-small svg {
        width: 24px;
        height: 24px;
    }

    .industry-card {
        min-height: 220px;
    }

    .industry-icon-small {
        width: 48px;
        height: 48px;
    }

    .industry-icon-small svg {
        width: 24px;
        height: 24px;
    }

    .industry-content h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .service-card {
        min-height: 420px;
        height: 420px;
    }

    .service-image {
        height: 140px;
    }

    .service-content {
        padding: 160px 20px 20px;
    }

    .service-icon-small {
        top: 100px;
    }

    .industry-card {
        min-height: 200px;
    }
}

/* ========================================
   Additional Hover Effects
   ======================================== */

/* Zoom effect on service card images */
.service-card:hover .service-image {
    transform: scale(1.05);
}

.service-image {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle parallax effect on industry cards */
.industry-card {
    transition: transform var(--transition-base);
}

.industry-card:hover {
    transform: translateY(-4px) scale(1.02);
}

/* Shine effect on number badges */
.service-card::before {
    font-size: 14px;
    z-index: 3;
}

/* ========================================
   Loading States
   ======================================== */

.service-image::before,
.industry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    animation: imageShimmer 2s infinite;
    opacity: 0;
}

.service-card:hover .service-image::before,
.industry-card:hover::before {
    opacity: 1;
}

@keyframes imageShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}
