/* ============================================
   STATS SECTION - HEXAGONAL LAYOUT
   Lanka Matha Tours - About Page
   ============================================ */

.stats-advanced {
    position: relative;
    padding: 120px 0;
    background: linear-gradient(135deg, #1F557B 0%, #03A6A8 100%);
    overflow: hidden;
}

/* ============================================
   DECORATIVE BACKGROUND
   ============================================ */

.stats-advanced::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: background-shift 20s linear infinite;
    pointer-events: none;
}

@keyframes background-shift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* ============================================
   HEXAGON GRID LAYOUT
   ============================================ */

.hexagon-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hex-item {
    position: relative;
}

/* ============================================
   HEXAGON SHAPE
   ============================================ */

.hex-shape {
    width: 250px;
    height: 288px;
    clip-path: polygon(50% 0%,
            100% 25%,
            100% 75%,
            50% 100%,
            0% 75%,
            0% 25%);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s var(--ease-bounce);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.hex-shape::before {
    content: '';
    position: absolute;
    inset: 3px;
    clip-path: polygon(50% 0%,
            100% 25%,
            100% 75%,
            50% 100%,
            0% 75%,
            0% 25%);
    background: white;
    z-index: -1;
}

.hex-shape:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 20px 60px var(--glow-primary);
}

/* ============================================
   PROGRESS RING (SVG)
   ============================================ */

.progress-ring {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring svg {
    width: 240px;
    height: 276px;
    transform: rotate(-90deg);
}

.progress-ring-circle {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 4;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2s var(--ease-smooth);
}

.hex-item.in-view .progress-ring-circle {
    stroke-dashoffset: 200;
}

/* ============================================
   STAT CONTENT
   ============================================ */

.stat-content {
    text-align: center;
    padding: 40px 20px;
}

.stat-content .icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    animation: icon-pulse 2s ease-in-out infinite;
}

.stat-number-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
}

.stat-suffix {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
    margin: 0;
}

/* ============================================
   GLOW EFFECT ON HOVER
   ============================================ */

.hex-item::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, var(--glow-primary), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: -1;
}

.hex-item:hover::before {
    opacity: 1;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ============================================
   CONNECTING LINES (Optional)
   ============================================ */

.connecting-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.connecting-lines svg {
    width: 100%;
    height: 100%;
}

.connection-line {
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 2;
    stroke-dasharray: 5, 5;
    animation: dash-animation 20s linear infinite;
}

@keyframes dash-animation {
    to {
        stroke-dashoffset: -100;
    }
}

/* ============================================
   SECTION TITLE (Above Stats)
   ============================================ */

.stats-section-title {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.stats-section-title h2 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stats-section-title p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .hexagon-grid {
        gap: 30px;
    }

    .hex-shape {
        width: 220px;
        height: 253px;
    }

    .stat-number {
        font-size: 3rem;
    }

    .stat-suffix {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .stats-advanced {
        padding: 80px 0;
    }

    .hexagon-grid {
        flex-direction: column;
        gap: 40px;
        padding: 0 20px;
    }

    .hex-shape {
        width: 280px;
        height: 323px;
    }

    .progress-ring svg {
        width: 270px;
        height: 311px;
    }

    .stats-section-title h2 {
        font-size: 2.2rem;
    }

    .stats-section-title p {
        font-size: 1rem;
    }

    .stat-content .icon {
        font-size: 2.5rem;
    }

    /* Disable hover effects on mobile */
    .hex-shape:hover {
        transform: scale(1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }

    /* Remove background animation on mobile for performance */
    .stats-advanced::before {
        animation: none;
    }
}

@media (max-width: 480px) {
    .hex-shape {
        width: 240px;
        height: 277px;
        max-width: calc(100vw - 40px);
    }

    .progress-ring svg {
        width: 230px;
        height: 265px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-suffix {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .stats-section-title h2 {
        font-size: 1.8rem;
    }
}