/* 
 * Clear Enterprise Website - Hexagonal Menu System
 * Innovative and interactive hexagon-based navigation
 */

/* ====================
   Hexagon Container
   ==================== */
.hexagon-menu-section {
    padding: var(--space-3xl) 0;
    background-color: var(--off-white);
    text-align: center;
}

.hexagon-menu-section h2 {
    margin-bottom: var(--space-xl);
    position: relative;
    display: inline-block;
}

.hexagon-menu-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--trust-blue);
    margin: var(--space-sm) auto 0;
}

.hexagon-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

/* ====================
   Hexagon Grid Layout
   ==================== */
.hexagon-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
    margin: 0 auto;
    max-width: 1000px;
    position: relative;
}

/* For better hexagon arrangement */
.hexagon-menu::before {
    content: '';
    width: 0;
    padding-bottom: 86.6%;
    grid-row: 1 / 1;
    grid-column: 1 / 1;
}

.hexagon-menu > *:first-child {
    grid-row: 1 / 1;
    grid-column: 1 / 1;
}

/* Offset second row to create honeycomb pattern */
.hexagon-menu > :nth-child(3n-1) {
    margin-top: 50px;
    margin-bottom: -50px;
}

/* ====================
   Hexagon Item Styling
   ==================== */
.hexagon-item {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 115%;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1;
}

.hexagon-item:hover {
    transform: scale(1.05);
    z-index: 2;
}

.hexagon-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--trust-gradient);
    color: var(--pure-white);
    transition: all 0.3s ease;
}

.hexagon-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    transition: transform 0.3s ease, color 0.3s ease;
    color: var(--pure-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hexagon-item:hover .hexagon-icon {
    transform: scale(1.2);
    animation: rotateIcon 2s ease infinite;
    color: var(--deep-charcoal);
    text-shadow: none;
}

.hexagon-content h3 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--pure-white);
    transition: transform 0.3s ease, color 0.3s ease;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hexagon-item:hover .hexagon-content h3 {
    transform: scale(1.1);
    color: var(--deep-charcoal);
    text-shadow: none;
}

/* Hexagon details (shown on hover) */
.hexagon-details {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--deep-charcoal);
    color: var(--pure-white);
    transition: opacity 0.3s ease;
    padding: 30px;
}

.hexagon-item:hover .hexagon-details {
    opacity: 0.95;
}

.hexagon-details p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: var(--space-md);
}

.hexagon-details .btn {
    background-color: transparent;
    color: var(--pure-white);
    border: 2px solid var(--pure-white);
    border-radius: 30px;
    padding: 8px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.hexagon-details .btn:hover {
    background-color: var(--pure-white);
    color: var(--deep-charcoal);
}

/* ====================
   Different Colors for Hexagons
   ==================== */
#hex-it-pm .hexagon-content {
    background: linear-gradient(135deg, var(--trust-blue), var(--soft-azure));
}

#hex-development .hexagon-content {
    background: linear-gradient(135deg, var(--trust-blue), var(--soft-azure));
}

#hex-products .hexagon-content {
    background: linear-gradient(135deg, var(--digital-coral), var(--trust-blue));
}

#hex-erp .hexagon-content {
    background: linear-gradient(135deg, var(--trust-blue), var(--modern-turquoise));
}

#hex-web .hexagon-content {
    background: linear-gradient(135deg, var(--digital-coral), var(--trust-blue));
}

#hex-security .hexagon-content {
    background: linear-gradient(135deg, var(--deep-charcoal), var(--trust-blue));
}

/* ====================
   Animation Integration
   ==================== */
.hexagon-item {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
    animation-fill-mode: forwards;
}

.hexagon-item:nth-child(1) {
    animation-delay: 0.2s;
}

.hexagon-item:nth-child(2) {
    animation-delay: 0.4s;
}

.hexagon-item:nth-child(3) {
    animation-delay: 0.6s;
}

.hexagon-item:nth-child(4) {
    animation-delay: 0.8s;
}

.hexagon-item:nth-child(5) {
    animation-delay: 1.0s;
}

.hexagon-item:nth-child(6) {
    animation-delay: 1.2s;
}

/* Main hexagons floating animation */
#hex-it-pm .hexagon-content,
#hex-development .hexagon-content,
#hex-products .hexagon-content {
    animation: float 6s ease-in-out infinite;
}

#hex-it-pm .hexagon-content {
    animation-delay: 0s;
}

#hex-development .hexagon-content {
    animation-delay: 1s;
}

#hex-products .hexagon-content {
    animation-delay: 2s;
}

/* Hover Animation Enhancements */
.hexagon-item:hover .hexagon-content {
    animation: hexagonPulse 1.5s infinite;
}

/* ====================
   Responsive Adjustments
   ==================== */
@media (max-width: 992px) {
    .hexagon-menu {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hexagon-menu > :nth-child(3n-1) {
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .hexagon-menu > :nth-child(2n) {
        margin-top: 50px;
        margin-bottom: -50px;
    }
}

@media (max-width: 768px) {
    .hexagon-content h3 {
        font-size: 1rem;
    }
    
    .hexagon-icon {
        font-size: 2rem;
    }
    
    .hexagon-details p {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .hexagon-menu {
        grid-template-columns: 1fr;
        grid-gap: 20px;
    }
    
    .hexagon-menu > :nth-child(n) {
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .hexagon-item {
        padding-bottom: 100%;
    }
}