/* Reset y estilos base */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px; /* Tamaño base para desktop */
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    width: 100%;
}

.header-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.logo-container {
    display: inline-block;
    margin-bottom: 15px;
}

.logo-image {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.main-title {
    color: #1e293b;
    font-size: 2.8rem;
    font-weight: 500;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.subtitle {
    color: #64748b;
    font-size: 1.3rem;
    margin-top: 5px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.module-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e8f4f8;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    .module-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #3498db, #2980b9);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .module-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    }

        .module-card:hover::before {
            transform: scaleX(1);
        }

.bootstrap-icon {
    font-size: 3rem;
    color: transparent;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    background: rgba(59, 130, 246, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
}

    .bootstrap-icon::before {
        color: #3b82f6;
    }

.module-card:hover .bootstrap-icon {
    transform: scale(1.1);
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

    .module-card:hover .bootstrap-icon::before {
        color: #2563eb;
    }

.module-title {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
}

.module-description {
    color: #64748b;
    font-size: 1.1rem;
    margin-top: 6px;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

/* Colores específicos por módulo */
.ventas-card::before {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.compras-card::before {
    background: linear-gradient(90deg, #f39c12, #d35400);
}

.caja-card::before {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.cuenta-card::before {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

.creditos-card::before {
    background: linear-gradient(90deg, #34495e, #2c3e50);
}

.gestoria-card::before {
    background: linear-gradient(90deg, #1abc9c, #16a085);
}

.supervisor-card::before {
    background: linear-gradient(90deg, #e67e22, #d35400);
}

.gerencia-card::before {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.operaciones-card::before {
    background: linear-gradient(90deg, #95a5a6, #7f8c8d);
}

.stock-card::before {
    background: linear-gradient(90deg, #f1c40f, #f39c12);
}

/* Responsive mejorado para móviles */

@media (max-width: 768px) {
    html {
        font-size: 15px; /* Ajuste global */
    }

    .main-title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .module-title {
        font-size: 1.6rem;
    }

    .module-description {
        font-size: 1.1rem;
    }

    .bootstrap-icon {
        font-size: 2.6rem;
        width: 70px;
        height: 70px;
        padding: 12px;
    }

    .logo-image {
        height: 80px;
        width: auto;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }

    .main-title {
        font-size: 2.4rem;
    }

    .subtitle {
        font-size: 1.3rem;
    }

    .module-title {
        font-size: 1.7rem;
    }

    .module-description {
        font-size: 1.2rem;
    }

    .bootstrap-icon {
        font-size: 2.8rem;
        width: 75px;
        height: 75px;
        padding: 14px;
    }

    .modules-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 400px) {
    html {
        font-size: 13px;
    }

    .main-title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .module-title {
        font-size: 1.5rem;
    }

    .module-description {
        font-size: 1.1rem;
    }

    .bootstrap-icon {
        font-size: 2.5rem;
        width: 65px;
        height: 65px;
        padding: 12px;
    }
}

/* Animación de entrada */
.module-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

    .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;
    }

    .module-card:nth-child(5) {
        animation-delay: 0.5s;
    }

    .module-card:nth-child(6) {
        animation-delay: 0.6s;
    }

    .module-card:nth-child(7) {
        animation-delay: 0.7s;
    }

    .module-card:nth-child(8) {
        animation-delay: 0.8s;
    }

    .module-card:nth-child(9) {
        animation-delay: 0.9s;
    }

    .module-card:nth-child(10) {
        animation-delay: 1.0s;
    }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Evitar resaltado al tocar */
@media (max-width: 768px) {
    .module-card {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
}
