/* ========================================
   ADMIN MODULES SECTION - Tile Grid
   ======================================== */

.admin-modules-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #0a1a1a 0%, #0f2a2a 100%);
    min-height: fit-content;
    overflow: hidden; /* Prevent scrollbar during animations */
}

.section-header-simple {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header-simple h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7FFF00, #6DE800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.section-header-simple .subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* ========================================
   MODULES GRID
   ======================================== */

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    overflow: visible; /* Allow content to be visible during animations */
}

@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}

/* ========================================
   MODULE CARD
   ======================================== */

.module-card {
    background: rgba(15, 42, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(127, 255, 0, 0.15);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7FFF00, #6DE800);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.module-card:hover {
    transform: translateY(-8px);
    border-color: rgba(127, 255, 0, 0.4);
    box-shadow: 0 12px 40px rgba(127, 255, 0, 0.15);
}

.module-card:hover::before {
    transform: scaleX(1);
}

/* ========================================
   MODULE ICON
   ======================================== */

.module-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(127, 255, 0, 0.1), rgba(109, 232, 0, 0.05));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.module-icon svg {
    stroke: #7FFF00;
    filter: drop-shadow(0 0 8px rgba(127, 255, 0, 0.3));
}

.module-icon.news {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.1), rgba(255, 140, 0, 0.05));
}

.module-icon.news svg {
    stroke: #FFA500;
    filter: drop-shadow(0 0 8px rgba(255, 165, 0, 0.3));
}

.module-icon.promotion {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 200, 0, 0.05));
}

.module-icon.promotion svg {
    stroke: #FFD700;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.3));
}

.module-icon.intelligence {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.1), rgba(0, 150, 255, 0.05));
}

.module-icon.intelligence svg {
    stroke: #00BFFF;
    filter: drop-shadow(0 0 8px rgba(0, 191, 255, 0.3));
}

.module-icon.carousel {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(123, 31, 162, 0.05));
}

.module-icon.carousel svg {
    stroke: #8A2BE2;
    filter: drop-shadow(0 0 8px rgba(138, 43, 226, 0.3));
}

/* ========================================
   MODULE CONTENT
   ======================================== */

.module-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.module-card p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* ========================================
   MODULE STATS
   ======================================== */

.module-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(127, 255, 0, 0.1);
    border: 1px solid rgba(127, 255, 0, 0.2);
    border-radius: 8px;
    min-width: 80px;
}

.stat-badge.pending {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
}

.stat-badge.pending .stat-number {
    color: #FFC107;
}

.stat-badge.active {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.2);
}

.stat-badge.active .stat-number {
    color: #4CAF50;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #7FFF00;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   MODULE BUTTON
   ======================================== */

.btn-module-open {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #7FFF00, #6DE800);
    color: #0a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-module-open:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(127, 255, 0, 0.3);
    background: linear-gradient(135deg, #8FFF10, #7DE810);
}

.btn-module-open:active {
    transform: translateY(0);
}

/* ========================================
   BACK BUTTON
   ======================================== */

.btn-back-to-dashboard {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.5rem 0;
    padding: 0.875rem 1.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back-to-dashboard:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(127, 255, 0, 0.3);
    transform: translateY(-2px);
}

.btn-back-to-dashboard svg {
    transition: transform 0.3s ease;
}

.btn-back-to-dashboard:hover svg {
    transform: translateX(-4px);
}

/* Back button in admin sections */
.admin-user-management-section .btn-back-to-dashboard,
.news-management-section .btn-back-to-dashboard,
.event-promotion-section .btn-back-to-dashboard,
.promote-management-section .btn-back-to-dashboard,
.hero-carousel-management-section .btn-back-to-dashboard,
.admin-event-management-section .btn-back-to-dashboard {
    margin-bottom: 1rem;
}

.admin-modules-section .btn-back-to-dashboard {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem auto 0;
    padding: 0.875rem 1.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-modules-section .btn-back-to-dashboard:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(127, 255, 0, 0.3);
    transform: translateY(-2px);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-card {
    animation: fadeInUp 0.5s ease backwards;
}

.module-card:nth-child(1) { animation-delay: 0.1s; }
.module-card:nth-child(2) { animation-delay: 0.2s; }
.module-card:nth-child(3) { animation-delay: 0.3s; }
.module-card:nth-child(4) { animation-delay: 0.4s; }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .admin-modules-section {
        padding: 2rem 0;
    }

    .section-header-simple h2 {
        font-size: 2rem;
    }

    .module-card {
        min-height: 280px;
        padding: 1.5rem;
    }

    .module-icon {
        width: 64px;
        height: 64px;
    }

    .module-icon svg {
        width: 36px;
        height: 36px;
    }

    .module-card h3 {
        font-size: 1.25rem;
    }

    .stat-badge {
        min-width: 70px;
        padding: 0.5rem 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}
