:root {
    --hc-hex-width: 150px;
    --hc-row-gap: -25px;
    --hc-col-gap: 15px;
    --hc-border-color: #e2e8f0;
    --hc-border-hover-color: #3b82f6;
    --hc-glow-size: 8px;
    --hc-transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.hc-grid-container {
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.hc-grid-honeycomb-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hc-row-gap);
    width: 100%;
}

.hc-row {
    display: flex;
    justify-content: center;
    gap: var(--hc-col-gap);
    width: 100%;
}

/* Offset Logic for true interlocking honeycomb pattern */
.hc-row-size-3 {
    padding-left: 0;
}

.hc-hex-card {
    position: relative;
    width: var(--hc-hex-width);
    height: calc(var(--hc-hex-width) * 1.154);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--hc-transition);
    cursor: pointer;
    box-sizing: border-box;
}

/* Simulated elegant hexagon with clip-path */
.hc-hex-inner {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background-color: #ffffff;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hc-transition);
    z-index: 2;
}

/* Outer border glow mimicking real corporate SaaS ecosystems */
.hc-hex-border-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hc-border-color);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: var(--hc-transition);
    z-index: 1;
}

.hc-hex-card:hover .hc-hex-border-glow {
    background-color: var(--hc-border-hover-color);
    filter: drop-shadow(0 0 var(--hc-glow-size) var(--hc-border-hover-color));
}

.hc-hex-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.hc-logo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: var(--hc-transition);
}

/* Overlay Styling */
.hc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    box-sizing: border-box;
    opacity: 0;
    transition: var(--hc-transition);
    z-index: 3;
    color: #ffffff;
}

.hc-hex-card:hover .hc-overlay {
    opacity: 1;
}

.hc-overlay-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #ffffff;
}

.hc-overlay-desc {
    font-size: 11px;
    margin: 0;
    opacity: 0.8;
}

/* Animations & Hover Effects */

/* Scale */
.hc-anim-scale .hc-hex-card:hover {
    transform: scale(1.08);
    z-index: 10;
}

/* Lift */
.hc-anim-lift .hc-hex-card:hover {
    transform: translateY(-8px);
    z-index: 10;
}

/* Rotate */
.hc-anim-rotate .hc-hex-card:hover {
    transform: rotate(3deg) scale(1.05);
    z-index: 10;
}

/* Float Animation */
.hc-anim-float .hc-hex-card {
    animation: hcFloat 4s ease-in-out infinite alternate;
}
.hc-anim-float .hc-hex-card:nth-child(even) {
    animation-delay: 1.5s;
}
@keyframes hcFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

/* Pulse Animation */
.hc-anim-pulse .hc-hex-card:hover {
    animation: hcPulse 1.5s infinite;
}
@keyframes hcPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Image Zoom */
.hc-anim-image-zoom .hc-hex-card:hover .hc-logo-img {
    transform: scale(1.2);
}

/* Grayscale to Color */
.hc-anim-gray-to-color .hc-logo-img {
    filter: grayscale(100%);
}
.hc-anim-gray-to-color .hc-hex-card:hover .hc-logo-img {
    filter: grayscale(0%);
}

/* Mobile Responsive Grid Layout Options */
@media (max-width: 767px) {
    .hc-mobile-grid-enabled .hc-grid-honeycomb-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .hc-mobile-grid-enabled .hc-row {
        display: contents;
    }
    
    .hc-mobile-grid-enabled .hc-hex-card {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1;
    }

    .hc-mobile-grid-enabled .hc-hex-inner,
    .hc-mobile-grid-enabled .hc-hex-border-glow {
        clip-path: none;
        border-radius: 12px;
    }

    /* Fallback standard borders when grid is active on mobile instead of clips */
    .hc-mobile-grid-enabled .hc-hex-border-glow {
        border: 2px solid var(--hc-border-color);
        background: transparent !important;
    }
    .hc-mobile-grid-enabled .hc-hex-card:hover .hc-hex-border-glow {
        border-color: var(--hc-border-hover-color);
    }
}
