/* Module Survey Index Styles */
.survey-index-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    perspective: 1000px;
}

.survey-card {
    background-color: #0f4c3a;
    /* Institutional Dark Green */
    color: #ffffff;
    padding: 30px 20px;
    border-radius: 12px;
    /* Slightly more rounded */
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;

    /* Animation Entrance */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Staggered Delay for Cards (up to 5) */
.survey-card:nth-child(1) {
    animation-delay: 0.1s;
}

.survey-card:nth-child(2) {
    animation-delay: 0.2s;
}

.survey-card:nth-child(3) {
    animation-delay: 0.3s;
}

.survey-card:nth-child(4) {
    animation-delay: 0.4s;
}

.survey-card:nth-child(5) {
    animation-delay: 0.5s;
}

.survey-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    border-color: rgba(248, 181, 0, 0.5);
    /* Gold border on hover */
    background: linear-gradient(145deg, #0f4c3a 0%, #145e49 100%);
}

/* Icon Styling */
.survey-icon-wrapper {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.survey-icon-wrapper svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- Icon Internal Animations on Hover --- */

/* Smile Animation */
.survey-card:hover .icon-smile .icon-part-face {
    animation: pulseGold 2s infinite;
}

.survey-card:hover .icon-smile .icon-part-eye {
    animation: wink 1s ease-in-out infinite alternate;
}

/* Medal Animation */
.survey-card:hover .icon-medal .icon-part-body {
    animation: swing 2s ease-in-out infinite;
    transform-origin: 32px 20px;
    /* Pivot from top of ribbon roughly */
}

.survey-card:hover .icon-medal .icon-part-star {
    animation: spinStar 3s linear infinite;
    transform-origin: 34.5px 39.5px;
    /* Center of star */
}

/* Shield Animation */
.survey-card:hover .icon-shield .icon-part-check {
    animation: drawCheck 0.6s ease-in-out forwards;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}

.survey-card:hover .icon-shield .icon-part-shield {
    animation: pulseGold 2s infinite;
}

/* Title Styling */
.survey-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: #ffffff;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Value Styling */
.survey-value-group {
    margin-bottom: 15px;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.survey-value {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.survey-unit {
    font-size: 1.2rem;
    font-weight: 500;
    margin-left: 5px;
    color: #e2e2e2;
    opacity: 0.9;
}

/* Label/Badge Styling */
.survey-label {
    background: linear-gradient(90deg, #198754 0%, #20c997 100%);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Keyframes */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGold {
    0% {
        filter: drop-shadow(0 0 0 rgba(248, 181, 0, 0));
    }

    50% {
        filter: drop-shadow(0 0 10px rgba(248, 181, 0, 0.6));
    }

    100% {
        filter: drop-shadow(0 0 0 rgba(248, 181, 0, 0));
    }
}

@keyframes wink {

    0%,
    90% {
        ry: 4;
    }

    95% {
        ry: 0.5;
    }

    100% {
        ry: 4;
    }
}

@keyframes swing {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(5deg);
    }

    75% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes spinStar {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes drawCheck {
    from {
        stroke-dashoffset: 50;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .survey-index-container {
        grid-template-columns: 1fr;
    }

    .survey-card {
        margin-bottom: 15px;
    }
}